+if (IsSet("CONFIG_DARWIN")) {
+ # gcc-4.0 on Darwin doesn't set this in the gnu99 mode
+ Append("CLANG" => "-fnested-functions");
+ # Directory hierarchy of the fink project
+ Append("LIBS" => "-L/sw/lib");
+ Append("COPT" => "-I/sw/include");
+ # Fill in some constants not found in the system header files
+ Set("SOL_TCP" => 6); # missing in /usr/include/netinet/tcp.h
+}
+
+# Determine page size
+Test("CPU_PAGE_SIZE", "Determining page size", sub {
+ my $p;
+ if (IsSet("CONFIG_DARWIN")) {
+ $p = `sysctl -n hw.pagesize`;
+ defined $p or Fail "sysctl hw.pagesize failed";
+ } elsif (IsSet("CONFIG_LINUX")) {
+ $p = `getconf PAGE_SIZE`;
+ defined $p or Fail "getconf PAGE_SIZE failed";
+ }
+ chomp $p;
+ return $p;
+});
+
+if (IsSet("CONFIG_LARGE_FILES") && IsSet("CONFIG_LINUX")) {
+ # Use 64-bit versions of file functions
+ Set("CONFIG_LFS");
+}
+
+# Decide how will lib/partmap.c work
+Set("PARTMAP_IS_MMAP") if IsSet("CPU_64BIT_POINTERS");
+