X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=ucw%2Fperl%2FUCW%2FConfigure%2FC.pm;h=e3a7fdf859440f8b9d0187e3df3675b282f6241b;hb=82915e16f119cfd64c361ba7079299186611bf89;hp=026aef6fe76da55c29a2cba62e9ae0117aa9b09f;hpb=01d529017638881377fae3e78ec86ee2b71f0779;p=libucw.git diff --git a/ucw/perl/UCW/Configure/C.pm b/ucw/perl/UCW/Configure/C.pm index 026aef6f..e3a7fdf8 100644 --- a/ucw/perl/UCW/Configure/C.pm +++ b/ucw/perl/UCW/Configure/C.pm @@ -256,7 +256,15 @@ if (IsSet("CONFIG_DARWIN")) { 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 - Set("O_DIRECT" => 0); # Darwin doesn't support direct IO, so make Sherlock at least compilable + if (IsGiven("CONFIG_DIRECT_IO") && IsSet("CONFIG_DIRECT_IO")) { + Fail("Direct I/O is not available on darwin"); + } else { + UnSet("CONFIG_DIRECT_IO"); + } + if (!IsSet("CONFIG_POSIX_REGEX") && !IsSet("CONFIG_PCRE")) { + Set("CONFIG_POSIX_REGEX" => 1); + Warn "BSD regex library on Darwin isn't compatible, using POSIX regex.\n"; + } } ### Writing C headers with configuration ###