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") && IsSet("CONFIG_DIRECT")) {
+ Fail("Direct I/O is not available on darwin");
+ } else {
+ UnSet("CONFIG_DIRECT");
+ }
}
### Writing C headers with configuration ###
Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12);
}
+# fb_direct needs threads
+if (!IsSet("CONFIG_UCW_THREADS")) {
+ if (IsGiven("CONFIG_DIRECT") && IsSet("CONFIG_DIRECT")) {
+ if (!IsGiven("CONFIG_UCW_THREADS")) {
+ Set("CONFIG_UCW_THREADS");
+ } else {
+ Fail("CONFIG_DIRECT needs CONFIG_UCW_THREADS");
+ }
+ } else {
+ UnSet("CONFIG_DIRECT");
+ }
+}
+
PostConfig {
AtWrite {
UCW::Configure::C::ConfigHeader("ucw/autoconf.h", [