From 6e603450b52d4b486dc30295a56e8daf33210c18 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 18 Feb 2012 17:53:59 +0100 Subject: [PATCH] Configure: Moved LibUCW specific Darwin hacks to the right place --- ucw/perl/UCW/Configure/C.pm | 7 ------- ucw/perl/UCW/Configure/LibUCW.pm | 10 +++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ucw/perl/UCW/Configure/C.pm b/ucw/perl/UCW/Configure/C.pm index 301a3a79..223f282c 100644 --- a/ucw/perl/UCW/Configure/C.pm +++ b/ucw/perl/UCW/Configure/C.pm @@ -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 ### diff --git a/ucw/perl/UCW/Configure/LibUCW.pm b/ucw/perl/UCW/Configure/LibUCW.pm index 87157005..46cac732 100644 --- a/ucw/perl/UCW/Configure/LibUCW.pm +++ b/ucw/perl/UCW/Configure/LibUCW.pm @@ -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 { -- 2.39.2