summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in520
1 files changed, 295 insertions, 225 deletions
diff --git a/configure.in b/configure.in
index 4422aba..53820e1 100644
--- a/configure.in
+++ b/configure.in
@@ -1,8 +1,16 @@
dnl Process this file with autoconf to produce configure.
dnl
-dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
-dnl National Center for Supercomputing Applications
-dnl All rights reserved.
+dnl Copyright by the Board of Trustees of the University of Illinois.
+dnl All rights reserved.
+dnl
+dnl This file is part of HDF5. The full HDF5 copyright notice, including
+dnl terms governing use, modification, and redistribution, is contained in
+dnl the files COPYING and Copyright.html. COPYING can be found at the root
+dnl of the source code distribution tree; Copyright.html can be found at the
+dnl root level of an installed copy of the electronic HDF5 document set and
+dnl is linked from the top-level documents page. It can also be found at
+dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
+dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
dnl ----------------------------------------------------------------------
dnl Initialize configure.
@@ -37,20 +45,20 @@ AC_OUTPUT_COMMANDS([
])
AC_CANONICAL_HOST
-AC_SUBST(CPPFLAGS)
+AC_SUBST([CPPFLAGS])
dnl ----------------------------------------------------------------------
dnl Dump all shell variables values.
dnl
-AC_MSG_CHECKING(shell variables initial values)
-set >&5
-AC_MSG_RESULT(done)
+AC_MSG_CHECKING([shell variables initial values])
+set >&AS_MESSAGE_LOG_FD
+AC_MSG_RESULT([done])
dnl ----------------------------------------------------------------------
dnl Check that the cache file was build on the same host as what we're
dnl running on now.
dnl
-AC_CACHE_CHECK(for cached host,hdf5_cv_host,hdf5_cv_host="none");
+AC_CACHE_CHECK([for cached host], [hdf5_cv_host], [hdf5_cv_host="none"]);
if test $hdf5_cv_host = "none"; then
hdf5_cv_host=$host
elif test $hdf5_cv_host != $host; then
@@ -105,27 +113,29 @@ case $host_os in
;;
esac
-AC_ARG_ENABLE(hsizet,
- [ --disable-hsizet Datasets can normally be larger than memory
- and/or files but some compilers are unable to
- handle this (including versions of GCC before
- 2.8.0). Disabling the feature causes dataset
- sizes to be restricted to the size of core memory,
- or 'size_t'.],
- HSIZET=$enableval)
+AC_ARG_ENABLE([hsizet],
+ [AC_HELP_STRING([--disable-hsizet],
+ [Datasets can normally be larger than
+ memory and/or files but some compilers are
+ unable to handle this (including versions
+ of GCC before 2.8.0). Disabling the
+ feature causes dataset sizes to be
+ restricted to the size of core memory, or
+ 'size_t'.])],
+ [HSIZET=$enableval])
-AC_MSG_CHECKING(for sizeof hsize_t and hssize_t)
+AC_MSG_CHECKING([for sizeof hsize_t and hssize_t])
AC_SUBST(HSIZET)
case $HSIZET in
no|small)
- AC_MSG_RESULT(small)
+ AC_MSG_RESULT([small])
HSIZET=small
;;
*)
- AC_MSG_RESULT(large)
+ AC_MSG_RESULT([large])
HSIZET=large
- AC_DEFINE(HAVE_LARGE_HSIZET, 1,
+ AC_DEFINE([HAVE_LARGE_HSIZET], [1],
[Define if it's safe to use \`long long' for hsize_t and hssize_t])
;;
esac
@@ -142,13 +152,13 @@ for f in $host_cpu-$host_vendor-$host_os \
$host_os_novers \
$host_vendor \
$host_cpu ; do
- AC_MSG_CHECKING(for config $f)
+ AC_MSG_CHECKING([for config $f])
if test -f "$srcdir/config/$f"; then
host_config=$srcdir/config/$f
- AC_MSG_RESULT(found)
+ AC_MSG_RESULT([found])
break
fi
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
done
if test $host_config != "none"; then
CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
@@ -159,13 +169,13 @@ dnl Source any special site-specific file
hname="`hostname`"
while test -n "$hname"; do
file=$srcdir/config/site-specific/host-$hname
- AC_MSG_CHECKING(for config $file)
+ AC_MSG_CHECKING([for config $file])
if test -f "$file"; then
. $file
- AC_MSG_RESULT(found)
+ AC_MSG_RESULT([found])
break
fi
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
hname_tmp=$hname
hname="`echo $hname | cut -d. -f2-99`"
test "$hname_tmp" = "$hname" && break
@@ -177,15 +187,16 @@ dnl
AC_PROG_CC
CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
-AC_SUBST(config_dirs) config_dirs=""
+AC_SUBST([config_dirs]) config_dirs=""
dnl ----------------------------------------------------------------------
dnl Check if they would like the Fortran interface compiled
dnl
-AC_MSG_CHECKING(if fortran interface enabled)
-AC_ARG_ENABLE(fortran,
- [ --enable-fortran Compile the Fortran interface [default=no]],
- HDF_FORTRAN=$enableval)
+AC_MSG_CHECKING([if fortran interface enabled])
+AC_ARG_ENABLE([fortran],
+ [AC_HELP_STRING([--enable-fortran],
+ [Compile the Fortran interface [default=no]])],
+ [HDF_FORTRAN=$enableval])
if test "X$HDF_FORTRAN" = "Xyes"; then
echo "yes"
@@ -201,10 +212,11 @@ fi
dnl ----------------------------------------------------------------------
dnl Check if they would like the C++ interface compiled
dnl
-AC_MSG_CHECKING(if c++ interface enabled)
-AC_ARG_ENABLE(cxx,
- [ --enable-cxx Compile the C++ interface [default=no]],
- HDF_CXX=$enableval)
+AC_MSG_CHECKING([if c++ interface enabled])
+AC_ARG_ENABLE([cxx],
+ [AC_HELP_STRING([--enable-cxx],
+ [Compile the C++ interface [default=no]])],
+ [HDF_CXX=$enableval])
if test "X$HDF_CXX" = "Xyes"; then
echo "yes"
@@ -218,15 +230,17 @@ else
fi
dnl Run configure in the subdirectories if specified
-AC_CONFIG_SUBDIRS(${config_dirs})
+AC_CONFIG_SUBDIRS([${config_dirs}])
dnl ----------------------------------------------------------------------
dnl If we should build only static executables
dnl
-AC_MSG_CHECKING(if should build only statically linked executables)
-AC_ARG_ENABLE(static_exec,
- [ --enable-static-exec Build only statically linked executables [default=no]],
- STATIC_EXEC=$enableval)
+AC_MSG_CHECKING([if should build only statically linked executables])
+AC_ARG_ENABLE([static_exec],
+ [AC_HELP_STRING([--enable-static-exec],
+ [Build only statically linked executables
+ [default=no]])],
+ [STATIC_EXEC=$enableval])
if test "X$STATIC_EXEC" = "Xyes"; then
echo "yes"
@@ -235,25 +249,25 @@ else
echo "no"
LT_STATIC_EXEC=""
fi
-AC_SUBST(LT_STATIC_EXEC)
+AC_SUBST([LT_STATIC_EXEC])
dnl ----------------------------------------------------------------------
dnl Check if they have Perl installed on their system. We only need Perl
dnl if they're using a GNU compiler.
dnl
-AC_SUBST(PERL) PERL=""
+AC_SUBST([PERL]) PERL=""
if test "X$GCC" = "Xyes"; then
- AC_CHECK_PROGS(PERL, perl,, $PATH)
+ AC_CHECK_PROGS([PERL], [perl],, [$PATH])
fi
dnl ----------------------------------------------------------------------
dnl Check which archiving tool to use. This needs to be done before
-dnl the AM_PROG_LIBTOOL macro.
+dnl the AC_PROG_LIBTOOL macro.
dnl
if test -z "$AR"; then
- AC_CHECK_PROGS(AR,ar xar,:,$PATH)
+ AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH])
fi
-AC_SUBST(AR)
+AC_SUBST([AR])
dnl Export the AR macro so that it will be placed in the libtool file
dnl correctly.
@@ -262,7 +276,7 @@ export AR
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
dnl Fix up the INSTALL macro if it's a relative path. We want the
dnl full-path to the binary instead.
@@ -272,11 +286,12 @@ case "$INSTALL" in
;;
esac
-AC_MSG_CHECKING(make)
-AC_SUBST_FILE(DEPEND)
+AC_MSG_CHECKING([make])
+AC_SUBST_FILE([DEPEND])
+
if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\
sed -n 1p|cut -c1-8`" = "GNU Make"; then
- AC_MSG_RESULT(GNU make)
+ AC_MSG_RESULT([GNU make])
GMAKE=yes
if test "X$GCC" = "Xyes"; then
DEPEND=config/depend1
@@ -284,12 +299,12 @@ if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\
DEPEND=config/depend2
fi
else
- AC_MSG_RESULT(generic)
+ AC_MSG_RESULT([generic])
fi
dnl How do we include another file into a Makefile?
if test -z "$DEPEND"; then
- AC_MSG_CHECKING(how to include a makefile)
+ AC_MSG_CHECKING([how to include a makefile])
dnl The include file contains the target for `foo'
cat >makeinc <<EOF
@@ -310,16 +325,17 @@ EOF
dnl Most make's use `include FILE'
echo 'include makeinc' >maketest
if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then
- AC_MSG_RESULT(include FILE)
+ AC_MSG_RESULT([include FILE])
DEPEND=config/depend4
break;
fi
dnl default
- AC_MSG_RESULT(you have a deficient make command)
+ AC_MSG_RESULT([you have a deficient make command])
DEPEND=config/dependN
break
done
+
rm makeinc maketest
fi
@@ -328,7 +344,7 @@ dnl Sometimes makes think the `.PATH:' appearing before the first rule
dnl with an action should override the `all' default target. So we have
dnl to decide what the proper syntax is.
dnl
-AC_MSG_CHECKING(how make searches directories)
+AC_MSG_CHECKING([how make searches directories])
while true; do #for break
# The most common method is `VPATH=DIR1 DIR2 ...'
cat >maketest <<EOF
@@ -390,7 +406,7 @@ EOF
SEARCH_SEP=' '
AC_MSG_RESULT([it doesn't])
if test ! -f configure; then
- AC_MSG_ERROR(${MAKE-make} requires the build and source directories to be the same)
+ AC_MSG_ERROR([${MAKE-make} requires the build and source directories to be the same])
fi
break
done
@@ -402,33 +418,34 @@ dnl the record.
dnl
AC_MSG_CHECKING(for production mode)
AC_ARG_ENABLE(production,
- [ --enable-production Determines how to run the compiler.])
+ [AC_HELP_STRING([--enable-production],
+ [Determines how to run the compiler.])])
case "X-$enable_production" in
X-yes)
enable_production="yes"
- AC_MSG_RESULT("production")
+ AC_MSG_RESULT([production])
CONFIG_MODE=production
CFLAGS="$CFLAGS $PROD_CFLAGS"
CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
;;
X-|X-no)
enable_production="no"
- AC_MSG_RESULT("development")
+ AC_MSG_RESULT([development])
CONFIG_MODE=development
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
;;
X-pg|X-profile)
enable_production="profile"
- AC_MSG_RESULT("profile")
+ AC_MSG_RESULT([profile])
CONFIG_MODE=profile
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
CPPFLAGS="$CPPFLAGS $PROFILE_CPPFLAGS"
;;
*)
enable_production="user-defined"
- AC_MSG_RESULT("user-defined")
+ AC_MSG_RESULT([user-defined])
CONFIG_MODE="$X-enableval"
;;
esac
@@ -436,27 +453,29 @@ esac
dnl ----------------------------------------------------------------------
dnl Check for system libraries.
dnl
-AC_CHECK_LIB(m,ceil)
+AC_CHECK_LIB([m], [ceil])
if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
dnl ...for Solaris
- AC_CHECK_LIB(nsl, xdr_int)
+ AC_CHECK_LIB([nsl], [xdr_int])
fi
-dnl AC_CHECK_LIB(coug,main) dnl ...for ASCI/Red
+dnl AC_CHECK_LIB([coug], [main]) dnl ...for ASCI/Red
dnl ----------------------------------------------------------------------
dnl Check for system header files.
dnl
AC_HEADER_STDC
AC_HEADER_TIME
+
dnl Unix
-AC_CHECK_HEADERS(sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h)
-AC_CHECK_HEADERS(sys/socket.h sys/types.h)
-AC_CHECK_HEADERS(stddef.h setjmp.h features.h)
-AC_CHECK_HEADERS(stdint.h, C9x=yes)
+AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h])
+AC_CHECK_HEADERS([sys/socket.h sys/types.h])
+AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
+AC_CHECK_HEADERS([stdint.h], [C9x=yes])
+
dnl Windows
-AC_CHECK_HEADERS(io.h winsock.h sys/timeb.h)
+AC_CHECK_HEADERS([io.h winsock.h sys/timeb.h])
case "$host" in
alpha*-dec*-osf*)
@@ -464,43 +483,47 @@ case "$host" in
dnl Alpha to turn off UAC fixing. We do *not* attempt to
dnl locate these files on other systems because there are too
dnl many problems with including them.
- AC_CHECK_HEADERS(sys/sysinfo.h sys/proc.h)
+ AC_CHECK_HEADERS([sys/sysinfo.h sys/proc.h])
;;
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*)
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]])
+ AC_ARG_ENABLE([linux-lfs],
+ [AC_HELP_STRING([--enable-linux-lfs],
+ [Enable support for large (64-bit)
+ files on Linux. [default=check]])])
+ LINUX_LFS="no"
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)
+ MAJOR_VER="`uname -r | cut -d '.' -f1`"
+ MINOR_VER="`uname -r | cut -d '.' -f2`"
+
+ if test $MAJOR_VER -ge 2 -a $MINOR_VER -ge 4; then
+ LINUX_LFS="yes"
+ fi
;;
esac
- AC_MSG_CHECKING(for large file support on linux mode)
+ AC_MSG_CHECKING([for large file support mode on Linux])
if test "X$LINUX_LFS" = "Xyes"; then
- AC_MSG_RESULT(enabled)
-
+ AC_MSG_RESULT([enabled])
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
else
- AC_MSG_RESULT(disabled)
+ AC_MSG_RESULT([disabled])
fi
dnl Add POSIX support on Linux systems, so <features.h> defines
@@ -517,26 +540,26 @@ case "$host_cpu-$host_vendor-$host_os" in
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()]))
+ [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
-AC_CHECK_TYPE(size_t, unsigned long)
-AC_CHECK_TYPE(ssize_t, long)
+AC_CHECK_TYPE([size_t], [unsigned long])
+AC_CHECK_TYPE([ssize_t], [long])
AC_C_BIGENDIAN
-AC_CHECK_SIZEOF(char, 1)
-AC_CHECK_SIZEOF(short, 2)
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(long, 4)
-AC_CHECK_SIZEOF(long long, 8)
-AC_CHECK_SIZEOF(__int64, 8)
-AC_CHECK_SIZEOF(float, 4)
-AC_CHECK_SIZEOF(double, 8)
-AC_CHECK_SIZEOF(long double, 8)
+AC_CHECK_SIZEOF([char], [1])
+AC_CHECK_SIZEOF([short], [2])
+AC_CHECK_SIZEOF([int], [4])
+AC_CHECK_SIZEOF([long], [4])
+AC_CHECK_SIZEOF([long long], [8])
+AC_CHECK_SIZEOF([__int64], [8])
+AC_CHECK_SIZEOF([float], [4])
+AC_CHECK_SIZEOF([double], [8])
+AC_CHECK_SIZEOF([long double], [8])
dnl Checkpoint the cache
AC_CACHE_SAVE
@@ -552,40 +575,41 @@ if test "X$C9x" = "Xyes"; then
EOF
fi
-AC_CHECK_SIZEOF( int8_t, 1)
-AC_CHECK_SIZEOF( uint8_t, 1)
-AC_CHECK_SIZEOF( int_least8_t, 1)
-AC_CHECK_SIZEOF( uint_least8_t, 1)
-AC_CHECK_SIZEOF( int_fast8_t, 1)
-AC_CHECK_SIZEOF( uint_fast8_t, 1)
-
-AC_CHECK_SIZEOF( int16_t, 2)
-AC_CHECK_SIZEOF( uint16_t, 2)
-AC_CHECK_SIZEOF( int_least16_t, 2)
-AC_CHECK_SIZEOF(uint_least16_t, 2)
-AC_CHECK_SIZEOF( int_fast16_t, 2)
-AC_CHECK_SIZEOF( uint_fast16_t, 2)
-
-AC_CHECK_SIZEOF( int32_t, 4)
-AC_CHECK_SIZEOF( uint32_t, 4)
-AC_CHECK_SIZEOF( int_least32_t, 4)
-AC_CHECK_SIZEOF(uint_least32_t, 4)
-AC_CHECK_SIZEOF( int_fast32_t, 4)
-AC_CHECK_SIZEOF( uint_fast32_t, 4)
-
-AC_CHECK_SIZEOF( int64_t, 8)
-AC_CHECK_SIZEOF( uint64_t, 8)
-AC_CHECK_SIZEOF( int_least64_t, 8)
-AC_CHECK_SIZEOF(uint_least64_t, 8)
-AC_CHECK_SIZEOF( int_fast64_t, 8)
-AC_CHECK_SIZEOF( uint_fast64_t, 8)
-
-AC_CHECK_SIZEOF(size_t, 4)
-AC_CHECK_SIZEOF(ssize_t, 4)
+AC_CHECK_SIZEOF( int8_t, [1])
+AC_CHECK_SIZEOF( uint8_t, [1])
+AC_CHECK_SIZEOF( int_least8_t, [1])
+AC_CHECK_SIZEOF( uint_least8_t, [1])
+AC_CHECK_SIZEOF( int_fast8_t, [1])
+AC_CHECK_SIZEOF( uint_fast8_t, [1])
+
+AC_CHECK_SIZEOF( int16_t, [2])
+AC_CHECK_SIZEOF( uint16_t, [2])
+AC_CHECK_SIZEOF( int_least16_t, [2])
+AC_CHECK_SIZEOF(uint_least16_t, [2])
+AC_CHECK_SIZEOF( int_fast16_t, [2])
+AC_CHECK_SIZEOF( uint_fast16_t, [2])
+
+AC_CHECK_SIZEOF( int32_t, [4])
+AC_CHECK_SIZEOF( uint32_t, [4])
+AC_CHECK_SIZEOF( int_least32_t, [4])
+AC_CHECK_SIZEOF(uint_least32_t, [4])
+AC_CHECK_SIZEOF( int_fast32_t, [4])
+AC_CHECK_SIZEOF( uint_fast32_t, [4])
+
+AC_CHECK_SIZEOF( int64_t, [8])
+AC_CHECK_SIZEOF( uint64_t, [8])
+AC_CHECK_SIZEOF( int_least64_t, [8])
+AC_CHECK_SIZEOF(uint_least64_t, [8])
+AC_CHECK_SIZEOF( int_fast64_t, [8])
+AC_CHECK_SIZEOF( uint_fast64_t, [8])
+
+AC_CHECK_SIZEOF([size_t], [4])
+AC_CHECK_SIZEOF([ssize_t], [4])
+
cat >>confdefs.h <<\EOF
#include <sys/types.h> /*for off_t definition*/
EOF
-AC_CHECK_SIZEOF(off_t, 4)
+AC_CHECK_SIZEOF([off_t], [4])
dnl Checkpoint the cache
AC_CACHE_SAVE
@@ -600,7 +624,7 @@ AC_TRY_COMPILE([
#endif
],
[dev_t d1, d2; if(d1==d2) return 0;],
- AC_DEFINE(DEV_T_IS_SCALAR, 1,
+ AC_DEFINE([DEV_T_IS_SCALAR], [1],
[Define if \`dev_t' is a scalar])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
@@ -611,7 +635,7 @@ dnl Fake --with-xxx option to allow us to create a help message for the
dnl following --with-xxx options which can take either a =DIR or =INC,LIB
dnl specifier.
dnl
-AC_ARG_WITH(fnord,
+AC_ARG_WITH([fnord],
[
For the following --with-xxx options, you can specify where the header
files and libraries are in two different ways:
@@ -620,7 +644,7 @@ AC_ARG_WITH(fnord,
library directory separated by a comma
--with-xxx=DIR - Specify only the directory which contains the
include/ and lib/ subdirectories
- ],,)
+ ])
dnl ----------------------------------------------------------------------
dnl Is the dmalloc present? It has a header file `dmalloc.h' and a library
@@ -628,9 +652,10 @@ dnl `-ldmalloc' and their locations might be specified with the `--with-dmalloc'
dnl command-line switch. The value is an include path and/or a library path.
dnl If the library path is specified then it must be preceded by a comma.
dnl
-AC_ARG_WITH(dmalloc,
- [ --with-dmalloc[=DIR] Use dmalloc memory debugging aid (default=no)],,
- withval=no)
+AC_ARG_WITH([dmalloc],
+ [AC_HELP_STRING([--with-dmalloc=DIR],
+ [Use dmalloc memory debugging aid [default=no]])],,
+ withval=no)
case $withval in
yes)
@@ -689,24 +714,26 @@ dnl `-lz' and their locations might be specified with the `--with-zlib'
dnl command-line switch. The value is an include path and/or a library path.
dnl If the library path is specified then it must be preceded by a comma.
dnl
-AC_ARG_WITH(zlib,
- [ --with-zlib[=DIR] Use GNU zlib compression [default=yes]],,
- withval=yes)
+AC_ARG_WITH([zlib],
+ [AC_HELP_STRING([--with-zlib=DIR],
+ [Use GNU zlib compression [default=yes]])],,
+ withval=yes)
case $withval in
yes)
HAVE_ZLIB="yes"
- AC_CHECK_HEADERS(zlib.h)
- AC_CHECK_LIB(z, compress2,, unset HAVE_ZLIB)
+ AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"])
+ AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+ AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR(couldn't find zlib library)
+ AC_MSG_ERROR([couldn't find zlib library])
fi
;;
no)
HAVE_ZLIB="no"
- AC_MSG_CHECKING(for GNU zlib)
- AC_MSG_RESULT(suppressed)
+ AC_MSG_CHECKING([for GNU zlib])
+ AC_MSG_RESULT([suppressed])
;;
*)
HAVE_ZLIB="yes"
@@ -730,30 +757,40 @@ case $withval in
CPPFLAGS="$CPPFLAGS -I$zlib_inc"
fi
- AC_CHECK_HEADERS(zlib.h,, CPPFLAGS="$saved_CPPFLAGS")
+ AC_CHECK_HEADERS([zlib.h],
+ [HAVE_ZLIB_H="yes"],
+ [CPPFLAGS="$saved_CPPFLAGS"])
if test -n "$zlib_lib"; then
LDFLAGS="$LDFLAGS -L$zlib_lib"
fi
- AC_CHECK_LIB(z, compress2,, LDFLAGS="$saved_LDFLAGS"; unset HAVE_ZLIB)
+ AC_CHECK_LIB([z], [compress2],,
+ [LDFLAGS="$saved_LDFLAGS"; unset HAVE_ZLIB])
+ AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR(couldn't find zlib library)
+ AC_MSG_ERROR([couldn't find zlib library])
fi
;;
esac
+if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then
+ AC_DEFINE(HAVE_COMPRESSION, 1,
+ [Define if we have zlib compression support])
+fi
+
dnl ----------------------------------------------------------------------
dnl Pablo Configuration
dnl
AC_SUBST(PABLO) PABLO=""
AC_SUBST(HAVE_PABLO) HAVE_PABLO="no"
-AC_ARG_WITH(pablo,
- [ --with-pablo[=DIR] Use the Pablo library [default=no]],,
- withval=no)
+AC_ARG_WITH([pablo],
+ [AC_HELP_STRING([--with-pablo=DIR],
+ [Use the Pablo library [default=no]])],,
+ withval=no)
-AC_MSG_CHECKING(for Pablo)
+AC_MSG_CHECKING([for Pablo])
case "$withval" in
yes)
@@ -821,9 +858,10 @@ esac
dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage
dnl driver. SSL must be tested before them.
AC_SUBST(SSL) SSL=yes
-AC_ARG_WITH(ssl,
- [ --with-ssl[=LIB] Use the SSL library [default=no]],,
- withval=no)
+AC_ARG_WITH([ssl],
+ [AC_HELP_STRING([--with-ssl=LIB],
+ [Use the SSL library [default=no]])],,
+ withval=no)
case "$withval" in
yes)
@@ -849,9 +887,10 @@ dnl the Grid Storage driver.
dnl
AC_SUBST(GASS) GASS="yes"
AC_SUBST(TESTGASS) TESTGASS='$(srcdir)/testgass'
-AC_ARG_WITH(gass,
- [ --with-gass[=DIR] Use the GASS library [default=no]],,
- withval=no)
+AC_ARG_WITH([gass],
+ [AC_HELP_STRING([--with-gass=DIR],
+ [Use the GASS library [default=no]])],,
+ withval=no)
case "$withval" in
yes)
@@ -924,7 +963,7 @@ case "$withval" in
esac
if test -n "$GASS"; then
- AC_DEFINE(HAVE_GASS, 1,
+ AC_DEFINE([HAVE_GASS], [1],
[Define if the Globus GASS is defined])
fi
@@ -933,9 +972,10 @@ dnl Are SRB Client and other system libraries(socket, elf) present?
dnl
AC_SUBST(SRB) SRB="yes"
AC_SUBST(TESTSRB) TESTSRB='$(srcdir)/testsrb'
-AC_ARG_WITH(srb,
- [ --with-srb[=DIR] Use the SRB library [default=no]],,
- withval=no)
+AC_ARG_WITH([srb],
+ [AC_HELP_STRING([--with-srb=DIR],
+ [Use the SRB library [default=no]])],,
+ withval=no)
case "$withval" in
yes)
@@ -1013,9 +1053,10 @@ dnl be preceded by a comma.
dnl
AC_SUBST(PTHREAD) PTHREAD=yes
-AC_ARG_WITH(pthread,
- [ --with-pthread[=DIR] Use the Pthreads library [default=no]],,
- withval=no)
+AC_ARG_WITH([pthread],
+ [AC_HELP_STRING([--with-pthread=DIR],
+ [Use the Pthreads library [default=no]])],,
+ withval=no)
case "$withval" in
yes)
@@ -1064,9 +1105,10 @@ dnl ----------------------------------------------------------------------
dnl Enable thread-safe version of library. It requires Pthreads support.
dnl
AC_MSG_CHECKING(for thread safe support)
-AC_ARG_ENABLE(threadsafe,
- [ --enable-threadsafe Enable thread safe capability],
- THREADSAFE=$enableval)
+AC_ARG_ENABLE([threadsafe],
+ [AC_HELP_STRING([--enable-threadsafe],
+ [Enable thread safe capability])],
+ THREADSAFE=$enableval)
case "X-$THREADSAFE" in
X-|X-no)
@@ -1075,8 +1117,8 @@ case "X-$THREADSAFE" in
X-yes)
dnl Check that we can link a simple Pthread program.
AC_TRY_LINK(,pthread_create(),
- AC_MSG_RESULT(yes); THREADSAFE=yes,
- AC_MSG_ERROR(needed pthread library not available))
+ AC_MSG_RESULT(yes); THREADSAFE=yes,
+ AC_MSG_ERROR(needed pthread library not available))
;;
*)
AC_MSG_RESULT(error)
@@ -1085,7 +1127,7 @@ case "X-$THREADSAFE" in
esac
if test "X$THREADSAFE" = "Xyes"; then
- AC_DEFINE(HAVE_THREADSAFE, 1,
+ AC_DEFINE([HAVE_THREADSAFE], [1],
[Define if we have thread safe support])
fi
@@ -1093,32 +1135,35 @@ dnl ----------------------------------------------------------------------
dnl Check if they would like the HDF5 v1.4 compatibility functions
dnl compiled in
dnl
-AC_MSG_CHECKING(whether HDF5 v1.4 compatibility functions enabled)
-AC_ARG_ENABLE(hdf5v1_4,
- [ --enable-hdf5v1_4 Compile the HDF5 v1.4 compatibility interface
- [default=no]],
- HDF5_V1_4_COMPAT=$enableval)
+AC_MSG_CHECKING([whether HDF5 v1.4 compatibility functions enabled])
+AC_ARG_ENABLE([hdf5v1_4],
+ [AC_HELP_STRING([--enable-hdf5v1_4],
+ [Compile the HDF5 v1.4 compatibility
+ interface [default=no]])],
+ [HDF5_V1_4_COMPAT=$enableval])
if test "$HDF5_V1_4_COMPAT" = "yes"; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(WANT_H5_V1_4_COMPAT, 1,
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([WANT_H5_V1_4_COMPAT], [1],
[Define if the HDF5 v1.4 compatibility functions are to be compiled in])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
fi
dnl ----------------------------------------------------------------------
dnl Should the Stream Virtual File Driver be compiled in ?
dnl
-AC_MSG_CHECKING(for Stream Virtual File Driver support)
-AC_ARG_ENABLE(stream-vfd,
- [ --enable-stream-vfd Build the Stream Virtual File Driver [default=no]],
- STREAM_VFD=$enableval)
+AC_MSG_CHECKING([for Stream Virtual File Driver support])
+AC_ARG_ENABLE([stream-vfd],
+ [AC_HELP_STRING([--enable-stream-vfd],
+ [Build the Stream Virtual File Driver
+ [default=no]])],
+ [STREAM_VFD=$enableval])
if test "$STREAM_VFD" = "yes"; then
- AC_MSG_RESULT(yes)
- AC_CHECK_HEADERS(netinet/tcp.h sys/filio.h)
- AC_DEFINE(HAVE_STREAM, 1,
+ AC_MSG_RESULT([yes])
+ AC_CHECK_HEADERS([netinet/tcp.h sys/filio.h])
+ AC_DEFINE([HAVE_STREAM], [1],
[Define if the stream virtual file driver should be compiled])
dnl Check if 'socklen_t' available
@@ -1137,13 +1182,13 @@ if test "$STREAM_VFD" = "yes"; then
#endif
],
[socklen_t foo; return 0;],
- AC_DEFINE(HAVE_SOCKLEN_T, 1,
+ AC_DEFINE([HAVE_SOCKLEN_T], 1,
[Define if \`socklen_t' is defined])
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
)
else
- AC_MSG_RESULT(not configured)
+ AC_MSG_RESULT([not configured])
fi
dnl ----------------------------------------------------------------------
@@ -1242,7 +1287,7 @@ AC_MSG_RESULT(no))
dnl ----------------------------------------------------------------------
dnl Check for functions.
dnl
-AC_CHECK_FUNCS(compress2 difftime fork gethostname getpwuid getrusage)
+AC_CHECK_FUNCS(difftime fork gethostname getpwuid getrusage)
AC_CHECK_FUNCS(gettimeofday BSDgettimeofday longjmp setsysinfo sigaction)
AC_CHECK_FUNCS(signal snprintf vsnprintf strdup system waitpid)
@@ -1252,14 +1297,14 @@ dnl
AC_C_CONST
AC_C_INLINE
-AC_MSG_CHECKING(for __attribute__ extension)
+AC_MSG_CHECKING([for __attribute__ extension])
AC_TRY_COMPILE(,[int __attribute__((unused)) x],
AC_DEFINE(HAVE_ATTRIBUTE, 1,
[Define if the __attribute__(()) extension is present])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
-AC_MSG_CHECKING(for __FUNCTION__ extension)
+AC_MSG_CHECKING([for __FUNCTION__ extension])
AC_TRY_COMPILE(,[(void)__FUNCTION__],
AC_DEFINE(HAVE_FUNCTION, 1,
[Define if the compiler understand the __FUNCTION__ keyword])
@@ -1275,7 +1320,7 @@ dnl the dynamic library. The correct way to do it should be updating
dnl LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro.
dnl
AC_MSG_CHECKING(how to print long long)
-AC_CACHE_VAL(hdf5_cv_printf_ll,
+AC_CACHE_VAL([hdf5_cv_printf_ll],
LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
export LD_LIBRARY_PATH
@@ -1293,7 +1338,7 @@ int main(void)
exit(strcmp(s,"1099511627776"));
}
], break,,continue)
-done)
+done)dnl
AC_MSG_RESULT(%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u)
AC_DEFINE_UNQUOTED(PRINTF_LL_WIDTH, "$hdf5_cv_printf_ll",
@@ -1302,7 +1347,7 @@ AC_DEFINE_UNQUOTED(PRINTF_LL_WIDTH, "$hdf5_cv_printf_ll",
dnl ----------------------------------------------------------------------
dnl Check if malloc(0) returns valid pointer
dnl
-AC_MSG_CHECKING(if malloc of zero bytes returns valid pointer)
+AC_MSG_CHECKING([if malloc of zero bytes returns valid pointer])
AC_CACHE_VAL(hdf5_cv_malloc_works,
AC_TRY_RUN([
#if STDC_HEADERS
@@ -1322,19 +1367,36 @@ if test ${hdf5_cv_malloc_works} = "yes"; then
else
AC_MSG_RESULT(no)
fi
-
+
+dnl ----------------------------------------------------------------------
+dnl Checking to see if GPFS is available on this filesystem
+dnl
+AC_CHECK_HEADERS([gpfs.h],
+ AC_MSG_CHECKING([for GPFS support])
+ AC_TRY_COMPILE([#include <gpfs.h>],
+ [int fd = 0; gpfs_fcntl(fd, (void *)0);],
+ AC_DEFINE(HAVE_GPFS, 1,
+ [Define if we have GPFS support])
+ AC_MSG_RESULT(yes)
+ LIBS="$LIBS -lgpfs"
+ GPFS="yes",
+ AC_MSG_RESULT(no)
+ GPFS="no"))
+
dnl ----------------------------------------------------------------------
dnl Turn on debugging by setting compiler flags
dnl
AC_MSG_CHECKING(for debug flags)
-AC_ARG_ENABLE(debug,
- [ --enable-debug[=all] Turn on debugging in all packages. One may also
- specify a comma-separated list of package names
- without the leading H5 or the word no. The default
- is most packages.],
- DEBUG_PKG=$enableval)
-
-AC_SUBST(DEBUG_PKG)
+AC_ARG_ENABLE([debug],
+ [AC_HELP_STRING([--enable-debug=all],
+ [Turn on debugging in all packages. One may
+ also specify a comma-separated list of
+ package names without the leading H5 or
+ the word no. The default is most
+ packages.])],
+ [DEBUG_PKG=$enableval])
+
+AC_SUBST([DEBUG_PKG])
all_packages="ac,b,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z"
case "X-$DEBUG_PKG" in
X-|X-yes)
@@ -1366,18 +1428,20 @@ fi
dnl ----------------------------------------------------------------------
dnl Enable tracing of the API
dnl
-AC_MSG_CHECKING(for API tracing);
-AC_ARG_ENABLE(trace,
- [ --disable-trace Disable API tracing capability],
- TRACE=$enableval)
+AC_MSG_CHECKING([for API tracing])
+AC_ARG_ENABLE([trace],
+ [AC_HELP_STRING([--disable-trace],
+ [Disable API tracing capability])],
+ [TRACE=$enableval])
+
+AC_SUBST([TRACE_API])
-AC_SUBST(TRACE_API)
if test -z "$TRACE" -o "X$TRACE" = "Xyes"; then
- AC_MSG_RESULT(yes)
+ AC_MSG_RESULT([yes])
TRACE_API=yes
CPPFLAGS="$CPPFLAGS -DH5_DEBUG_API"
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
TRACE_API=no
CPPFLAGS="$CPPFLAGS -UH5_DEBUG_API"
fi
@@ -1439,7 +1503,7 @@ case "$CC_BASENAME" in
dnl The mpich compiler. Use mpirun from the same directory if it
dnl exists.
PARALLEL=mpicc
- AC_MSG_CHECKING(for mpirun)
+ AC_MSG_CHECKING([for mpirun])
dnl Find the path where mpicc is located.
cmd="`echo $CC | cut -f1 -d' '`"
@@ -1455,14 +1519,14 @@ case "$CC_BASENAME" in
dnl Is there an mpirun at that path?
if test -x $path/mpirun; then
- AC_MSG_RESULT($path/mpirun)
+ AC_MSG_RESULT([$path/mpirun])
RUNSERIAL="${RUNSERIAL:-none}"
if test -z "$RUNPARALLEL"; then
RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}"
fi
else
- AC_MSG_RESULT(none)
+ AC_MSG_RESULT([none])
fi
;;
@@ -1470,7 +1534,7 @@ case "$CC_BASENAME" in
dnl The LAM compiler. Use mpirun_lam or mpirun from the same directory
dnl if it exists.
PARALLEL=hcc
- AC_MSG_CHECKING(for mpirun_lam or mpirun)
+ AC_MSG_CHECKING([for mpirun_lam or mpirun])
dnl Find the path where hcc is located
cmd="`echo $CC | cut -f1 -d' '`"
@@ -1491,13 +1555,13 @@ case "$CC_BASENAME" in
else
cmd=mpirun
fi
- AC_MSG_RESULT($path/$cmd);
+ AC_MSG_RESULT([$path/$cmd])
RUNSERIAL="${RUNSERIAL:-none}"
if test -z "$RUNPARALLEL"; then
RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}"
fi
else
- AC_MSG_RESULT(none)
+ AC_MSG_RESULT([none])
fi
;;
@@ -1520,10 +1584,11 @@ dnl `--disable-parallel' but specifies a known parallel compiler (like mpicc
dnl or mpcc) then parallel support is enabled but configure doesn't search
dnl for any parallel header files or libraries.
dnl
-AC_ARG_ENABLE(parallel,
- [ --enable-parallel=TYPE Search for MPI-IO and MPI support files])
+AC_ARG_ENABLE([parallel],
+ [AC_HELP_STRING([--enable-parallel=TYPE],
+ [Search for MPI-IO and MPI support files])])
-AC_MSG_CHECKING(for parallel support files)
+AC_MSG_CHECKING([for parallel support files])
case "X-$enable_parallel" in
X-|X-no|X-none)
dnl Either we are not compiling for parallel or the header and
@@ -1929,8 +1994,8 @@ IF_YES_NO() {
else
while test $# -gt 0; do
if test "$1" != "yes"; then
- PRINT "No"
- return
+ PRINT "No"
+ return
fi
shift
done
@@ -1983,7 +2048,7 @@ else
PRINT "No"
fi
-PRINT "Features:"
+PRINT "Languages:"
PRINT_N " C++"
IF_YES_NO "$HDF_CXX"
@@ -1991,9 +2056,17 @@ IF_YES_NO "$HDF_CXX"
PRINT_N " Fortran"
IF_YES_NO "$HDF_FORTRAN"
+PRINT "Features:"
+
+PRINT_N " dmalloc"
+IF_YES_NO "$HAVE_DMALLOC"
+
PRINT_N " GASS"
IF_YES_NO "$GASS"
+PRINT_N " GPFS"
+IF_YES_NO "$GPFS"
+
PRINT_N " HDF5 v1.4 Compatibility"
IF_YES_NO "$HDF5_V1_4_COMPAT"
@@ -2027,6 +2100,3 @@ IF_ENABLED_DISABLED "$THREADSAFE"
PRINT_N " Zlib-compression"
IF_YES_NO "$HAVE_ZLIB"
-
-PRINT_N " dmalloc"
-IF_YES_NO "$HAVE_DMALLOC"