diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-05-30 18:15:44 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-05-30 18:15:44 (GMT) |
commit | 96f0b001a039e1281de8deefb0ad7360f09b0c81 (patch) | |
tree | 72176e7ce4b772167d485212985d30ee716b0bbe /fortran/configure.in | |
parent | 685821526f607d095a4bd609d71ca2b7b9ce161f (diff) | |
download | hdf5-96f0b001a039e1281de8deefb0ad7360f09b0c81.zip hdf5-96f0b001a039e1281de8deefb0ad7360f09b0c81.tar.gz hdf5-96f0b001a039e1281de8deefb0ad7360f09b0c81.tar.bz2 |
[svn-r5488] Purpose:
Bug Fix
Description:
On Linux 2.4 kernel, we need to check for Linux LFS support. There
was a failure in the Fortran code when we tried to pass a 4 byte off_t
variable to a function which expected an 8 byte off_t. This is due to
there being no check for the LFS support in the Fortran code.
Solution:
Added the check for Linux LFS support.
Platforms tested:
Elena will test on Linux platform...
Diffstat (limited to 'fortran/configure.in')
-rw-r--r-- | fortran/configure.in | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/fortran/configure.in b/fortran/configure.in index d15b53e..aa277da 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -271,6 +271,54 @@ else fi AC_SUBST(LT_STATIC_EXEC) +case "$host_cpu-$host_vendor-$host_os" in + *linux*) + dnl ---------------------------------------------------------------------- + dnl Enable large file support on linux? Store the result in the LINUX_LFS + dnl variable for posterity + AC_ARG_ENABLE(linux-lfs, + [AC_HELP_STRING([--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 + dnl correctly in <stdio.h> + CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" + ;; +esac + dnl ---------------------------------------------------------------------- dnl Check for a Fortran 9X compiler, how to optimize it, and how to dnl include modules. |