]> mj.ucw.cz Git - libucw.git/commitdiff
Configure: Moved LibUCW specific Darwin hacks to the right place
authorMartin Mares <mj@ucw.cz>
Sat, 18 Feb 2012 16:53:59 +0000 (17:53 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 18 Feb 2012 16:53:59 +0000 (17:53 +0100)
ucw/perl/UCW/Configure/C.pm
ucw/perl/UCW/Configure/LibUCW.pm

index 301a3a7932b14d0e3bdb893ce2d904b3fb9ea4e9..223f282cef7bbfc7f5315f9b2c5a65e5fe908aff 100644 (file)
@@ -167,13 +167,6 @@ if (IsSet("CONFIG_DARWIN")) {
        # 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
-       if (IsGiven("CONFIG_UCW_DIRECT_IO") && IsSet("CONFIG_UCW_DIRECT_IO")) {
-               Fail("Direct I/O is not available on darwin");
-       } else {
-               UnSet("CONFIG_UCW_DIRECT_IO");
-       }
 }
 
 ### Compiling test programs ###
index 87157005b47baf42de3cd7b54053be7eeb7d3535..46cac732aaf3d9c4eeb53c20e717e6da7db33a93 100644 (file)
@@ -71,12 +71,20 @@ TestBool("CONFIG_UCW_MONOTONIC_CLOCK", "Checking for monotonic clock", sub {
        return Get("CONFIG_LINUX");
 });
 
-# Darwin does not support BSD regexes, fix up
 if (IsSet("CONFIG_DARWIN")) {
+       # Darwin does not support BSD regexes, fix up
        if (!IsSet("CONFIG_UCW_POSIX_REGEX") && !IsSet("CONFIG_UCW_PCRE")) {
                Set("CONFIG_UCW_POSIX_REGEX" => 1);
                Warn "BSD regex library on Darwin isn't compatible, using POSIX regex.\n";
        }
+
+       # Fill in some constants not found in the system header files
+       Set("SOL_TCP" => 6);            # missing in /usr/include/netinet/tcp.h
+       if (IsGiven("CONFIG_UCW_DIRECT_IO") && IsSet("CONFIG_UCW_DIRECT_IO")) {
+               Fail("Direct I/O is not available on darwin");
+       } else {
+               UnSet("CONFIG_UCW_DIRECT_IO");
+       }
 }
 
 PostConfig {