X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fautoconf.cfg;h=2cbb1efaf5fa1e88221b4652f75ed7b9757a988e;hb=bd1f0b7994687ae6f327033b770713ad2085aeab;hp=664b8153cab79a990a98801f8441e680d7bc3235;hpb=746d103cd9a52a9c564af6a46151567d6a2a81a9;p=libucw.git diff --git a/lib/autoconf.cfg b/lib/autoconf.cfg index 664b8153..2cbb1efa 100644 --- a/lib/autoconf.cfg +++ b/lib/autoconf.cfg @@ -180,7 +180,11 @@ Set("LIBS" => ""); # Extra flags for compiling and linking shared libraries Set("CSHARED" => '-fPIC'); -Set("LSHARED" => '-shared -Wl,-soname,lib/$(@F)'); +if (IsSet("CONFIG_DARWIN")) { + Set("LSHARED" => '-dynamiclib -install_name lib/$(@F) -undefined dynamic_lookup'); +} else { + Set("LSHARED" => '-shared -Wl,-soname,lib/$(@F)'); +} # Extra switches depending on GCC version: if ($gccver == 3000) { @@ -216,15 +220,14 @@ if (IsSet("CONFIG_DARWIN")) { # Directory hierarchy of the fink project Append("LIBS" => "-L/sw/lib"); Append("COPT" => "-I/sw/include"); - # LFS is not supported, but all file functions are automatically 64-bit - UnSet("CONFIG_LFS"); # Fill in some constants not found in the system header files Set("PAGE_SIZE" => `sysctl -n hw.pagesize`); Set("SOL_TCP" => 6); #missing in /usr/include/netinet/tcp.h } -if (!IsSet("CONFIG_LARGE_FILES")) { - UnSet("CONFIG_LFS"); +if (IsSet("CONFIG_LARGE_FILES") && IsSet("CONFIG_LINUX")) { + # Use 64-bit versions of file functions + Set("CONFIG_LFS"); } # Decide how will lib/partmap.c work