diff options
author | Peter Simons <simons@cryp.to> | 2009-10-06T09·14+0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2009-10-06T09·14+0000 |
commit | 18f0ff003d711f88a8682131108b101debec3737 (patch) | |
tree | 22f54123dd89961fa17d0738307579ce819e06b6 | |
parent | 96f151783153c62bb19f39d9675b35601003f4d4 (diff) |
configure.ac: use AC_SYS_LARGEFILE to determine how to enable 64-bit file size support
Defining -D_FILE_OFFSET_BITS=64 works on most platforms, but not on all (i.e. Solaris). Also, the Autoconf macro offers the user a switch to disable the functionality in case of problems.
-rw-r--r-- | configure.ac | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index fcb5efaf6d5d..d1cfe2fbf261 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var # except that it requires the ATerm "lib" directory to be in $PATH, as # Windows doesn't have anything like an RPATH embedded in executable. # Since this is kind of annoying, we use static libraries for now. - + AC_ARG_ENABLE(static-nix, AC_HELP_STRING([--enable-static-nix], [produce statically linked binaries]), static_nix=$enableval, static_nix=no) @@ -63,13 +63,13 @@ AC_ARG_ENABLE(static-nix, AC_HELP_STRING([--enable-static-nix], if test "$sys_name" = cygwin; then static_nix=yes fi - + if test "$static_nix" = yes; then AC_DISABLE_SHARED AC_ENABLE_STATIC fi - + # Windows-specific stuff. if test "$sys_name" = "cygwin"; then # We cannot delete open files. @@ -88,8 +88,7 @@ AC_PROG_LIBTOOL # Use 64-bit file system calls so that we can support files > 2 GiB. -CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS" -CXXFLAGS="-D_FILE_OFFSET_BITS=64 $CXXFLAGS" +AC_SYS_LARGEFILE # Check for pubsetbuf. @@ -259,7 +258,7 @@ else bzip2_include="-I$bzip2/include" bzip2_bin="$bzip2/bin" bzip2_bin_test="$bzip2/bin" -fi +fi AC_SUBST(bzip2_lib) AC_SUBST(bzip2_include) AC_SUBST(bzip2_bin) |