summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-05-08 20:59:31 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-05-08 20:59:31 (GMT)
commit8edf0ec438e480c92beb0b14fcbb75f44e968b0f (patch)
treef94689de79423025ecdaac97003547661e8509f8 /configure.in
parent93129f271e71e669a3218c93a71d361155cb4c7e (diff)
downloadhdf5-8edf0ec438e480c92beb0b14fcbb75f44e968b0f.zip
hdf5-8edf0ec438e480c92beb0b14fcbb75f44e968b0f.tar.gz
hdf5-8edf0ec438e480c92beb0b14fcbb75f44e968b0f.tar.bz2
[svn-r3893] Purpose:
Bug Fix Description: Small fix. The "off_t" typedef's size wasn't being set correctly. Solution: The tests for 64-bit files (getdents64() in particular) needed to occur before checking for the sizeof off_t. Platforms tested: Linux
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in58
1 files changed, 31 insertions, 27 deletions
diff --git a/configure.in b/configure.in
index 421d7b0..9feaa1a 100644
--- a/configure.in
+++ b/configure.in
@@ -431,6 +431,37 @@ case "$host" in
esac
dnl ----------------------------------------------------------------------
+dnl Test for 64bit stuff before the data types and their sizes. The
+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)
+ ;;
+esac
+
+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()]))
+
+dnl ----------------------------------------------------------------------
dnl Data types and their sizes.
dnl
AC_TYPE_OFF_T
@@ -1033,33 +1064,6 @@ dnl
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