summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-07-16 16:40:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-07-16 16:40:56 (GMT)
commit00f62b983a2f2051adfd4dd619c8db9148472347 (patch)
treed7afd1f8d6ab33c83a0b02a4aa98100fee7d0b6e /configure.in
parent6e7e3dc8c7ddebf88cacf3c2d4495eb80a25feba (diff)
downloadhdf5-00f62b983a2f2051adfd4dd619c8db9148472347.zip
hdf5-00f62b983a2f2051adfd4dd619c8db9148472347.tar.gz
hdf5-00f62b983a2f2051adfd4dd619c8db9148472347.tar.bz2
[svn-r4213] Purpose:
Bug fix... (sorta) Description: Added --enable-linux-lfs configure flag to have better control over whether the enable large file support on Linux machines. Also removed the -malign-double flag for gcc since it can potentially cause errors which are difficult to detect. Platforms tested: Linix 2.2 & 2.4 (eirene and dangermouse)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in51
1 files changed, 34 insertions, 17 deletions
diff --git a/configure.in b/configure.in
index cd304ad..95b0714 100644
--- a/configure.in
+++ b/configure.in
@@ -441,27 +441,44 @@ dnl result could effect the outcome of the sizeof macros below.
dnl
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
- AC_CHECK_FUNCS(getdents64,
- dnl Add the large file support flags to the CPPFLAGS macro if
- dnl we're on a Linux system which austensibly supports LFS. (We
- dnl think it does if it has the ``getdents64'' syscall).
- CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
- if test $cc_vers_all -gt 2095000 -a $cc_vers_all -lt 2096000; then
- dnl For GCC compilers 2.95.x, the -malign-double flag plays
- dnl havoc with the LFS stuff. Remove it. It apparently works
- dnl for 2.96, though, so...
- CFLAGS_saved=$CFLAGS
- CFLAGS=""
- for flag in X $CFLAGS_saved; do
- if test "$flag" != "X" -a "$flag" != "-malign-double"; then
- CFLAGS="$CFLAGS $flag"
- fi
- done
- fi)
+ dnl ----------------------------------------------------------------------
+ dnl Enable large file support on linux? Store the result in the LINUX_LFS
+ dnl variable for posterity
+ AC_ARG_ENABLE(linux-lfs,
+ [ --enable-linux-lfs Enable support for large (64-bit) files on linux. [default=check]])
+
+ case "X-$enable_linux_lfs" in
+ X-yes)
+ LINUX_LFS=yes
+ ;;
+ X-no)
+ LINUX_LFS=no
+ ;;
+ X-|*)
+ LINUX_LFS=no
+ AC_CHECK_FUNCS(getdents64,
+ dnl Add the large file support flags to the CPPFLAGS macro if
+ dnl we're on a Linux system which austensibly supports LFS. (We
+ dnl think it does if it has the ``getdents64'' syscall).
+ LINUX_LFS=yes
+ )
+ ;;
+ esac
+
+ AC_MSG_CHECKING(for large file support on linux mode)
+ if test "X$LINUX_LFS" = "Xyes"; then
+ AC_MSG_RESULT(enabled)
+
+ CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
+ else
+ AC_MSG_RESULT(disabled)
+ fi
+
dnl Add POSIX support on Linux systems, so <features.h> defines
dnl __USE_POSIX, which is required to get the prototype for fdopen
dnl defined correctly in <stdio.h>
CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
+
dnl Also add BSD support on Linux systems, so <features.h> defines
dnl __USE_BSD, which is required to get the prototype for strdup
dnl defined correctly in <string.h> and snprintf & vsnprintf defined