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 ###