summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-05-08 18:42:42 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-05-08 18:42:42 (GMT)
commit93129f271e71e669a3218c93a71d361155cb4c7e (patch)
tree06d73ca87a56c4c5047408026374980197ed7af7 /configure.in
parent4a72a04048b88c49a4bea654b5256aa6eaac2663 (diff)
downloadhdf5-93129f271e71e669a3218c93a71d361155cb4c7e.zip
hdf5-93129f271e71e669a3218c93a71d361155cb4c7e.tar.gz
hdf5-93129f271e71e669a3218c93a71d361155cb4c7e.tar.bz2
[svn-r3892] Purpose:
Better Mouse Trap^W^WBug Fix Description: Instead of having the large file support stuff be in the config/gnu-flags directory, I added it to the configure.in file so that it first checks for the syscall ``getdents64()''. If it finds it, then it removes the ``-malign-double'' flag if the GCC compiler is 2.95.x since this flag doesn't play well with the LFS stuff. Solution: Added test for getdents64(), if found it removes the -malign-double flag if the compiler is 2.95.x. This is done in the configure.in file. The gnu-flags file is returned to normal. A new field is added to the H5config.h.in file because of the getdents64 check. Platforms tested: Linux
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in28
1 files changed, 25 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index c4a4f6c..421d7b0 100644
--- a/configure.in
+++ b/configure.in
@@ -1030,14 +1030,36 @@ AC_MSG_RESULT(no))
dnl ----------------------------------------------------------------------
dnl Check for functions.
dnl
-AC_CHECK_FUNCS(getpwuid gethostname system getrusage fork waitpid)
-AC_CHECK_FUNCS(gettimeofday BSDgettimeofday difftime snprintf vsnprintf)
-AC_CHECK_FUNCS(compress2 setsysinfo longjmp signal sigaction strdup)
+AC_CHECK_FUNCS(compress2 difftime fork gethostname getpwuid getrusage)
+AC_CHECK_FUNCS(gettimeofday BSDgettimeofday longjmp setsysinfo sigaction)
+AC_CHECK_FUNCS(signal snprintf vsnprintf strdup system waitpid)
AC_TRY_COMPILE([#include<sys/types.h>],
[off64_t n = 0;],
AC_CHECK_FUNCS(lseek64 fseek64),
AC_MSG_RESULT([skipping test for lseek64() and fseek64()]))
+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)
+ ;;
+esac
+
dnl ----------------------------------------------------------------------
dnl Check compiler characteristics