diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2322 |
1 files changed, 1164 insertions, 1158 deletions
diff --git a/configure.ac b/configure.ac index a2c4480..386ddbb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,64 +1,69 @@ -dnl Process this file with autoconf to produce configure. -dnl -dnl Copyright by The HDF Group. -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://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -dnl access to either file, you may request a copy from help@hdfgroup.org. - -dnl ---------------------------------------------------------------------- -dnl Initialize configure. -dnl +## Process this file with autoconf to produce configure. +## +## Copyright by The HDF Group. +## Copyright by the Board of Trustees of the University of Illinois. +## All rights reserved. +## +## This file is part of HDF5. The full HDF5 copyright notice, including +## terms governing use, modification, and redistribution, is contained in +## the files COPYING and Copyright.html. COPYING can be found at the root +## of the source code distribution tree; Copyright.html can be found at the +## root level of an installed copy of the electronic HDF5 document set and +## is linked from the top-level documents page. It can also be found at +## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +## access to either file, you may request a copy from help@hdfgroup.org. + +## ---------------------------------------------------------------------- +## Initialize configure. +## AC_REVISION($Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest $) -AC_PREREQ([2.53]) - -dnl AC_INIT takes the name of the package, the version number, and an -dnl email address to report bugs. AC_CONFIG_SRCDIR takes a unique file -dnl as its argument. -dnl -dnl NOTE: Don't forget to change the version number here when we do a -dnl release!!! -dnl +AC_PREREQ([2.69]) + +## AC_INIT takes the name of the package, the version number, and an +## email address to report bugs. AC_CONFIG_SRCDIR takes a unique file +## as its argument. +## +## NOTE: Do not forget to change the version number here when we do a +## release!!! +## AC_INIT([HDF5], [1.9.129], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) -AM_CONFIG_HEADER([src/H5config.h]) +AC_CONFIG_HEADER([src/H5config.h]) AC_CONFIG_AUX_DIR([bin]) AC_CONFIG_MACRO_DIR([m4]) -dnl AM_INIT_AUTOMAKE takes a list of options that should be applied to -dnl every Makefile.am when automake is run. +## AM_INIT_AUTOMAKE takes a list of options that should be applied to +## every Makefile.am when automake is run. AM_INIT_AUTOMAKE([foreign]) AM_SILENT_RULES([yes]) -dnl AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies -dnl for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE -dnl is *not* included here, these files will be rebuilt if out of date. -dnl This is a problem because if users try to build on a machine with -dnl the wrong versions of autoconf and automake, these files will be -dnl rebuilt with the wrong versions and bad things can happen. -dnl Also, CVS doesn't preserve dependencies between timestamps, so -dnl Makefiles will often think rebuilding needs to occur when it doesn't. -dnl Developers should './configure --enable-maintainer-mode' to turn on -dnl rebuild rules. +## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies +## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE +## is *not* included here, these files will be rebuilt if out of date. +## This is a problem because if users try to build on a machine with +## the wrong versions of autoconf and automake, these files will be +## rebuilt with the wrong versions and bad things can happen. +## Also, CVS doesn't preserve dependencies between timestamps, so +## Makefiles will often think rebuilding needs to occur when it doesn't. +## Developers should './configure --enable-maintainer-mode' to turn on +## rebuild rules. AM_MAINTAINER_MODE -dnl Run post processing on files created by configure. -dnl src/H5pubconf.h: -dnl Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all -dnl macro names. This avoid name conflict between HDF5 macro names and those -dnl generated by another software package that uses the HDF5 library. -dnl src/libhdf5.settings: -dnl Remove all lines begun with "#" which are generated by CONDITIONAL's of -dnl configure. -AC_OUTPUT_COMMANDS([ +## ---------------------------------------------------------------------- +## Set prefix default (install directory) to a directory in the build area. +## This allows multiple src-dir builds within one host. +AC_PREFIX_DEFAULT([`pwd`/hdf5]) + +## Run post processing on files created by configure. +## src/H5pubconf.h: +## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all +## macro names. This avoid name conflict between HDF5 macro names and those +## generated by another software package that uses the HDF5 library. +## src/libhdf5.settings: +## Remove all lines begun with "#" which are generated by CONDITIONAL's of +## configure. +AC_CONFIG_COMMANDS([pubconf], [ echo "creating src/H5pubconf.h" sed 's/#define /#define H5_/' <src/H5config.h |\ sed 's/#undef /#undef H5_/' >pubconf @@ -76,10 +81,10 @@ AC_OUTPUT_COMMANDS([ rm -f libhdf5.settings.TMP ]) -dnl It's possible to configure for a host other than the one on which -dnl configure is currently running by using the --host=foo flag. -dnl For machines on which HDF5 is often configured, it can be convenient -dnl to specify the name of the machine rather than its canonical type. +## It's possible to configure for a host other than the one on which +## configure is currently running by using the --host=foo flag. +## For machines on which HDF5 is often configured, it can be convenient +## to specify the name of the machine rather than its canonical type. case $host_alias in redstorm) host_alias=x86_64-redstorm-linux-gnu @@ -89,23 +94,23 @@ esac AC_CANONICAL_HOST AC_SUBST([CPPFLAGS]) -dnl H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but -dnl not exported to h5cc (or h5fc, etc.) +## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but +## not exported to h5cc (or h5fc, etc.) AC_SUBST([H5_CFLAGS]) AC_SUBST([H5_CPPFLAGS]) AC_SUBST([H5_FCFLAGS]) AC_SUBST([H5_CXXFLAGS]) AC_SUBST([H5_LDFLAGS]) -dnl AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, -dnl and WILL be exported to h5cc (or h5fc, etc) if set by configure. +## AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, +## and WILL be exported to h5cc (or h5fc, etc) if set by configure. AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_FCFLAGS]) AC_SUBST([AM_CXXFLAGS]) AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_LDFLAGS]) -dnl Make sure flags are set to something (otherwise macros may set them later). +## Make sure flags are set to something (otherwise macros may set them later). AM_CFLAGS="${AM_CFLAGS}" AM_CXXFLAGS="${AM_CXXFLAGS}" AM_FCFLAGS="${AM_FCFLAGS}" @@ -117,94 +122,89 @@ FCFLAGS="${FCFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" -dnl Configure may need to alter any of the *FLAGS variables in order for -dnl various checks to work correctly. Save the user's value here so it -dnl can be restored once all configure checks are complete. +## Configure may need to alter any of the *FLAGS variables in order for +## various checks to work correctly. Save the user's value here so it +## can be restored once all configure checks are complete. saved_user_CFLAGS="$CFLAGS" saved_user_CXXFLAGS="$CXXFLAGS" saved_user_FCFLAGS="$FCFLAGS" saved_user_LDFLAGS="$LDFLAGS" saved_user_CPPFLAGS="$CPPFLAGS" -dnl Different compilers may need default libraries. They are specified in -dnl the config/* files, so we put this statement here so that it'll be -dnl set by the code which follows... -dnl +## Different compilers may need default libraries. They are specified in +## the config/* files, so we put this statement here so that it'll be +## set by the code which follows... +## DEFAULT_LIBS="" -dnl Support F9X variable to define Fortran compiler if FC variable is -dnl not used. This should be deprecated in the future. +## Support F9X variable to define Fortran compiler if FC variable is +## not used. This should be deprecated in the future. if test "x" = "x$FC"; then FC=${F9X} fi -dnl ---------------------------------------------------------------------- -dnl Set prefix default (install directory) to a directory in the build area. -dnl This allows multiple src-dir builds within one host. -AC_PREFIX_DEFAULT([`pwd`/hdf5]) - -dnl ---------------------------------------------------------------------- -dnl Dump all shell variables values. -dnl +## ---------------------------------------------------------------------- +## Dump all shell variables values. +## AC_MSG_CHECKING([shell variables initial values]) set >&AS_MESSAGE_LOG_FD AC_MSG_RESULT([done]) -dnl Define all symbol variables used for configure summary. -dnl EXTERNAL_FILTERS equals all external filters. Default none. -dnl MPE: whether MPE option is enabled. Default no. -dnl STATIC_EXEC: whether static-exec is enabled. Default no. -dnl HDF_FORTRAN: whether Fortran is enabled. Default no. -dnl HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. -dnl FC: Fortran compiler. -dnl HDF_CXX: whether C++ is enabled. Default no. -dnl CXX: C++ compiler. -dnl HDF5_HL: whether high-level library is enabled. Default is yes. -dnl GPFS: whether gpfs is enabled. Default no. -dnl LARGEFILE: whether largefile support is enabled. Default yes. -dnl INSTRUMENT: whether INSTRUMENT is enabled. No default set here. -dnl CODESTACK: whether CODESTACK is enabled. Default no. -dnl HAVE_DMALLOC: whether system has dmalloc support. Default no. -dnl DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. -dnl THREADSAFE: whether THREADSAFE is enabled. Default no. -dnl STATIC_SHARED: whether static and/or shared libraries are requested. -dnl enable_shared: whether shared lib is enabled. -dnl enable_static: whether static lib is enabled. -dnl UNAME_INFO: System information. - -AC_SUBST(EXTERNAL_FILTERS) -AC_SUBST(MPE) MPE=no -AC_SUBST(STATIC_EXEC) STATIC_EXEC=no -AC_SUBST(HDF_FORTRAN) HDF_FORTRAN=no -AC_SUBST(HDF_FORTRAN2003) HDF_FORTRAN2003=no -AC_SUBST(FC) HDF_FORTRAN=no -AC_SUBST(FC2003) HDF_FORTRAN2003=no -AC_SUBST(HDF_CXX) HDF_CXX=no -AC_SUBST(CXX) HDF_CXX=no -AC_SUBST(HDF5_HL) HDF5_HL=yes -AC_SUBST(GPFS) GPFS=no -AC_SUBST(LARGEFILE) LARGEFILE=yes -AC_SUBST(INSTRUMENT) -AC_SUBST(CODESTACK) CODESTACK=no -AC_SUBST(HAVE_DMALLOC) HAVE_DMALLOC=no -AC_SUBST(DIRECT_VFD) DIRECT_VFD=no -AC_SUBST(THREADSAFE) THREADSAFE=no -AC_SUBST(STATIC_SHARED) -AC_SUBST(enable_shared) -AC_SUBST(enable_static) -AC_SUBST(UNAME_INFO) UNAME_INFO=`uname -a` - -dnl ---------------------------------------------------------------------- -dnl Some platforms have broken basename, and/or xargs programs. Check -dnl that it actually does what it's supposed to do. Catch this early -dnl since configure relies upon them heavily and there's no use continuing -dnl if it's broken. -dnl - -dnl Avoid depending upon Character Ranges. -dnl These are defined by autoconf. -dnl as_cr_letters='abcdefghijklmnopqrstuvwxyz' -dnl as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +## Define all symbol variables used for configure summary. +## EXTERNAL_FILTERS equals all external filters. Default none. +## MPE: whether MPE option is enabled. Default no. +## STATIC_EXEC: whether static-exec is enabled. Default no. +## HDF_FORTRAN: whether Fortran is enabled. Default no. +## HDF_FORTRAN2003: whether Fortran 2003 is enabled. Default no. +## FC: Fortran compiler. +## HDF_CXX: whether C++ is enabled. Default no. +## CXX: C++ compiler. +## HDF5_HL: whether high-level library is enabled. Default is yes. +## GPFS: whether gpfs is enabled. Default no. +## LARGEFILE: whether largefile support is enabled. Default yes. +## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. +## CODESTACK: whether CODESTACK is enabled. Default no. +## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. +## THREADSAFE: whether THREADSAFE is enabled. Default no. +## STATIC_SHARED: whether static and/or shared libraries are requested. +## enable_shared: whether shared lib is enabled. +## enable_static: whether static lib is enabled. +## UNAME_INFO: System information. + +AC_SUBST([EXTERNAL_FILTERS]) +AC_SUBST([MPE]) MPE=no +AC_SUBST([STATIC_EXEC]) STATIC_EXEC=no +AC_SUBST([HDF_FORTRAN]) HDF_FORTRAN=no +AC_SUBST([HDF_FORTRAN2003]) HDF_FORTRAN2003=no +AC_SUBST([FC]) HDF_FORTRAN=no +AC_SUBST([FC2003]) HDF_FORTRAN2003=no +AC_SUBST([HDF_CXX]) HDF_CXX=no +AC_SUBST([CXX]) HDF_CXX=no +AC_SUBST([HDF5_HL]) HDF5_HL=yes +AC_SUBST([GPFS]) GPFS=no +AC_SUBST([LARGEFILE]) LARGEFILE=yes +AC_SUBST([INSTRUMENT]) +AC_SUBST([CODESTACK]) CODESTACK=no +AC_SUBST([HAVE_DMALLOC]) HAVE_DMALLOC=no +AC_SUBST([DIRECT_VFD]) DIRECT_VFD=no +AC_SUBST([THREADSAFE]) THREADSAFE=no +AC_SUBST([STATIC_SHARED]) +AC_SUBST([enable_shared]) +AC_SUBST([enable_static]) +AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` + +## ---------------------------------------------------------------------- +## Some platforms have broken basename, and/or xargs programs. Check +## that it actually does what it's supposed to do. Catch this early +## since configure relies upon them heavily and there's no use continuing +## if it's broken. +## + +## Avoid depending upon Character Ranges. +## These are defined by autoconf. +## as_cr_letters='abcdefghijklmnopqrstuvwxyz' +## as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' AC_MSG_CHECKING([if basename works]) BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`" @@ -222,35 +222,35 @@ else AC_MSG_RESULT([yes]) fi -dnl ---------------------------------------------------------------------- -dnl Check that the cache file was build on the same host as what we're -dnl running on now. -dnl +## ---------------------------------------------------------------------- +## Check that the cache file was build on the same host as what we're +## running on now. +## 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 echo "The config.cache file was generated on $hdf5_cv_host but" echo "this is $host. Please remove that file and try again." - AC_MSG_ERROR(config.cache file is invalid) + AC_MSG_ERROR([config.cache file is invalid]) fi -dnl ---------------------------------------------------------------------- -dnl Source any special files that we need. These files normally aren't -dnl present but can be used by the maintainers to fine tune things like -dnl turning on debug or profiling flags for the compiler. The search order -dnl is: -dnl -dnl CPU-VENDOR-OS -dnl VENDOR-OS -dnl CPU-OS -dnl CPU-VENDOR -dnl OS -dnl VENDOR -dnl CPU -dnl -dnl If the `OS' ends with a version number then remove it. For instance, -dnl `freebsd3.1' would become `freebsd' +## ---------------------------------------------------------------------- +## Source any special files that we need. These files normally aren't +## present but can be used by the maintainers to fine tune things like +## turning on debug or profiling flags for the compiler. The search order +## is: +## +## CPU-VENDOR-OS +## VENDOR-OS +## CPU-OS +## CPU-VENDOR +## OS +## VENDOR +## CPU +## +## If the `OS' ends with a version number then remove it. For instance, +## `freebsd3.1' would become `freebsd' case $host_os in aix*) @@ -304,7 +304,7 @@ if test "X$host_config" != "Xnone"; then . $host_config fi -dnl Source any special site-specific file +## Source any special site-specific file hname="`hostname`" while test -n "$hname"; do file=$srcdir/config/site-specific/host-$hname @@ -320,39 +320,39 @@ while test -n "$hname"; do test "$hname_tmp" = "$hname" && break done -dnl ---------------------------------------------------------------------- -dnl Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so -dnl we need to add this in so configure works as intended. We will need to -dnl reset this value at the end of configure, to preserve the user's settings. +## ---------------------------------------------------------------------- +## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so +## we need to add this in so configure works as intended. We will need to +## reset this value at the end of configure, to preserve the user's settings. CFLAGS="${AM_CFLAGS} ${CFLAGS}" FCFLAGS="${AM_FCFLAGS} ${FCFLAGS}" CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}" LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" -dnl ---------------------------------------------------------------------- -dnl Enable dependency tracking unless the configure options or a -dnl site-specific file told us not to. This prevents configure from -dnl silently disabling dependencies for some compilers. -dnl +## ---------------------------------------------------------------------- +## Enable dependency tracking unless the configure options or a +## site-specific file told us not to. This prevents configure from +## silently disabling dependencies for some compilers. +## if test -z "${enable_dependency_tracking}"; then enable_dependency_tracking="yes" fi -dnl ---------------------------------------------------------------------- -dnl Check for programs. -dnl +## ---------------------------------------------------------------------- +## Check for programs. +## AC_PROG_CC CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" -dnl ---------------------------------------------------------------------------- -dnl Configure disallows unsupported combinations of options. However, users -dnl may want to override and build with unsupported combinations for their -dnl own use. They can use the --enable-unsupported configure flag, which -dnl ignores any errors from configure due to incompatible flags. +## ---------------------------------------------------------------------------- +## Configure disallows unsupported combinations of options. However, users +## may want to override and build with unsupported combinations for their +## own use. They can use the --enable-unsupported configure flag, which +## ignores any errors from configure due to incompatible flags. AC_MSG_CHECKING([if unsupported combinations of configure options are allowed]) AC_ARG_ENABLE([unsupported], - [AC_HELP_STRING([--enable-unsupported], + [AS_HELP_STRING([--enable-unsupported], [Allow unsupported combinations of configure options])], [ALLOW_UNSUPPORTED=$enableval]) @@ -367,13 +367,13 @@ case "X-$ALLOW_UNSUPPORTED" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like the Fortran interface compiled -dnl +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" AC_MSG_CHECKING([if Fortran interface enabled]) AC_ARG_ENABLE([fortran], - [AC_HELP_STRING([--enable-fortran], + [AS_HELP_STRING([--enable-fortran], [Compile the Fortran 77/90/95 interface [default=no]])], [HDF_FORTRAN=$enableval]) @@ -384,18 +384,18 @@ else fi -dnl ---------------------------------------------------------------------- -dnl Check if they would like the Fortran 2003 interface compiled -dnl +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## AC_MSG_CHECKING([if Fortran 2003 interface enabled]) AC_ARG_ENABLE([fortran2003], - [AC_HELP_STRING([--enable-fortran2003], + [AS_HELP_STRING([--enable-fortran2003], [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])], [HDF_FORTRAN2003=$enableval]) -dnl ---------------------------------------------------------------------- -dnl Check to make sure --enable-fortran is present if --enable-fortran2003 -dnl was specified +## ---------------------------------------------------------------------- +## Check to make sure --enable-fortran is present if --enable-fortran2003 +## was specified if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" @@ -409,20 +409,20 @@ FORTRAN_DEFAULT_REALisDBLE="no" if test "X$HDF_FORTRAN" = "Xyes"; then - AC_SUBST(FC) HDF_FORTRAN=yes + AC_SUBST([FC]) HDF_FORTRAN=yes AC_SUBST([HAVE_FORTRAN_2003]) HDF5_INTERFACES="$HDF5_INTERFACES fortran" - dnl -------------------------------------------------------------------- - dnl Default for FORTRAN 2003 compliant compilers - dnl + ## -------------------------------------------------------------------- + ## Default for FORTRAN 2003 compliant compilers + ## HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" - dnl -------------------------------------------------------------------- - dnl HDF5 integer variables for the H5fortran_types.f90 file. - dnl + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## AC_SUBST([R_LARGE]) AC_SUBST([R_INTEGER]) AC_SUBST([HADDR_T]) @@ -432,42 +432,42 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([SIZE_T]) AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) - dnl -------------------------------------------------------------------- - dnl General Fortran flags - dnl + ## -------------------------------------------------------------------- + ## General Fortran flags + ## AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" FCFLAGS="${FCFLAGS} ${FFLAGS}" - dnl -------------------------------------------------------------------- - dnl Fortran source extention - dnl + ## -------------------------------------------------------------------- + ## Fortran source extention + ## AC_FC_SRCEXT([f90]) AC_SUBST([F9XSUFFIXFLAG]) AC_SUBST([FSEARCH_DIRS]) - dnl -------------------------------------------------------------------- - dnl Check for a Fortran 9X compiler and how to include modules. - dnl + ## -------------------------------------------------------------------- + ## Check for a Fortran 9X compiler and how to include modules. + ## AC_PROG_FC([f90 pgf90 slf90 f95 g95 xlf95 efc ifort ftn],) AC_F9X_MODS - dnl It seems that libtool (as of Libtool 1.5.14) is trying to - dnl configure itself for Fortran 77. - dnl Tell it that our F77 compiler is $FC (actually a F9X compiler) + ## It seems that libtool (as of Libtool 1.5.14) is trying to + ## configure itself for Fortran 77. + ## Tell it that our F77 compiler is $FC (actually a F9X compiler) F77=$FC - dnl Change to the Fortran 90 language + ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) - dnl -------------------------------------------------------------------- - dnl Define wrappers for the C compiler to use Fortran function names - dnl + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## AC_FC_WRAPPERS - dnl -------------------------------------------------------------------- - dnl See if the compiler will support the "-I." option - dnl + ## -------------------------------------------------------------------- + ## See if the compiler will support the "-I." option + ## dnl AM_FCFLAGS_saved=$AM_FCFLAGS dnl AM_FCFLAGS="${AM_FCFLAGS} -I." @@ -479,20 +479,20 @@ if test "X$HDF_FORTRAN" = "Xyes"; then dnl AC_MSG_RESULT(no) dnl AM_FCFLAGS="$AM_FCFLAGS_saved") - dnl -------------------------------------------------------------------- - dnl See if the fortran compiler supports the intrinsic function "SIZEOF" + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) AC_TRY_RUN([ PROGRAM main i = sizeof(x) END PROGRAM - ], [AC_MSG_RESULT(yes) + ], [AC_MSG_RESULT([yes]) HAVE_SIZEOF="yes"], - AC_MSG_RESULT(no)) + [AC_MSG_RESULT([no])]) - dnl Check to see if -r8 was specified to determine if we need to - dnl compile the DOUBLE PRECISION interfaces. + ## Check to see if -r8 was specified to determine if we need to + ## compile the DOUBLE PRECISION interfaces. AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) @@ -518,14 +518,14 @@ if test "X$HDF_FORTRAN" = "Xyes"; then CALL h5t(d) END PROGRAM main ], - AC_MSG_RESULT(no), - [AC_MSG_RESULT(yes) - FORTRAN_DEFAULT_REALisDBLE="yes"]) + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + FORTRAN_DEFAULT_REALisDBLE="yes"]) if test "X$HDF_FORTRAN2003" = "Xyes"; then - dnl Checking if the compiler supports the required Fortran 2003 features and - dnl disable Fortran 2003 if it does not. + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) HAVE_FORTRAN_2003="no" @@ -541,43 +541,41 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ptr = C_LOC(ichr(1:1)) ])], - [AC_MSG_RESULT(yes) - HAVE_F2003_REQUIREMENTS=[yes]], - [AC_MSG_RESULT(no)]) - + [AC_MSG_RESULT([yes]) + HAVE_F2003_REQUIREMENTS=[yes]], + [AC_MSG_RESULT([no])]) if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - dnl echo $HAVE_FORTRAN_2003 + ## echo $HAVE_FORTRAN_2003 AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) else + ## echo $HAVE_FORTRAN_2003 HAVE_FORTRAN_2003="yes" - dnl echo $HAVE_FORTRAN_2003 fi - fi else FC="no" fi -dnl Change back to the C language +## Change back to the C language AC_LANG_POP(Fortran) AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF" = "Xyes"]) AM_CONDITIONAL([FORTRAN_2003_CONDITIONAL_F], [test "X$HAVE_FORTRAN_2003" = "Xyes"]) AM_CONDITIONAL([FORTRAN_DEFAULT_REALisDBLE_F], [test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Check if they would like the C++ interface compiled -dnl -dnl We need to check for a C++ compiler unconditionally, since -dnl AC_PROG_CXX defines some macros that Automake 1.9.x uses and will -dnl miss even if c++ is not enabled. +## ---------------------------------------------------------------------- +## Check if they would like the C++ interface compiled +## +## We need to check for a C++ compiler unconditionally, since +## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will +## miss even if c++ is not enabled. AC_PROG_CXX - AC_PROG_CXXCPP dnl this is checked for when AC_HEADER_STDC is done + AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done AC_MSG_CHECKING([if c++ interface enabled]) AC_ARG_ENABLE([cxx], - [AC_HELP_STRING([--enable-cxx], + [AS_HELP_STRING([--enable-cxx], [Compile the C++ interface [default=no]])], [HDF_CXX=$enableval]) @@ -585,7 +583,7 @@ if test "X$HDF_CXX" = "Xyes"; then echo "yes" HDF5_INTERFACES="$HDF5_INTERFACES c++" - dnl Change to the C++ language + ## Change to the C++ language AC_LANG_PUSH(C++) AC_MSG_CHECKING([if $CXX needs old style header files in includes]) @@ -694,41 +692,41 @@ else CXX="no" fi -dnl Change back to the C language +## Change back to the C language AC_LANG_POP(C++) -dnl ---------------------------------------------------------------------- -dnl Check if they have Perl installed on their system. We only need Perl -dnl if they're using a GNU compiler. -dnl +## ---------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## AC_SUBST([PERL]) PERL="" if test "X$GCC" = "Xyes"; then 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 +## ---------------------------------------------------------------------- +## Check which archiving tool to use. This needs to be done before +## the AM_PROG_LIBTOOL macro. +## if test -z "$AR"; then AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH]) fi AC_SUBST([AR]) -dnl Export the AR macro so that it will be placed in the libtool file -dnl correctly. +## Export the AR macro so that it will be placed in the libtool file +## correctly. export AR AC_PROG_MAKE_SET AC_PROG_INSTALL -dnl ---------------------------------------------------------------------- -dnl Check that the tr utility is working properly. +## ---------------------------------------------------------------------- +## Check that the tr utility is working properly. -AC_PATH_PROG(TR, tr) +AC_PATH_PROG([TR], [tr]) TR_TEST=`echo Test | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "` if test "X${TR_TEST}" != "XTEST"; then @@ -736,10 +734,10 @@ if test "X${TR_TEST}" != "XTEST"; then fi -dnl ---------------------------------------------------------------------- -dnl Check that time can be used with srcdir. This is okay on most systems, -dnl but seems to cause problems on Cygwin. -dnl The solution on Cygwin is not to record execution time for tests. +## ---------------------------------------------------------------------- +## Check that time can be used with srcdir. This is okay on most systems, +## but seems to cause problems on Cygwin. +## The solution on Cygwin is not to record execution time for tests. AC_MSG_CHECKING([if srcdir= and time commands work together]) AC_SUBST([TIME]) @@ -754,62 +752,62 @@ else fi -dnl The following variables are used to distinguish between building a -dnl serial and parallel library. -dnl -dnl HAVE_PARALLEL -- defined in H5config.h if we are building -dnl a parallel library even if configure wasn't -dnl able to find some header file or library that -dnl might be required. This is defined if the -dnl compiler looks like a parallel compiler (e.g., -dnl mpicc or mpcc) or if the user explicitly states -dnl that a parallel library is being built by supplying -dnl the `--enable-parallel' configure switch. -dnl -dnl PARALLEL -- This variable is set to a non-null value if -dnl configure thinks we're compiling a parallel -dnl version of the library. -dnl -dnl RUNSERIAL -- This is a command which will be prepended to -dnl the executable name to run the executable using -dnl a single process. For serial versions of the -dnl library this will normally be empty. For parallel -dnl versions it might be something like `mpiexec -n 1'. -dnl The value of this variable is substituted in *.in -dnl files. -dnl -dnl RUNPARALLEL -- This is a command which will be prepended to -dnl the executable name to run the executable on -dnl multiple processors. For the serial library the -dnl value will normally be the empty string. For -dnl parallel library it should be something like -dnl "mpiexec -n \$\${NPROCS:=6}" where NPROCS will -dnl eventually contain the number of processors on which -dnl to run the executable (the double dollarsigns are to -dnl protect the expansion until make executes the -dnl command). The value of this variable is -dnl substituted in *.in files. -dnl +## The following variables are used to distinguish between building a +## serial and parallel library. +## +## HAVE_PARALLEL -- defined in H5config.h if we are building +## a parallel library even if configure wasn't +## able to find some header file or library that +## might be required. This is defined if the +## compiler looks like a parallel compiler (e.g., +## mpicc or mpcc) or if the user explicitly states +## that a parallel library is being built by supplying +## the `--enable-parallel' configure switch. +## +## PARALLEL -- This variable is set to a non-null value if +## configure thinks we're compiling a parallel +## version of the library. +## +## RUNSERIAL -- This is a command which will be prepended to +## the executable name to run the executable using +## a single process. For serial versions of the +## library this will normally be empty. For parallel +## versions it might be something like `mpiexec -n 1'. +## The value of this variable is substituted in *.in +## files. +## +## RUNPARALLEL -- This is a command which will be prepended to +## the executable name to run the executable on +## multiple processors. For the serial library the +## value will normally be the empty string. For +## parallel library it should be something like +## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will +## eventually contain the number of processors on which +## to run the executable (the double dollarsigns are to +## protect the expansion until make executes the +## command). The value of this variable is +## substituted in *.in files. +## AC_SUBST([PARALLEL]) AC_SUBST([RUNSERIAL]) AC_SUBST([RUNPARALLEL]) AC_SUBST([TESTPARALLEL]) -dnl ---------------------------------------------------------------------- -dnl If the compiler is obviously a parallel compiler then we're building -dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, -dnl the name of the compiler might tell us how to run the resulting -dnl executable. For `mpicc' the executable should be run with `mpiexec' from -dnl the same directory as mpicc if it exists. -dnl +## ---------------------------------------------------------------------- +## If the compiler is obviously a parallel compiler then we're building +## a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, +## the name of the compiler might tell us how to run the resulting +## executable. For `mpicc' the executable should be run with `mpiexec' from +## the same directory as mpicc if it exists. +## case "$CC_BASENAME" in mpicc) - dnl The mpich compiler. Use mpiexec from the same directory if it - dnl exists. + ## The mpich compiler. Use mpiexec from the same directory if it + ## exists. PARALLEL=mpicc AC_MSG_CHECKING([for mpiexec]) - dnl Find the path where mpicc is located. + ## Find the path where mpicc is located. cmd="`echo $CC | cut -f1 -d' '`" if (echo $cmd | grep / >/dev/null); then path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" @@ -821,7 +819,7 @@ case "$CC_BASENAME" in done fi - dnl Is there an mpiexec at that path? + ## Is there an mpiexec at that path? if test -x $path/mpiexec; then AC_MSG_RESULT([$path/mpiexec]) RUNSERIAL="${RUNSERIAL:-none}" @@ -835,36 +833,36 @@ case "$CC_BASENAME" in ;; mpcc|mpcc_r) - dnl The IBM compiler + ## The IBM compiler PARALLEL="$CC_BASENAME" ;; *) - dnl Probably not a parallel compiler, but if `--enable-parallel' - dnl is defined below then we're still building a parallel hdf5. + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. ;; esac -dnl ---------------------------------------------------------------------- -dnl If the Fortran compiler is obviously a parallel compiler then we're -dnl building a parallel version of hdf5 and should define HAVE_PARALLEL. -dnl Furthermore, the name of the compiler might tell us how to run the -dnl resulting executable. For `mpif90' the executable should be run with -dnl `mpiexec' from the same directory as mpif90 if it exists. -dnl +## ---------------------------------------------------------------------- +## If the Fortran compiler is obviously a parallel compiler then we're +## building a parallel version of hdf5 and should define HAVE_PARALLEL. +## Furthermore, the name of the compiler might tell us how to run the +## resulting executable. For `mpif90' the executable should be run with +## `mpiexec' from the same directory as mpif90 if it exists. +## if test "X$HDF_FORTRAN" = "Xyes" ; then - dnl Change to the Fortran 90 language + ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) case "$FC" in *mpif90*) - dnl The Fortran mpich compiler. Use mpiexec from the same directory - dnl if it exists. + ## The Fortran mpich compiler. Use mpiexec from the same directory + ## if it exists. PARALLEL=mpif90 AC_MSG_CHECKING([for mpiexec]) - dnl Find the path where mpif90 is located. + ## Find the path where mpif90 is located. cmd=`echo $FC |cut -f1 -d' '` if (echo $cmd |grep / >/dev/null); then path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" @@ -876,7 +874,7 @@ if test "X$HDF_FORTRAN" = "Xyes" ; then done fi - dnl Is there an mpiexec at that path? + ## Is there an mpiexec at that path? if test -x $path/mpiexec; then AC_MSG_RESULT([$path/mpiexec]) RUNSERIAL="${RUNSERIAL:-none}" @@ -890,23 +888,23 @@ if test "X$HDF_FORTRAN" = "Xyes" ; then ;; *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - dnl The IBM compiler + ## The IBM compiler PARALLEL="$FC" ;; *) - dnl Probably not a parallel compiler, but if `--enable-parallel' - dnl is defined below then we're still building a parallel hdf5. + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. ;; esac - dnl Change to the C language + ## Change to the C language AC_LANG_POP(Fortran) fi -dnl ----------------------------------------------------------------------------- -dnl If shared libraries are being used with parallel, disable them, unless the -dnl user explicity enables them via the '--enable-shared' option. +## ----------------------------------------------------------------------------- +## If shared libraries are being used with parallel, disable them, unless the +## user explicity enables them via the '--enable-shared' option. if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then echo ' shared libraries disabled in parallel' @@ -920,17 +918,17 @@ elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then echo ' shared libraries explicitly enabled by user' fi -dnl ---------------------------------------------------------------------- -dnl Fortran libraries are not currently supported on Mac. Disable them. -dnl (this is overridable with --enable-unsupported). -dnl +## ---------------------------------------------------------------------- +## Fortran libraries are not currently supported on Mac. Disable them. +## (this is overridable with --enable-unsupported). +## AC_SUBST([H5_FORTRAN_SHARED]) H5_FORTRAN_SHARED="no" if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then AC_MSG_CHECKING([if shared Fortran libraries are supported]) H5_FORTRAN_SHARED="yes" - dnl Disable fortran shared libraries on Mac. (MAM - 03/30/11) + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) case "`uname`" in Darwin*) @@ -939,7 +937,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then ;; esac - dnl Report results of check(s) + ## Report results of check(s) if test "X${H5_FORTRAN_SHARED}" = "Xno"; then AC_MSG_RESULT([no]) @@ -961,23 +959,23 @@ fi AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Disable C++ shared libraries if +DD64 flag is detected. -dnl +## ---------------------------------------------------------------------- +## Disable C++ shared libraries if +DD64 flag is detected. +## AC_SUBST([H5_CXX_SHARED]) H5_CXX_SHARED="no" if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then AC_MSG_CHECKING([if shared C++ libraries are supported]) H5_CXX_SHARED="yes" - dnl Disable C++ shared libraries if DD64 flag is being used. + ## Disable C++ shared libraries if DD64 flag is being used. if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then H5_CXX_SHARED="no" CHECK_WARN="Shared C++ libraries not currently supported with +DD64 flag." fi - dnl Report results of check(s) + ## Report results of check(s) if test "X${H5_CXX_SHARED}" = "Xno"; then AC_MSG_RESULT([no]) @@ -998,20 +996,20 @@ fi AM_CONDITIONAL([CXX_SHARED_CONDITIONAL], [test "X$H5_CXX_SHARED" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect -dnl these versions and add option "-Mx,28,0x8" to the compiler to avoid -dnl the problem if optimization is enabled. -dnl +## ---------------------------------------------------------------------- +## pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect +## these versions and add option "-Mx,28,0x8" to the compiler to avoid +## the problem if optimization is enabled. +## if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then echo 'adding compiler flag to avoid optimization problem in pgcc' CC="${CC-cc} -Mx,28,0x8" fi -dnl ---------------------------------------------------------------------- -dnl Shared libraries are not currently supported under Cygwin, so configure -dnl disables them unless --enable-unsupported has been supplied by the user. +## ---------------------------------------------------------------------- +## Shared libraries are not currently supported under Cygwin, so configure +## disables them unless --enable-unsupported has been supplied by the user. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then case "`uname`" in @@ -1026,32 +1024,32 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then esac fi -dnl ---------------------------------------------------------------------- -dnl Windows won't create DLLs without the following macro. -dnl +## ---------------------------------------------------------------------- +## Windows won't create DLLs without the following macro. +## AC_LIBTOOL_WIN32_DLL -dnl ---------------------------------------------------------------------- -dnl Create libtool. If shared/static libraries are going to be enabled -dnl or disabled, it should happen before these macros. +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL -dnl ---------------------------------------------------------------------- -dnl Check if we should install only statically linked executables. -dnl This check needs to occur after libtool is initialized because -dnl we check a libtool cache value and may issue a warning based -dnl on its result. +## ---------------------------------------------------------------------- +## Check if we should install only statically linked executables. +## This check needs to occur after libtool is initialized because +## we check a libtool cache value and may issue a warning based +## on its result. AC_MSG_CHECKING([if we should install only statically linked executables]) AC_ARG_ENABLE([static_exec], - [AC_HELP_STRING([--enable-static-exec], + [AS_HELP_STRING([--enable-static-exec], [Install only statically linked executables [default=no]])], [STATIC_EXEC=$enableval]) if test "X$STATIC_EXEC" = "Xyes"; then echo "yes" - dnl Issue a warning if -static flag is not supported. + ## Issue a warning if -static flag is not supported. if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." fi @@ -1063,22 +1061,22 @@ fi AC_SUBST([LT_STATIC_EXEC]) -dnl Fix up the INSTALL macro if it's a relative path. We want the -dnl full-path to the binary instead. +## Fix up the INSTALL macro if it's a relative path. We want the +## full-path to the binary instead. case "$INSTALL" in *install-sh*) INSTALL='\${top_srcdir}/bin/install-sh -c' ;; esac -dnl ---------------------------------------------------------------------- -dnl Some users have reported problems with libtool's use of '-Wl,-rpath' to -dnl link shared libraries in nondefault directories. Allow users to -dnl disable embedding the rpath information in the executables and to -dnl instead solely rely on the information in LD_LIBRARY_PATH. +## ---------------------------------------------------------------------- +## Some users have reported problems with libtool's use of '-Wl,-rpath' to +## link shared libraries in nondefault directories. Allow users to +## disable embedding the rpath information in the executables and to +## instead solely rely on the information in LD_LIBRARY_PATH. AC_MSG_CHECKING([if -Wl,-rpath should be used to link shared libs in nondefault directories]) AC_ARG_ENABLE([sharedlib-rpath], - [AC_HELP_STRING([--disable-sharedlib-rpath], + [AS_HELP_STRING([--disable-sharedlib-rpath], [Disable use of the '=Wl,-rpath' linker option])], [RPATH=$enableval]) @@ -1100,14 +1098,14 @@ esac AC_MSG_CHECKING([make]) -dnl ---------------------------------------------------------------------- -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 +## ---------------------------------------------------------------------- +## Sometimes makes think the `.PATH:' appearing before the first rule +## with an action should override the `all' default target. So we have +## to decide what the proper syntax is. +## AC_MSG_CHECKING([how make searches directories]) while true; do #for break - # The most common method is `VPATH=DIR1 DIR2 ...' + ## The most common method is `VPATH=DIR1 DIR2 ...' cat >maketest <<EOF VPATH=$srcdir/config $srcdir/src $srcdir/bin .c.o: @@ -1125,8 +1123,8 @@ EOF break fi - dnl The second most common method is like above except with the - dnl directories separated by colons. + ## The second most common method is like above except with the + ## directories separated by colons. cat >maketest <<EOF VPATH=$srcdir/config:$srcdir/src:$srcdir/bin .c.o: @@ -1144,7 +1142,7 @@ EOF break fi - dnl pmake uses the construct `.PATH: DIR1 DIR2 + ## pmake uses the construct `.PATH: DIR1 DIR2 cat >maketest <<EOF .PATH: $srcdir/config $srcdir/src $srcdir/bin .c.o: @@ -1162,7 +1160,7 @@ EOF break fi - dnl No way for make to search directories + ## No way for make to search directories SEARCH_RULE='## SEARCH DISABLED: ' SEARCH_SEP=' ' AC_MSG_RESULT([it doesn't]) @@ -1173,13 +1171,13 @@ EOF done rm maketest -dnl ---------------------------------------------------------------------- -dnl pmake will throw an error if variables are undefined in a Makefile. -dnl These errors can be changed to warnings using the -V flag. -dnl -AC_SUBST(AM_MAKEFLAGS) AM_MAKEFLAGS="" +## ---------------------------------------------------------------------- +## pmake will throw an error if variables are undefined in a Makefile. +## These errors can be changed to warnings using the -V flag. +## +AC_SUBST([AM_MAKEFLAGS]) AM_MAKEFLAGS="" -dnl Don't run test if MAKE is defined but is the empty string +## Don't run test if MAKE is defined but is the empty string if test -n "${MAKE-make}"; then AC_MSG_CHECKING([whether make will build with undefined variables]) @@ -1199,13 +1197,13 @@ EOF rm maketest fi -dnl ---------------------------------------------------------------------- -dnl Production flags? Save the value in $CONFIG_MODE so we have it for -dnl the record. -dnl -AC_MSG_CHECKING(for production mode) -AC_ARG_ENABLE(production, - [AC_HELP_STRING([--enable-production], +## ---------------------------------------------------------------------- +## Production flags? Save the value in $CONFIG_MODE so we have it for +## the record. +## +AC_MSG_CHECKING([for production mode]) +AC_ARG_ENABLE([production], + [AS_HELP_STRING([--enable-production], [Determines how to run the compiler.])]) case "X-$enable_production" in @@ -1243,45 +1241,45 @@ case "X-$enable_production" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check for system libraries. -dnl +## ---------------------------------------------------------------------- +## Check for system libraries. +## AC_CHECK_LIB([m], [ceil]) if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - dnl ...for Solaris + ## ...for Solaris AC_CHECK_LIB([socket], [socket]) AC_CHECK_LIB([nsl], [xdr_int]) fi -dnl AC_CHECK_LIB([coug], [main]) dnl ...for ASCI/Red +dnl AC_CHECK_LIB([coug], [main]) ## ...for ASCI/Red -dnl ---------------------------------------------------------------------- -dnl Check for system header files. -dnl +## ---------------------------------------------------------------------- +## Check for system header files. +## AC_HEADER_STDC AC_HEADER_TIME -dnl ---------------------------------------------------------------------- -dnl Check for these two functions before the time headers are checked -dnl for, otherwise they are not detected correctly on Solaris (the -dnl configure test will fail due to multiply-defined symbols). -dnl -AC_CHECK_FUNCS(difftime) -AC_CHECK_FUNCS(gettimeofday, [have_gettime="yes"], [have_gettime="no"]) +## ---------------------------------------------------------------------- +## Check for these two functions before the time headers are checked +## for, otherwise they are not detected correctly on Solaris (the +## configure test will fail due to multiply-defined symbols). +## +AC_CHECK_FUNCS([difftime]) +AC_CHECK_FUNCS([gettimeofday], [have_gettime="yes"], [have_gettime="no"]) AC_SEARCH_LIBS([clock_gettime], [rt posix4]) AC_CHECK_FUNCS([clock_gettime],[have_clock_gettime="yes"],[have_clock_gettime="no"]) -dnl Unix +## 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]) -dnl Darwin +## Darwin AC_CHECK_HEADERS([mach/mach_time.h]) -dnl Windows +## Windows case "`uname`" in CYGWIN*) AC_CHECK_HEADERS([io.h sys/timeb.h]) @@ -1297,71 +1295,71 @@ esac case "$host" in alpha*-dec*-osf*) - dnl The <sys/sysinfo.h> and <sys/proc.h> are needed on the DEC - 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. + ## The <sys/sysinfo.h> and <sys/proc.h> are needed on the DEC + ## Alpha to turn off UAC fixing. We do *not* attempt to + ## locate these files on other systems because there are too + ## many problems with including them. AC_CHECK_HEADERS([sys/sysinfo.h sys/proc.h]) ;; mips*-sgi*-irix*) - dnl The <sys/fpu.h> is needed on the SGI machines to turn off - dnl denormalized floating-point values going to zero. We do *not* - dnl attempt to dnl locate these files on other systems because there - dnl may be problems with including them. + ## The <sys/fpu.h> is needed on the SGI machines to turn off + ## denormalized floating-point values going to zero. We do *not* + ## attempt to locate these files on other systems because there + ## may be problems with including them. AC_CHECK_HEADERS([sys/fpu.h]) AC_CHECK_FUNCS([get_fpc_csr]) ;; esac -dnl ---------------------------------------------------------------------- -dnl Some platforms require that all symbols are resolved when a library -dnl is linked. We can use the -no-undefined flag to tell libtool that -dnl it will be able to build shared libraries on these architectures, -dnl as it will not do so by default. -dnl +## ---------------------------------------------------------------------- +## Some platforms require that all symbols are resolved when a library +## is linked. We can use the -no-undefined flag to tell libtool that +## it will be able to build shared libraries on these architectures, +## as it will not do so by default. +## if test "X${enable_shared}" = "Xyes"; then AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared libraries]) case "`uname`" in CYGWIN*|MINGW*|AIX*) - dnl Add in the -no-undefined flag to LDFLAGS for libtool. + ## Add in the -no-undefined flag to LDFLAGS for libtool. AC_MSG_RESULT([yes]) H5_LDFLAGS="$H5_LDFLAGS -no-undefined" ;; *) - dnl Don't add in anything. + ## Don't add in anything. AC_MSG_RESULT([no]) ;; esac fi -dnl ---------------------------------------------------------------------- -dnl Test for Largefile support. -dnl +## ---------------------------------------------------------------------- +## Test for Largefile support. +## AC_MSG_CHECKING([if configure should try to set up large file support]) AC_ARG_ENABLE([largefile], - [AC_HELP_STRING([--disable-largefile], + [AS_HELP_STRING([--disable-largefile], [omit support for large files])]) -dnl If largefile support is enabled, then set up appropriate compiler options. +## If largefile support is enabled, then set up appropriate compiler options. if test "$enable_largefile" != no; then - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) - dnl Check for needed compiler options. This check is pulled drectly - dnl from autoconf's AC_SYS_LARGEFILE macro, as of Autoconf v2.65. + ## Check for needed compiler options. This check is pulled drectly + ## from autoconf's AC_SYS_LARGEFILE macro, as of Autoconf v2.65. AC_CACHE_CHECK([for special C compiler options needed for large files], ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) - AC_COMPILE_IFELSE([], [break]) - CC="$CC -n32" - AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) - break + ## IRIX 6.2 and later do not support large files by default, + ## so use the C compiler's -n32 option if that helps. + AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) + AC_COMPILE_IFELSE([], [break]) + CC="$CC -n32" + AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -1370,29 +1368,29 @@ if test "$enable_largefile" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - dnl Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines - dnl that might need to be set for largefile support to behave - dnl correctly. This macro is defined in acsite.m4 and overrides - dnl the version provided by Autoconf (as of v2.65). The custom - dnl macro additionally adds the appropriate defines to AM_CPPFLAGS - dnl so that later configure checks have them visible. + ## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines + ## that might need to be set for largefile support to behave + ## correctly. This macro is defined in acsite.m4 and overrides + ## the version provided by Autoconf (as of v2.65). The custom + ## macro additionally adds the appropriate defines to AM_CPPFLAGS + ## so that later configure checks have them visible. - dnl Check for _FILE_OFFSET_BITS - _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, - ac_cv_sys_file_offset_bits, + ## Check for _FILE_OFFSET_BITS + _AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64], + [ac_cv_sys_file_offset_bits], [Number of bits in a file offset, on hosts where this is settable.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - dnl Check for _LARGE_FILES - if test $ac_cv_sys_file_offset_bits = unknown; then - _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, + ## Check for _LARGE_FILES + if test "$ac_cv_sys_file_offset_bits" = unknown; then + _AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1], + [ac_cv_sys_large_files], [Define for large files, on AIX-style hosts.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi - dnl Now actually test to see if we can create large files after we've - dnl checked for any needed defines. + ## Now actually test to see if we can create large files after we've + ## checked for any needed defines. AC_MSG_CHECKING([if large (64-bit) files are supported on this system.]) AC_CACHE_VAL([hdf5_cv_have_lfs], [AC_TRY_RUN([ @@ -1424,52 +1422,52 @@ if test "$enable_largefile" != no; then else LARGEFILE="no" - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Add necessary defines for Linux Systems. -dnl +## ---------------------------------------------------------------------- +## Add necessary defines for Linux Systems. +## case "$host_cpu-$host_vendor-$host_os" in *linux*) - dnl If largefile support is enabled, then make available various - dnl LFS-related routines using the following _LARGEFILE*_SOURCE macros. + ## If largefile support is enabled, then make available various + ## LFS-related routines using the following _LARGEFILE*_SOURCE macros. if test "X$LARGEFILE" != "Xno"; then AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" 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>. - dnl This flag was removed from h5cc as of 2009-10-17 when it was found - dnl that the flag broke compiling netCDF-4 code with h5cc, but kept in - dnl H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen - dnl is used only by H5_debug_mask which is used only when debugging in - dnl H5_init_library (all in H5.c). When the flag was removed this was - dnl the only compile failure noted. - dnl This was originally defined as _POSIX_SOURCE which was updated to - dnl _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - dnl functionality so clock_gettime and CLOCK_MONOTONIC are defined - dnl correctly. - dnl POSIX feature information can be found in the gcc manual at: - dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## Add POSIX support on Linux systems, so <features.h> defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in <stdio.h>. + ## This flag was removed from h5cc as of 2009-10-17 when it was found + ## that the flag broke compiling netCDF-4 code with h5cc, but kept in + ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen + ## is used only by H5_debug_mask which is used only when debugging in + ## H5_init_library (all in H5.c). When the flag was removed this was + ## the only compile failure noted. + ## This was originally defined as _POSIX_SOURCE which was updated to + ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX + ## functionality so clock_gettime and CLOCK_MONOTONIC are defined + ## correctly. + ## POSIX feature information can be found in the gcc manual at: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_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> - dnl Linking to the bsd-compat library is required as per the gcc manual: - dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - dnl however, we do not do this since it breaks the big test on some - dnl older platforms. + ## Also add BSD support on Linux systems, so <features.h> defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in <string.h> and snprintf & vsnprintf defined + ## correctly in <stdio.h> + ## Linking to the bsd-compat library is required as per the gcc manual: + ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html + ## however, we do not do this since it breaks the big test on some + ## older platforms. AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" ;; esac -dnl Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible -dnl for configure checks. -dnl Note: Both will be restored by the end of configure. +## Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible +## for configure checks. +## Note: Both will be restored by the end of configure. CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" @@ -1477,7 +1475,7 @@ AC_TRY_COMPILE([#include <sys/types.h>], [off64_t n = 0;], [AC_CHECK_FUNCS([lseek64 fseeko64 ftello64 ftruncate64])], [AC_MSG_RESULT([skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined])]) -AC_CHECK_FUNCS(fseeko ftello) +AC_CHECK_FUNCS([fseeko ftello]) AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/stat.h>], @@ -1485,13 +1483,19 @@ AC_TRY_COMPILE([ [AC_CHECK_FUNCS([stat64 fstat64])], [AC_MSG_RESULT([skipping test for stat64() and fstat64()])]) -dnl ---------------------------------------------------------------------- -dnl Data types and their sizes. -dnl +## ---------------------------------------------------------------------- +## Data types and their sizes. +## AC_TYPE_OFF_T -AC_CHECK_TYPE([size_t], [unsigned long]) -AC_CHECK_TYPE([ssize_t], [long]) -AC_CHECK_TYPE([ptrdiff_t], [long]) +AC_CHECK_TYPE([size_t], [], + [AC_DEFINE_UNQUOTED([size_t], [unsigned long], + [Define to `unsigned long' if <sys/types.h> does not define.])]) +AC_CHECK_TYPE([ssize_t], [], + [AC_DEFINE_UNQUOTED([ssize_t], [long], + [Define to `long' if <sys/types.h> does not define.])]) +AC_CHECK_TYPE([ptrdiff_t], [], + [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], + [Define to `long' if <sys/types.h> does not define.])]) AC_C_BIGENDIAN AC_CHECK_SIZEOF([char], [1]) AC_CHECK_SIZEOF([short], [2]) @@ -1504,10 +1508,10 @@ AC_CHECK_SIZEOF([float], [4]) AC_CHECK_SIZEOF([double], [8]) AC_CHECK_SIZEOF([long double], [8]) -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl Posix.1g types (C9x) +## Posix.1g types (C9x) cat >>confdefs.h <<\EOF #include <sys/types.h> EOF @@ -1518,33 +1522,33 @@ 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( [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]) @@ -1556,12 +1560,12 @@ EOF AC_CHECK_SIZEOF([off_t], [4]) AC_CHECK_SIZEOF([off64_t], [8]) -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl ---------------------------------------------------------------------- -dnl Check if the dev_t type is a scalar type (must come after the check for -dnl sys/types.h) +## ---------------------------------------------------------------------- +## Check if the dev_t type is a scalar type (must come after the check for +## sys/types.h) AC_MSG_CHECKING([if dev_t is scalar]) AC_TRY_COMPILE([ #ifdef HAVE_SYS_TYPES_H @@ -1571,15 +1575,15 @@ AC_TRY_COMPILE([ [dev_t d1, d2; if(d1==d2) return 0;], AC_DEFINE([DEV_T_IS_SCALAR], [1], [Define if `dev_t' is a scalar]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) ) -dnl ---------------------------------------------------------------------- -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 +## ---------------------------------------------------------------------- +## Fake --with-xxx option to allow us to create a help message for the +## following --with-xxx options which can take either a =DIR or =INC,LIB +## specifier. +## AC_ARG_WITH([fnord], [ For the following --with-xxx options, you can specify where the header @@ -1591,31 +1595,31 @@ AC_ARG_WITH([fnord], include/ and lib/ subdirectories ]) -dnl ---------------------------------------------------------------------- -dnl Is the dmalloc present? It has a header file `dmalloc.h' and a library -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 +## ---------------------------------------------------------------------- +## Is the dmalloc present? It has a header file `dmalloc.h' and a library +## `-ldmalloc' and their locations might be specified with the `--with-dmalloc' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## AC_ARG_WITH([dmalloc], - [AC_HELP_STRING([--with-dmalloc=DIR], + [AS_HELP_STRING([--with-dmalloc=DIR], [Use dmalloc memory debugging aid [default=no]])],, - withval=no) + [withval=no]) case $withval in yes) HAVE_DMALLOC="yes" - AC_CHECK_HEADERS(dmalloc.h) - AC_CHECK_LIB(dmalloc, dmalloc_shutdown,, unset HAVE_DMALLOC) + AC_CHECK_HEADERS([dmalloc.h]) + AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC]) if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR(couldn't find dmalloc library) + AC_MSG_ERROR([couldn't find dmalloc library]) fi ;; no) HAVE_DMALLOC="no" - AC_MSG_CHECKING(for dmalloc library) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for dmalloc library]) + AC_MSG_RESULT([suppressed]) ;; *) HAVE_DMALLOC="yes" @@ -1632,8 +1636,8 @@ case $withval in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$dmalloc_inc" = "X/usr/include"; then dmalloc_inc="" fi @@ -1651,33 +1655,33 @@ case $withval in AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc" fi - AC_CHECK_HEADERS(dmalloc.h,,CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS") + AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"]) if test -n "$dmalloc_lib"; then LDFLAGS="$LDFLAGS -L$dmalloc_lib" AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib" fi - AC_CHECK_LIB(dmalloc, dmalloc_shutdown,, LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC) + AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC]) if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then - AC_MSG_ERROR(couldn't find dmalloc library) + AC_MSG_ERROR([couldn't find dmalloc library]) fi ;; esac -dnl ---------------------------------------------------------------------- -dnl Is the GNU zlib present? It has a header file `zlib.h' and a library -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_SUBST(USE_FILTER_DEFLATE) USE_FILTER_DEFLATE="no" +## ---------------------------------------------------------------------- +## Is the GNU zlib present? It has a header file `zlib.h' and a library +## `-lz' and their locations might be specified with the `--with-zlib' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## +AC_SUBST([USE_FILTER_DEFLATE]) USE_FILTER_DEFLATE="no" AC_ARG_WITH([zlib], - [AC_HELP_STRING([--with-zlib=DIR], + [AS_HELP_STRING([--with-zlib=DIR], [Use zlib library for external deflate I/O filter [default=yes]])],, - withval=yes) + [withval=yes]) case $withval in yes) @@ -1710,8 +1714,8 @@ case $withval in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$zlib_inc" = "X/usr/include"; then zlib_inc="" fi @@ -1752,7 +1756,7 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled]) USE_FILTER_DEFLATE="yes" - dnl Add "deflate" to external filter list + ## Add "deflate" to external filter list if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi @@ -1760,18 +1764,18 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" fi -dnl ---------------------------------------------------------------------- -dnl Is the szlib present? It has a header file `szlib.h' and a library -dnl `-lsz' and their locations might be specified with the `--with-szlib' -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_SUBST(USE_FILTER_SZIP) USE_FILTER_SZIP="no" +## ---------------------------------------------------------------------- +## Is the szlib present? It has a header file `szlib.h' and a library +## `-lsz' and their locations might be specified with the `--with-szlib' +## command-line switch. The value is an include path and/or a library path. +## If the library path is specified then it must be preceded by a comma. +## +AC_SUBST([USE_FILTER_SZIP]) USE_FILTER_SZIP="no" AC_ARG_WITH([szlib], - [AC_HELP_STRING([--with-szlib=DIR], + [AS_HELP_STRING([--with-szlib=DIR], [Use szlib library for external szlib I/O filter [default=no]])],, - withval=no) + [withval=no]) case $withval in yes) @@ -1803,8 +1807,8 @@ case $withval in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$szlib_inc" = "X/usr/include"; then szlib_inc="" fi @@ -1841,12 +1845,12 @@ case $withval in esac if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - dnl SZLIB library is available. Check if it can encode + ## SZLIB library is available. Check if it can encode AC_MSG_CHECKING([for szlib encoder]) - dnl Set LD_LIBRARY_PATH so encoder test can find the library and run. - dnl Also add LL_PATH substitution to Makefiles so they can use the - dnl path as well, for testing examples. + ## Set LD_LIBRARY_PATH so encoder test can find the library and run. + ## Also add LL_PATH substitution to Makefiles so they can use the + ## path as well, for testing examples. if test -z "$LD_LIBRARY_PATH"; then export LD_LIBRARY_PATH="$szlib_lib" else @@ -1869,7 +1873,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then } ], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]) - AC_DEFINE(HAVE_FILTER_SZIP, 1, + AC_DEFINE([HAVE_FILTER_SZIP], [1], [Define if support for szip filter is enabled]) USE_FILTER_SZIP="yes" @@ -1880,7 +1884,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then AC_MSG_RESULT([no]) fi - dnl Add "szip" to external filter list + ## Add "szip" to external filter list if test ${hdf5_cv_szlib_can_encode} = "yes"; then if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," @@ -1898,21 +1902,21 @@ fi AM_CONDITIONAL([BUILD_SHARED_SZIP_CONDITIONAL], [test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"]) -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl ---------------------------------------------------------------------- -dnl Is the Pthreads library present? It has a header file `pthread.h' and -dnl a library `-lpthread' and their locations might be specified with the -dnl `--with-pthread' command-line switch. The value is an include path -dnl and/or a library path. If the library path is specified then it must -dnl be preceded by a comma. -dnl +## ---------------------------------------------------------------------- +## Is the Pthreads library present? It has a header file `pthread.h' and +## a library `-lpthread' and their locations might be specified with the +## `--with-pthread' command-line switch. The value is an include path +## and/or a library path. If the library path is specified then it must +## be preceded by a comma. +## AC_SUBST([PTHREAD]) PTHREAD=yes AC_ARG_WITH([pthread], - [AC_HELP_STRING([--with-pthread=DIR], + [AS_HELP_STRING([--with-pthread=DIR], [Use the Pthreads library [default=no]])],, - withval=no) + [withval=no]) case "$withval" in yes) @@ -1938,8 +1942,8 @@ case "$withval" in ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$pthread_inc" = "X/usr/include"; then pthread_inc="" fi @@ -1971,21 +1975,21 @@ case "$withval" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Enable thread-safe version of library. It requires Pthreads support. -dnl +## ---------------------------------------------------------------------- +## Enable thread-safe version of library. It requires Pthreads support. +## AC_MSG_CHECKING([for thread safe support]) AC_ARG_ENABLE([threadsafe], - [AC_HELP_STRING([--enable-threadsafe], + [AS_HELP_STRING([--enable-threadsafe], [Enable thread safe capability])], - THREADSAFE=$enableval) + [THREADSAFE=$enableval]) case "X-$THREADSAFE" in X-|X-no) AC_MSG_RESULT([no]) ;; X-yes) - dnl Check that we can link a simple Pthread program. + ## Check that we can link a simple Pthread program. AC_TRY_LINK(, [pthread_self()], [AC_MSG_RESULT([yes]); THREADSAFE=yes], [AC_MSG_ERROR([needed pthread library not available])]) @@ -2000,38 +2004,38 @@ if test "X$THREADSAFE" = "Xyes"; then AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support]) fi -dnl ---------------------------------------------------------------------- -dnl Check for MONOTONIC_TIMER support (used in clock_gettime). This has -dnl to be done after any POSIX/BSD defines to ensure that the test gets -dnl the correct POSIX level on linux. -AC_CHECK_DECL(CLOCK_MONOTONIC,[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include <time.h>]]) +## ---------------------------------------------------------------------- +## Check for MONOTONIC_TIMER support (used in clock_gettime). This has +## to be done after any POSIX/BSD defines to ensure that the test gets +## the correct POSIX level on linux. +AC_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include <time.h>]]) -dnl ---------------------------------------------------------------------- -dnl How does one figure out the local time zone? Anyone know of a -dnl Posix way to do this? -dnl +## ---------------------------------------------------------------------- +## How does one figure out the local time zone? Anyone know of a +## Posix way to do this? +## -dnl First check if `struct tm' has a `tm_gmtoff' member. +## First check if `struct tm' has a `tm_gmtoff' member. AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_TRY_COMPILE([ -#include <sys/time.h> -#include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], -AC_DEFINE([HAVE_TM_GMTOFF], [1], + #include <sys/time.h> + #include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], + [AC_DEFINE([HAVE_TM_GMTOFF], [1], [Define if `tm_gmtoff' is a member of `struct tm']) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl check if `struct tm' has a `__tm_gmtoff' member. +## check if `struct tm' has a `__tm_gmtoff' member. AC_MSG_CHECKING([for __tm_gmtoff in struct tm]) AC_TRY_COMPILE([ -#include <sys/time.h> -#include <time.h>], [struct tm tm; tm.__tm_gmtoff=0;], -AC_DEFINE([HAVE___TM_GMTOFF], [1], + #include <sys/time.h> + #include <time.h>], [struct tm tm; tm.__tm_gmtoff=0;], + [AC_DEFINE([HAVE___TM_GMTOFF], [1], [Define if `__tm_gmtoff' is a member of `struct tm']) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl Check whether the global variable `timezone' is defined. +## Check whether the global variable `timezone' is defined. AC_MSG_CHECKING([for global timezone variable]) case "`uname`" in @@ -2042,27 +2046,27 @@ case "`uname`" in AC_TRY_LINK([ #include <sys/time.h> #include <time.h>], [timezone=0;], - AC_DEFINE([HAVE_TIMEZONE], [1], + [AC_DEFINE([HAVE_TIMEZONE], [1], [Define if `timezone' is a global variable]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) ;; esac -dnl Check whether `struct timezone' is defined. +## Check whether `struct timezone' is defined. AC_STRUCT_TIMEZONE AC_MSG_CHECKING([for struct timezone]) AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/time.h> -#include <time.h>], [struct timezone tz; tz.tz_minuteswest=0;], -AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], + #include <sys/types.h> + #include <sys/time.h> + #include <time.h>], [struct timezone tz; tz.tz_minuteswest=0;], + [AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], [Define if `struct timezone' is defined]) -have_struct_tz="yes" -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + have_struct_tz="yes" + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl If gettimeofday() is going to be used, make sure it uses the timezone struct +## If gettimeofday() is going to be used, make sure it uses the timezone struct if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then AC_MSG_CHECKING(whether gettimeofday() gives timezone) @@ -2081,7 +2085,9 @@ if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) exit(1); else exit (0); - }], [hdf5_cv_gettimeofday_tz=yes], [hdf5_cv_gettimeofday_tz=no],)]) + }], + [hdf5_cv_gettimeofday_tz=yes], + [hdf5_cv_gettimeofday_tz=no])]) if test ${hdf5_cv_gettimeofday_tz} = "yes"; then AC_MSG_RESULT([yes]) @@ -2092,78 +2098,78 @@ if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then fi fi -dnl ---------------------------------------------------------------------- -dnl Does the struct stat have the st_blocks field? This field is not Posix. -dnl +## ---------------------------------------------------------------------- +## Does the struct stat have the st_blocks field? This field is not Posix. +## AC_MSG_CHECKING([for st_blocks in struct stat]) AC_TRY_COMPILE([ -#include <sys/stat.h>],[struct stat sb; sb.st_blocks=0;], -AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], + #include <sys/stat.h>],[struct stat sb; sb.st_blocks=0;], + [AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], [Define if `struct stat' has the `st_blocks' field]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) -dnl ---------------------------------------------------------------------- -dnl How do we figure out the width of a tty in characters? -dnl -AC_CHECK_FUNCS(_getvideoconfig gettextinfo GetConsoleScreenBufferInfo) -AC_CHECK_FUNCS(_scrsize ioctl) +## ---------------------------------------------------------------------- +## How do we figure out the width of a tty in characters? +## +AC_CHECK_FUNCS([_getvideoconfig gettextinfo GetConsoleScreenBufferInfo]) +AC_CHECK_FUNCS([_scrsize ioctl]) AC_MSG_CHECKING([for struct videoconfig]) AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;], -AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], + [AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], [Define if `struct videoconfig' is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for struct text_info]) AC_TRY_COMPILE(, [struct text_info w; w.screenwidth=0;], -AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], + [AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], [Define if `struct text_info' is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for TIOCGWINSZ]) AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGWINSZ;], -AC_DEFINE([HAVE_TIOCGWINSZ], [1], + [AC_DEFINE([HAVE_TIOCGWINSZ], [1], [Define if the ioctl TIOGWINSZ is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for TIOCGETD]) AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGETD;], -AC_DEFINE([HAVE_TIOCGETD], [1], + [AC_DEFINE([HAVE_TIOCGETD], [1], [Define if the ioctl TIOCGETD is defined]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) - - -dnl ---------------------------------------------------------------------- -dnl Check for functions. -dnl -AC_CHECK_FUNCS(alarm BSDgettimeofday fork frexpf frexpl) -AC_CHECK_FUNCS(gethostname getpwuid getrusage lstat) -AC_CHECK_FUNCS(rand_r random setsysinfo) -AC_CHECK_FUNCS(signal longjmp setjmp siglongjmp sigsetjmp sigprocmask) -AC_CHECK_FUNCS(snprintf srandom strdup symlink system) -AC_CHECK_FUNCS(tmpfile vasprintf waitpid) - -dnl Check for vsnprintf() separately, so we can detect situations where it -dnl doesn't return the correct size for formatted strings that are too large -dnl for the buffer provided -AC_CHECK_FUNCS(vsnprintf, - - dnl Check if vsnprintf() returns correct size for strings that don't fit - dnl into the size allowed. If vsnprintf() works correctly on this platform, - dnl it should return a value of 42 for the test below - dnl - dnl Note that vsnprintf fails in two different ways: - dnl - In IRIX64, calls to vnsprintf() with a formatted string that - dnl is larger than the buffer size allowed incorrectly - dnl return the size of the buffer minus one. - dnl - In HP/UX, calls to vsnprintf() with a formatted string that - dnl is larger than the buffer size allowed incorrectly - dnl return (-1) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + + +## ---------------------------------------------------------------------- +## Check for functions. +## +AC_CHECK_FUNCS([alarm BSDgettimeofday fork frexpf frexpl]) +AC_CHECK_FUNCS([gethostname getpwuid getrusage lstat]) +AC_CHECK_FUNCS([rand_r random setsysinfo]) +AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask]) +AC_CHECK_FUNCS([snprintf srandom strdup symlink system]) +AC_CHECK_FUNCS([tmpfile vasprintf waitpid]) + +## Check for vsnprintf() separately, so we can detect situations where it +## doesn't return the correct size for formatted strings that are too large +## for the buffer provided +AC_CHECK_FUNCS([vsnprintf], + + ## Check if vsnprintf() returns correct size for strings that don't fit + ## into the size allowed. If vsnprintf() works correctly on this platform, + ## it should return a value of 42 for the test below + ## + ## Note that vsnprintf fails in two different ways: + ## - In IRIX64, calls to vnsprintf() with a formatted string that + ## is larger than the buffer size allowed incorrectly + ## return the size of the buffer minus one. + ## - In HP/UX, calls to vsnprintf() with a formatted string that + ## is larger than the buffer size allowed incorrectly + ## return (-1) AC_MSG_CHECKING([if vsnprintf returns correct value]) AC_CACHE_VAL([hdf5_cv_vsnprintf_works], @@ -2200,11 +2206,11 @@ int main(void) fi ,) -dnl ---------------------------------------------------------------------- -dnl Check that a lone colon can be used as an argument -dnl This is not true on Cray X1, which interprets a lone colon as a -dnl system command. -dnl +## ---------------------------------------------------------------------- +## Check that a lone colon can be used as an argument +## This is not true on Cray X1, which interprets a lone colon as a +## system command. +## AC_CACHE_CHECK([if lone colon can be used as an argument], [hdf5_cv_lone_colon], [ @@ -2224,33 +2230,33 @@ AC_CACHE_CHECK([if lone colon can be used as an argument], fi ]) -AC_SUBST(H5_LONE_COLON) H5_LONE_COLON="$hdf5_cv_lone_colon" +AC_SUBST([H5_LONE_COLON]) H5_LONE_COLON="$hdf5_cv_lone_colon" -dnl ---------------------------------------------------------------------- -dnl Check compiler characteristics -dnl +## ---------------------------------------------------------------------- +## Check compiler characteristics +## AC_C_CONST AC_C_INLINE AC_MSG_CHECKING([for __attribute__ extension]) AC_TRY_COMPILE(,[int __attribute__((unused)) x], - AC_DEFINE([HAVE_ATTRIBUTE], [1], + [AC_DEFINE([HAVE_ATTRIBUTE], [1], [Define if the __attribute__(()) extension is present]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for __func__ extension]) AC_TRY_COMPILE(,[ const char *fname = __func__; ], - AC_DEFINE([HAVE_C99_FUNC], [1], + [AC_DEFINE([HAVE_C99_FUNC], [1], [Define if the compiler understands the __func__ keyword]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for __FUNCTION__ extension]) AC_TRY_COMPILE(,[ const char *fname = __FUNCTION__; ], - AC_DEFINE([HAVE_FUNCTION], [1], + [AC_DEFINE([HAVE_FUNCTION], [1], [Define if the compiler understands the __FUNCTION__ keyword]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for C99 designated initialization support]) AC_TRY_COMPILE(,[ typedef struct { @@ -2261,66 +2267,66 @@ AC_TRY_COMPILE(,[ } u; } di_struct_t; di_struct_t x = {0, { .d = 0.0}}; ], - AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1], + [AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1], [Define if the compiler understands C99 designated initialization of structs and unions]) - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no])) - -dnl ---------------------------------------------------------------------- -dnl Try to figure out how to print `long long'. Some machines use `%lld' -dnl and others use `%qd'. There may be more! The final `l' is a -dnl default in case none of the others work. -dnl Need to patch up LD_LIBRARY_PATH so that the execution can find all -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_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +## ---------------------------------------------------------------------- +## Try to figure out how to print `long long'. Some machines use `%lld' +## and others use `%qd'. There may be more! The final `l' is a +## default in case none of the others work. +## Need to patch up LD_LIBRARY_PATH so that the execution can find all +## the dynamic library. The correct way to do it should be updating +## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. +## 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 $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH for hdf5_cv_printf_ll in l ll L q unknown; do AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> -int main(void) -{ + int main(void) + { char *s = malloc(128); long long x = (long long)1048576 * (long long)1048576; sprintf(s,"%${hdf5_cv_printf_ll}d",x); exit(strcmp(s,"1099511627776")); -} - ], break,,continue) -done)dnl + } + ], [break],,[continue]) +done]) AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u]) AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], [Width for printf() for type `long long' or `__int64', use `ll']) -dnl ---------------------------------------------------------------------- -dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) -dnl is supported on this system -dnl +## ---------------------------------------------------------------------- +## Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) +## is supported on this system +## AC_MSG_CHECKING([Threads support system scope]) AC_CACHE_VAL([hdf5_cv_system_scope_threads], -[AC_TRY_RUN([ -#if STDC_HEADERS -#include <stdlib.h> -#include <pthread.h> -#endif + [AC_TRY_RUN([ + #if STDC_HEADERS + #include <stdlib.h> + #include <pthread.h> + #endif -int main(void) -{ - pthread_attr_t attribute; - int ret; + int main(void) + { + pthread_attr_t attribute; + int ret; - pthread_attr_init(&attribute); - ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - exit(ret==0 ? 0 : 1); -} -], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no],)]) + pthread_attr_init(&attribute); + ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); + exit(ret==0 ? 0 : 1); + } + ], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no],)]) if test ${hdf5_cv_system_scope_threads} = "yes"; then AC_DEFINE([SYSTEM_SCOPE_THREADS], [1], @@ -2330,11 +2336,11 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Checking to see if GPFS is available on this filesystem -dnl +## ---------------------------------------------------------------------- +## Checking to see if GPFS is available on this filesystem +## AC_ARG_ENABLE([gpfs], - [AC_HELP_STRING([--enable-gpfs], + [AS_HELP_STRING([--enable-gpfs], [Enable GPFS hints for the MPI/POSIX file driver. [default=no]])],, [enableval=no]) @@ -2342,16 +2348,16 @@ AC_ARG_ENABLE([gpfs], case "X-$enableval" in X-yes) AC_CHECK_HEADERS([gpfs.h], - AC_MSG_CHECKING([for GPFS support]) + [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")) + [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"])]) ;; X-no|*) AC_MSG_CHECKING([for gpfs]) @@ -2359,13 +2365,13 @@ case "X-$enableval" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Turn on debugging by setting compiler flags -dnl This must come after the enable-production since it depends on production. -dnl -AC_MSG_CHECKING(for debug flags) +## ---------------------------------------------------------------------- +## Turn on debugging by setting compiler flags +## This must come after the enable-production since it depends on production. +## +AC_MSG_CHECKING([for debug flags]) AC_ARG_ENABLE([debug], - [AC_HELP_STRING([--enable-debug=all], + [AS_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 @@ -2374,7 +2380,7 @@ AC_ARG_ENABLE([debug], ])], [DEBUG_PKG=$enableval]) -dnl Default to no if producton is enabled +## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then DEBUG_PKG=no @@ -2412,12 +2418,12 @@ if test -n "$DEBUG_PKG"; then done fi -dnl ---------------------------------------------------------------------- -dnl Check if they would like the function stack support compiled in -dnl +## ---------------------------------------------------------------------- +## Check if they would like the function stack support compiled in +## AC_MSG_CHECKING([whether function stack tracking is enabled]) AC_ARG_ENABLE([codestack], - [AC_HELP_STRING([--enable-codestack], + [AS_HELP_STRING([--enable-codestack], [Enable the function stack tracing (for developer debugging).])], [CODESTACK=$enableval]) @@ -2434,12 +2440,12 @@ case "X-$CODESTACK" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like the metadata trace file code compiled in -dnl +## ---------------------------------------------------------------------- +## Check if they would like the metadata trace file code compiled in +## AC_MSG_CHECKING([whether metadata trace file code is enabled]) AC_ARG_ENABLE([metadata-trace-file], - [AC_HELP_STRING([--enable-metadata-trace-file], + [AS_HELP_STRING([--enable-metadata-trace-file], [Enable metadata trace file collection.])], [METADATATRACEFILE=$enableval]) @@ -2456,19 +2462,19 @@ case "X-$METADATATRACEFILE" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Enable tracing of the API -dnl This must come after the enable-debug since it depends on debug. -dnl +## ---------------------------------------------------------------------- +## Enable tracing of the API +## This must come after the enable-debug since it depends on debug. +## AC_SUBST([TRACE_API]) AC_MSG_CHECKING([for API tracing]); AC_ARG_ENABLE([trace], - [AC_HELP_STRING([--enable-trace], + [AS_HELP_STRING([--enable-trace], [Enable API tracing capability. Default=no if debug is disabled.])], - TRACE=$enableval) + [TRACE=$enableval]) -dnl Default to no if debug is disabled +## Default to no if debug is disabled if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then TRACE=no @@ -2490,19 +2496,19 @@ case "X-$TRACE" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Enable instrumenting of the library's internal operations -dnl This must come after the enable-debug since it depends on debug. -dnl +## ---------------------------------------------------------------------- +## Enable instrumenting of the library's internal operations +## This must come after the enable-debug since it depends on debug. +## AC_SUBST([INSTRUMENT_LIBRARY]) AC_MSG_CHECKING([for instrumented library]); AC_ARG_ENABLE([instrument], - [AC_HELP_STRING([--enable-instrument], + [AS_HELP_STRING([--enable-instrument], [Enable library instrumentation of optimization tracing. Default=no if debug is disabled.])], - INSTRUMENT=$enableval) + [INSTRUMENT=$enableval]) -dnl Default to no if debug is disabled +## Default to no if debug is disabled if test "X-$INSTRUMENT" = X- ; then if test -z "$DEBUG_PKG" ; then INSTRUMENT=no @@ -2524,14 +2530,14 @@ case "X-$INSTRUMENT" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like to securely clear file buffers before they are -dnl written. -dnl +## ---------------------------------------------------------------------- +## Check if they would like to securely clear file buffers before they are +## written. +## AC_SUBST([CLEARFILEBUF]) AC_MSG_CHECKING([whether to clear file buffers]) AC_ARG_ENABLE([clear-file-buffers], - [AC_HELP_STRING([--enable-clear-file-buffers], + [AS_HELP_STRING([--enable-clear-file-buffers], [Securely clear file buffers before writing to file. Default=yes.])], [CLEARFILEBUF=$enableval]) @@ -2550,16 +2556,16 @@ case "X-$CLEARFILEBUF" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Check if they would like to use a memory checking tool (like valgrind's -dnl 'memcheck' tool, or Rational Purify, etc) and the library should be -dnl more scrupulous with it's memory operations. Enabling this also -dnl disables the library's free space manager code. -dnl +## ---------------------------------------------------------------------- +## Check if they would like to use a memory checking tool (like valgrind's +## 'memcheck' tool, or Rational Purify, etc) and the library should be +## more scrupulous with it's memory operations. Enabling this also +## disables the library's free space manager code. +## AC_SUBST([USINGMEMCHECKER]) AC_MSG_CHECKING([whether a memory checking tool will be used]) AC_ARG_ENABLE([using-memchecker], - [AC_HELP_STRING([--enable-using-memchecker], + [AS_HELP_STRING([--enable-using-memchecker], [Enable this option if a memory allocation and/or bounds checking tool will be used on the HDF5 library. Enabling this causes the library to be @@ -2583,41 +2589,41 @@ case "X-$USINGMEMCHECKER" in ;; esac -dnl Checkpoint the cache +## Checkpoint the cache AC_CACHE_SAVE -dnl What header files and libraries do we have to look for for parallel -dnl support? For the most part, search paths are already specified with -dnl CPPFLAGS and LDFLAGS or are known to the compiler. If the user says -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 +## What header files and libraries do we have to look for for parallel +## support? For the most part, search paths are already specified with +## CPPFLAGS and LDFLAGS or are known to the compiler. If the user says +## `--disable-parallel' but specifies a known parallel compiler (like mpicc +## or mpcc) then parallel support is enabled but configure doesn't search +## for any parallel header files or libraries. +## AC_ARG_ENABLE([parallel], - [AC_HELP_STRING([--enable-parallel], + [AS_HELP_STRING([--enable-parallel], [Search for MPI-IO and MPI support files])]) -dnl The --enable-parallel flag is not compatible with --enable-cxx. -dnl If the user tried to specify both flags, throw an error, unless -dnl they also provided the --enable-unsupported flag. +## The --enable-parallel flag is not compatible with --enable-cxx. +## If the user tried to specify both flags, throw an error, unless +## they also provided the --enable-unsupported flag. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then AC_MSG_ERROR([--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) fi fi -dnl --enable-parallel is also incompatible with --enable-threadsafe, unless -dnl --enable-unsupported has been specified on the configure line. +## --enable-parallel is also incompatible with --enable-threadsafe, unless +## --enable-unsupported has been specified on the configure line. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then AC_MSG_ERROR([--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error.]) fi fi -dnl It's possible to build in parallel by specifying a parallel compiler -dnl without using the --enable-parallel flag. This isn't allowed with -dnl C++ or threadsafe, either, unless the --enable-unsupported flag -dnl has also been specified. +## It's possible to build in parallel by specifying a parallel compiler +## without using the --enable-parallel flag. This isn't allowed with +## C++ or threadsafe, either, unless the --enable-unsupported flag +## has also been specified. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then AC_MSG_ERROR([An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error.]) @@ -2630,49 +2636,49 @@ fi 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 - dnl library files and locations are known to the compiler (this is - dnl the case for a correct installation of mpicc for instance). + ## Either we are not compiling for parallel or the header and + ## library files and locations are known to the compiler (this is + ## the case for a correct installation of mpicc for instance). AC_MSG_RESULT([skipped]) ;; X-yes) - dnl We want to compile a parallel library with a compiler that - dnl may already know how to link with MPI and MPI-IO. + ## We want to compile a parallel library with a compiler that + ## may already know how to link with MPI and MPI-IO. AC_MSG_RESULT([provided by compiler]) PARALLEL=yes - dnl Try link a simple MPI program. If fail, try again with -lmpi and - dnl -lmpich. - AC_TRY_LINK(, MPI_Init(),, \ - AC_CHECK_LIB(mpi, MPI_Init,, \ - AC_CHECK_LIB(mpich, MPI_Init,, PARALLEL=no))) + ## Try link a simple MPI program. If fail, try again with -lmpi and + ## -lmpich. + AC_TRY_LINK(, [MPI_Init()],, + [AC_CHECK_LIB([mpi], [MPI_Init],, + [AC_CHECK_LIB([mpich], [MPI_Init],, [PARALLEL=no])])]) - dnl Then try link a simple MPI-IO program. If fail, try again with - dnl -lmpio. + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. if test "X$PARALLEL" = "Xyes"; then AC_TRY_LINK(, [MPI_File_open()],, [AC_CHECK_LIB([mpio], [MPI_File_open],, [PARALLEL=no])]) fi if test "X$HDF_FORTRAN" = "Xyes"; then - dnl Change to the Fortran 90 language + ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) - dnl Try link a simple MPI program. If fail, try again with -lmpi. + ## Try link a simple MPI program. If fail, try again with -lmpi. AC_LINK_IFELSE([ program main include 'mpif.h' integer:: ierr call mpi_file_open( ierr ) end],, - AC_CHECK_LIB(mpi, [ + [AC_CHECK_LIB([mpi], [ include 'mpif.h' integer:: ierr - call mpi_file_open( ierr )],, PARALLEL=no)) + call mpi_file_open( ierr )],, [PARALLEL=no])]) - dnl Then try link a simple MPI-IO program. If fail, try again with - dnl -lmpio. + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. if test "X$PARALLEL" = "Xyes"; then AC_LINK_IFELSE([ program main @@ -2680,21 +2686,21 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - AC_CHECK_LIB(mpio, [ + [AC_CHECK_LIB([mpio], [ include 'mpif.h' integer:: ierr - call mpi_file_open( ierr )],, PARALLEL=no)) + call mpi_file_open( ierr )],, [PARALLEL=no])]) fi - dnl Change to the C language + ## Change to the C language AC_LANG_POP(Fortran) fi - dnl Set RUNPARALLEL to mpiexec if not set yet. - dnl Check for building on Cray if RUNPARALLEL is not yet set by checking - dnl for 'aprun' command (which is the parallel job launcher, like mpiexec). + ## Set RUNPARALLEL to mpiexec if not set yet. + ## Check for building on Cray if RUNPARALLEL is not yet set by checking + ## for 'aprun' command (which is the parallel job launcher, like mpiexec). if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then - dnl Find the path where aprun is located. + ## Find the path where aprun is located. for path in `echo $PATH | ${TR} ":" " "`; do if test -x $path/aprun; then RUNPARALLEL="aprun -q -n \$\${NPROCS:=6}" @@ -2703,7 +2709,7 @@ case "X-$enable_parallel" in done fi - dnl Set RUNPARALLEL to mpiexec if not set yet. + ## Set RUNPARALLEL to mpiexec if not set yet. if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" fi @@ -2715,39 +2721,39 @@ case "X-$enable_parallel" in ;; esac -dnl ---------------------------------------------------------------------- -dnl Print some other parallel information and do some sanity checks. -dnl +## ---------------------------------------------------------------------- +## Print some other parallel information and do some sanity checks. +## AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" if test -n "$PARALLEL"; then - dnl The 'testpar' directory should participate in the build + ## The 'testpar' directory should participate in the build TESTPARALLEL=testpar - dnl We are building a parallel library + ## We are building a parallel library AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) - dnl Display what we found about running programs + ## Display what we found about running programs AC_MSG_CHECKING([prefix for running on one processor]) AC_MSG_RESULT([$RUNSERIAL]) AC_MSG_CHECKING([prefix for running in parallel]) AC_MSG_RESULT([$RUNPARALLEL]) - dnl Check that we can link a simple MPI and MPI-IO application + ## Check that we can link a simple MPI and MPI-IO application AC_MSG_CHECKING([whether a simple MPI-IO program can be linked]) AC_TRY_LINK(, [MPI_Init(); MPI_File_open();], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO application])) + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO application])]) - dnl There *must* be some way to run in parallel even if it's just the - dnl word `none'. + ## There *must* be some way to run in parallel even if it's just the + ## word `none'. if test -z "$RUNPARALLEL"; then AC_MSG_ERROR([no way to run a parallel program]) fi - dnl If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with - dnl the empty string. + ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with + ## the empty string. if test "X$RUNSERIAL" = "Xnone"; then RUNSERIAL="" fi @@ -2777,15 +2783,15 @@ if test -n "$PARALLEL"; then ) fi - dnl -------------------------------------------------------------------- - dnl Do we want MPE instrumentation feature on? - dnl - dnl This must be done after enable-parallel is checked since it depends - dnl on a mpich compiler. - dnl + ## -------------------------------------------------------------------- + ## Do we want MPE instrumentation feature on? + ## + ## This must be done after enable-parallel is checked since it depends + ## on a mpich compiler. + ## MPE=yes AC_ARG_WITH([mpe], - [AC_HELP_STRING([--with-mpe=DIR], + [AS_HELP_STRING([--with-mpe=DIR], [Use MPE instrumentation [default=no]])],, [withval=no]) @@ -2814,8 +2820,8 @@ if test -n "$PARALLEL"; then ;; esac - dnl Trying to include -I/usr/include and -L/usr/lib is redundant and - dnl can mess some compilers up. + ## Trying to include -I/usr/include and -L/usr/lib is redundant and + ## can mess some compilers up. if test "X$mpe_inc" = "X/usr/include"; then mpe_inc="" fi @@ -2854,12 +2860,12 @@ if test -n "$PARALLEL"; then AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support]) fi - dnl ---------------------------------------------------------------------- - dnl Set the flag to indicate that the MPI_File_set_size() function - dnl works with files over 2GB, unless it's already set in the cache. - dnl (This flag should be set for all machines, except for ASCI Red, where - dnl the cache value is set in it's config file) - dnl + ## ---------------------------------------------------------------------- + ## Set the flag to indicate that the MPI_File_set_size() function + ## works with files over 2GB, unless it's already set in the cache. + ## (This flag should be set for all machines, except for ASCI Red, where + ## the cache value is set in it's config file) + ## AC_MSG_CHECKING([if MPI_File_set_size works for files over 2GB]) AC_CACHE_VAL([hdf5_cv_mpi_file_set_size_big], [hdf5_cv_mpi_file_set_size_big=yes]) @@ -2871,15 +2877,15 @@ if test -n "$PARALLEL"; then AC_MSG_RESULT([no]) fi - dnl ---------------------------------------------------------------------- - dnl Set the flag to indicate that the MPI_File_get_size() function - dnl works. The default is enabled unless the user knows the function - dnl doesn't work on the system and disables it. (This flag should be set - dnl for all machines except for SGI Altix Propack 4 where the function - dnl doesn't return correct file size.) - dnl + ## ---------------------------------------------------------------------- + ## Set the flag to indicate that the MPI_File_get_size() function + ## works. The default is enabled unless the user knows the function + ## doesn't work on the system and disables it. (This flag should be set + ## for all machines except for SGI Altix Propack 4 where the function + ## doesn't return correct file size.) + ## AC_ARG_ENABLE([mpi-size], - [AC_HELP_STRING([--enable-mpi-size], + [AS_HELP_STRING([--enable-mpi-size], [Some systems (only SGI Altix Propack 4 so far) return wrong value from MPI_File_get_size. By disabling this function, the library will replace it with stat to get the correct file size. @@ -2903,29 +2909,29 @@ if test -n "$PARALLEL"; then esac fi -dnl ---------------------------------------------------------------------- -dnl Turn on internal I/O filters by setting macros in header files -dnl Internal I/O filters are contained entirely within the library and do -dnl not depend on external headers or libraries. The shuffle filter is -dnl an example of an internal filter, while the gzip filter is an example of -dnl an external filter. Each external filter is controlled with an -dnl "--with-foo=" configure flag. -dnl +## ---------------------------------------------------------------------- +## Turn on internal I/O filters by setting macros in header files +## Internal I/O filters are contained entirely within the library and do +## not depend on external headers or libraries. The shuffle filter is +## an example of an internal filter, while the gzip filter is an example of +## an external filter. Each external filter is controlled with an +## "--with-foo=" configure flag. +## AC_SUBST([FILTERS]) -AC_SUBST(USE_FILTER_SHUFFLE) USE_FILTER_SHUFFLE="no" -AC_SUBST(USE_FILTER_FLETCHER32) USE_FILTER_FLETCHER32="no" -AC_SUBST(USE_FILTER_NBIT) USE_FILTER_NBIT="no" -AC_SUBST(USE_FILTER_SCALEOFFSET) USE_FILTER_SCALEOFFSET="no" +AC_SUBST([USE_FILTER_SHUFFLE]) USE_FILTER_SHUFFLE="no" +AC_SUBST([USE_FILTER_FLETCHER32]) USE_FILTER_FLETCHER32="no" +AC_SUBST([USE_FILTER_NBIT]) USE_FILTER_NBIT="no" +AC_SUBST([USE_FILTER_SCALEOFFSET]) USE_FILTER_SCALEOFFSET="no" AC_MSG_CHECKING([for I/O filters]) AC_ARG_ENABLE([filters], - [AC_HELP_STRING([--enable-filters=all], + [AS_HELP_STRING([--enable-filters=all], [Turn on all internal I/O filters. One may also specify a comma-separated list of filters or the word no. The default is all internal I/O filters.])], [FILTERS=$enableval]) -dnl Eventually: all_filters="shuffle,foo,bar,baz" +## Eventually: all_filters="shuffle,foo,bar,baz" all_filters="shuffle,fletcher32,nbit,scaleoffset" case "X-$FILTERS" in X-|X-all) @@ -2943,10 +2949,10 @@ esac if test -n "$FILTERS"; then for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do - dnl ------------------------------------------------------------------ - dnl Have to use separate 'if' construct for each filter, so that - dnl autoheader can detect the AC_DEFINE for each one... - dnl + ## ------------------------------------------------------------------ + ## Have to use separate 'if' construct for each filter, so that + ## autoheader can detect the AC_DEFINE for each one... + ## if test $filter = "SHUFFLE"; then AC_DEFINE([HAVE_FILTER_SHUFFLE], [1], [Define if support for shuffle filter is enabled]) @@ -2970,22 +2976,22 @@ if test -n "$FILTERS"; then done fi -dnl ---------------------------------------------------------------------- -dnl This is defined only when we're using CodeWarrior, since it has a -dnl broken "open()" call. -dnl +## ---------------------------------------------------------------------- +## This is defined only when we're using CodeWarrior, since it has a +## broken "open()" call. +# if test 1 = 2; then AC_DEFINE([NO_SHARED_WRITING], [1], [Define if shared writing must be disabled (CodeWarrior only)]) fi -dnl -------------------------------------------------------------------------- -dnl Should the Default Virtual File Driver be compiled? -dnl +## -------------------------------------------------------------------------- +## Should the Default Virtual File Driver be compiled? +## AC_MSG_CHECKING([for Default Virtual File Driver definition]) AC_ARG_WITH([default-vfd], - [AC_HELP_STRING([--with-default-vfd=driver], + [AS_HELP_STRING([--with-default-vfd=driver], [Specify default file driver [default=sec2]])],, withval=sec2) @@ -3008,14 +3014,14 @@ if test "X$default_vfd" = "Xyes"; then [Define the default virtual file driver to compile]) fi -dnl ---------------------------------------------------------------------- -dnl Check if Direct I/O driver is enabled by --enable-direct-vfd -dnl +## ---------------------------------------------------------------------- +## Check if Direct I/O driver is enabled by --enable-direct-vfd +## AC_MSG_CHECKING([for Direct Virtual File Driver support]) AC_ARG_ENABLE([direct-vfd], - [AC_HELP_STRING([--enable-direct-vfd], + [AS_HELP_STRING([--enable-direct-vfd], [Build the Direct I/O Virtual File Driver [default=yes]])], [DIRECT_VFD=$enableval], [DIRECT_VFD=yes]) @@ -3034,7 +3040,7 @@ if test "$DIRECT_VFD" = "yes"; then close(fid); remove("tst_file"); exit (0); - }], AC_TRY_LINK(, [posix_memalign()], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no]), [hdf5_cv_direct_io=no],)]) + }], [AC_TRY_LINK(, [posix_memalign()], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no])], [hdf5_cv_direct_io=no],)]) if test ${hdf5_cv_direct_io} = "yes"; then AC_MSG_RESULT([yes]) @@ -3050,15 +3056,15 @@ fi AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Decide whether the presence of user's exception handling functions is -dnl checked and data conversion exceptions are returned. This is mainly -dnl for the speed optimization of hard conversions. Soft conversions can -dnl actually benefit little. -dnl +## ---------------------------------------------------------------------- +## Decide whether the presence of user's exception handling functions is +## checked and data conversion exceptions are returned. This is mainly +## for the speed optimization of hard conversions. Soft conversions can +## actually benefit little. +## AC_MSG_CHECKING([whether exception handling functions is checked during data conversions]) AC_ARG_ENABLE([dconv-exception], - [AC_HELP_STRING([--enable-dconv-exception], + [AS_HELP_STRING([--enable-dconv-exception], [if exception handling functions is checked during data conversions [default=yes]])], [DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes]) @@ -3071,15 +3077,15 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Decide whether the data accuracy has higher priority during data -dnl conversions. If not, some hard conversions will still be prefered even -dnl though the data may be wrong (for example, some compilers don't -dnl support denormalized floating values) to maximize speed. -dnl +## ---------------------------------------------------------------------- +## Decide whether the data accuracy has higher priority during data +## conversions. If not, some hard conversions will still be prefered even +## though the data may be wrong (for example, some compilers don't +## support denormalized floating values) to maximize speed. +## AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions]) AC_ARG_ENABLE([dconv-accuracy], - [AC_HELP_STRING([--enable-dconv-accuracy], + [AS_HELP_STRING([--enable-dconv-accuracy], [if data accuracy is guaranteed during data conversions [default=yes]])], [DATA_ACCURACY=$enableval], [DATA_ACCURACY=yes]) @@ -3092,12 +3098,12 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can handle converting -dnl denormalized floating-point values. -dnl (This flag should be set for all machines, except for the Crays, where -dnl the cache value is set in it's config file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle converting +## denormalized floating-point values. +## (This flag should be set for all machines, except for the Crays, where +## the cache value is set in it's config file) +## AC_MSG_CHECKING([if converting denormalized floating-point values is possible]) AC_CACHE_VAL([hdf5_cv_convert_denormal_float], [hdf5_cv_convert_denormal_float=yes]) @@ -3109,12 +3115,12 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can handle converting -dnl floating-point to long long values. -dnl (This flag should be _unset_ for all machines, except for Windows, where -dnl it's set in the custom Windows H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle converting +## floating-point to long long values. +## (This flag should be _unset_ for all machines, except for Windows, where +## it's set in the custom Windows H5pubconf.h file) +## AC_MSG_CHECKING([if converting floating-point values to long long is not working]) AC_CACHE_VAL([hdf5_cv_convert_float_llong_not_works], [hdf5_cv_convert_float_llong_not_works=no]) @@ -3126,12 +3132,12 @@ else AC_MSG_RESULT([false]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine has window style pathname, -dnl that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). -dnl (This flag should be _unset_ for all machines, except for Windows, where -dnl it's set in the custom Windows H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine has window style pathname, +## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). +## (This flag should be _unset_ for all machines, except for Windows, where +## it's set in the custom Windows H5pubconf.h file) +## AC_MSG_CHECKING([if the machine has window style path name]) case "`uname`" in @@ -3145,13 +3151,13 @@ case "`uname`" in ;; esac -dnl ----------------------------------------------------------------------- -dnl Set flag to indicate that the machine can handle conversion from -dnl long double to integers accurately. This flag should be set "yes" for -dnl all machines except all SGIs. For SGIs, some conversions are -dnl incorrect and its cache value is set "no" in its config/irix6.x and -dnl irix5.x. -dnl +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can handle conversion from +## long double to integers accurately. This flag should be set "yes" for +## all machines except all SGIs. For SGIs, some conversions are +## incorrect and its cache value is set "no" in its config/irix6.x and +## irix5.x. +## AC_MSG_CHECKING([if converting from long double to integers is accurate]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3168,13 +3174,13 @@ else AC_MSG_RESULT([no]) fi -dnl ----------------------------------------------------------------------- -dnl Set flag to indicate that the machine can do conversion from -dnl long double to integers regardless of accuracy. This flag should be -dnl set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the -dnl compiler has 'floating exception' when converting 'long double' to all -dnl integers except 'unsigned long long'. Other HP-UX systems are unknown -dnl yet. (1/8/05 - SLU) +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can do conversion from +## long double to integers regardless of accuracy. This flag should be +## set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the +## compiler has 'floating exception' when converting 'long double' to all +## integers except 'unsigned long long'. Other HP-UX systems are unknown +## yet. (1/8/05 - SLU) AC_MSG_CHECKING([if converting from long double to integers works]) @@ -3215,13 +3221,13 @@ else AC_MSG_RESULT([no]) fi -dnl ----------------------------------------------------------------------- -dnl Set flag to indicate that the machine can handle conversion from -dnl integers to long double. (This flag should be set "yes" for all -dnl machines except all SGIs, where some conversions are -dnl incorrect and its cache value is set "no" in its config/irix6.x and -dnl irix5.x) -dnl +## ----------------------------------------------------------------------- +## Set flag to indicate that the machine can handle conversion from +## integers to long double. (This flag should be set "yes" for all +## machines except all SGIs, where some conversions are +## incorrect and its cache value is set "no" in its config/irix6.x and +## irix5.x) +## AC_MSG_CHECKING([if accurately converting from integers to long double]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3238,14 +3244,14 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'unsigned long' to 'float' values. -dnl (This flag should be set for all machines, except for Pathscale compiler -dnl on Sandia's Linux machine where the compiler interprets 'unsigned long' -dnl values as negative when the first bit of 'unsigned long' is on during -dnl the conversion to float.) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'unsigned long' to 'float' values. +## (This flag should be set for all machines, except for Pathscale compiler +## on Sandia's Linux machine where the compiler interprets 'unsigned long' +## values as negative when the first bit of 'unsigned long' is on during +## the conversion to float.) +## AC_MSG_CHECKING([if accurately converting unsigned long to float values]) AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate], @@ -3288,14 +3294,14 @@ else fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'unsigned (long) long' values to 'float' and 'double' values. -dnl (This flag should be set for all machines, except for the SGIs, where -dnl the cache value is set in the config/irix6.x config file) and Solaris -dnl 64-bit machines, where the short program below tests if round-up is -dnl correctly handled. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'unsigned (long) long' values to 'float' and 'double' values. +## (This flag should be set for all machines, except for the SGIs, where +## the cache value is set in the config/irix6.x config file) and Solaris +## 64-bit machines, where the short program below tests if round-up is +## correctly handled. +## AC_MSG_CHECKING([if accurately converting unsigned long long to floating-point values]) if test ${host_os_novers} = "solaris2.x"; then @@ -3372,13 +3378,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'float' or 'double' to 'unsigned long long' values. -dnl (This flag should be set for all machines, except for PGI compiler -dnl where round-up happens when the fraction of float-point value is greater -dnl than 0.5. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'float' or 'double' to 'unsigned long long' values. +## (This flag should be set for all machines, except for PGI compiler +## where round-up happens when the fraction of float-point value is greater +## than 0.5. +## AC_MSG_CHECKING([if accurately roundup converting floating-point to unsigned long long values]) AC_CACHE_VAL([hdf5_cv_fp_to_ullong_accurate], @@ -3409,13 +3415,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'float', 'double' or 'long double' to 'unsigned long long' values. -dnl (This flag should be set for all machines, except for HP-UX machines -dnl where the maximal number for unsigned long long is 0x7fffffffffffffff -dnl during conversion. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'float', 'double' or 'long double' to 'unsigned long long' values. +## (This flag should be set for all machines, except for HP-UX machines +## where the maximal number for unsigned long long is 0x7fffffffffffffff +## during conversion. +## AC_MSG_CHECKING([if right maximum converting floating-point to unsigned long long values]) AC_CACHE_VAL([hdf5_cv_fp_to_ullong_right_maximum], @@ -3453,11 +3459,11 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'long double' to 'unsigned int' values. (This flag should be set for -dnl all machines, except for some Intel compilers on some Linux.) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to 'unsigned int' values. (This flag should be set for +## all machines, except for some Intel compilers on some Linux.) +## AC_MSG_CHECKING([if correctly converting long double to unsigned int values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3489,13 +3495,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can _compile_ -dnl 'unsigned long long' to 'float' and 'double' typecasts. -dnl (This flag should be set for all machines, except for under Windows when -dnl compiled with Visual Studio 6, where the macro value is set in the -dnl src/H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can _compile_ +## 'unsigned long long' to 'float' and 'double' typecasts. +## (This flag should be set for all machines, except for under Windows when +## compiled with Visual Studio 6, where the macro value is set in the +## src/H5pubconf.h file) +## AC_MSG_CHECKING([if compiling unsigned long long to floating-point typecasts work]) AC_CACHE_VAL([hdf5_cv_ullong_to_fp_cast_works], [hdf5_cv_ullong_to_fp_cast_works=yes]) @@ -3507,13 +3513,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can _compile_ -dnl 'long long' to 'float' and 'double' typecasts. -dnl (This flag should be set for all machines, except for under Windows when -dnl compiled with Visual Studio 6, where the macro value is set in the -dnl src/H5pubconf.h file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can _compile_ +## 'long long' to 'float' and 'double' typecasts. +## (This flag should be set for all machines, except for under Windows when +## compiled with Visual Studio 6, where the macro value is set in the +## src/H5pubconf.h file) +## AC_MSG_CHECKING([if compiling long long to floating-point typecasts work]) AC_CACHE_VAL([hdf5_cv_llong_to_fp_cast_works], [hdf5_cv_llong_to_fp_cast_works=yes]) @@ -3525,13 +3531,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can convert from -dnl 'unsigned long long' to 'long double' without precision loss. -dnl (This flag should be set for all machines, except for FreeBSD(sleipnir) -dnl where the last 2 bytes of mantissa are lost when compiler tries to do -dnl the conversion, and Cygwin where compiler doesn't do rounding correctly.) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can convert from +## 'unsigned long long' to 'long double' without precision loss. +## (This flag should be set for all machines, except for FreeBSD(sleipnir) +## where the last 2 bytes of mantissa are lost when compiler tries to do +## the conversion, and Cygwin where compiler doesn't do rounding correctly.) +## AC_MSG_CHECKING([if converting unsigned long long to long double with precision]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3623,13 +3629,13 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can handle overflow converting -dnl all floating-point to all integer types. -dnl (This flag should be set for all machines, except for Cray X1 where -dnl floating exception is generated when the floating-point value is greater -dnl than the maximal integer value). -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can handle overflow converting +## all floating-point to all integer types. +## (This flag should be set for all machines, except for Cray X1 where +## floating exception is generated when the floating-point value is greater +## than the maximal integer value). +## AC_MSG_CHECKING([if overflows normally converting floating-point to integer values]) AC_CACHE_VAL([hdf5_cv_fp_to_integer_overflow_works], @@ -3654,15 +3660,15 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine is using a special algorithm to convert -dnl 'long double' to '(unsigned) long' values. (This flag should only be set for -dnl the IBM Power6 Linux. When the bit sequence of long double is -dnl 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long -dnl is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. -dnl The machine's conversion gets the correct value. We define the macro and disable -dnl this kind of test until we figure out what algorithm they use. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine is using a special algorithm to convert +## 'long double' to '(unsigned) long' values. (This flag should only be set for +## the IBM Power6 Linux. When the bit sequence of long double is +## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long +## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. +## The machine's conversion gets the correct value. We define the macro and disable +## this kind of test until we figure out what algorithm they use. +## AC_MSG_CHECKING([if using special algorithm to convert long double to (unsigned) long values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3734,14 +3740,14 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine is using a special algorithm -dnl to convert some values of '(unsigned) long' to 'long double' values. -dnl (This flag should be off for all machines, except for IBM Power6 Linux, -dnl when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -dnl ..., 7fffff..., the compiler uses a unknown algorithm. We define a -dnl macro and skip the test for now until we know about the algorithm. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine is using a special algorithm +## to convert some values of '(unsigned) long' to 'long double' values. +## (This flag should be off for all machines, except for IBM Power6 Linux, +## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the compiler uses a unknown algorithm. We define a +## macro and skip the test for now until we know about the algorithm. +## AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3815,15 +3821,15 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl 'long double' to '(unsigned) long long' values. (This flag should be set for -dnl all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence -dnl of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long -dnl start to go wrong on these two machines. Adjusting it higher to -dnl 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted -dnl values wildly wrong. This test detects this wrong behavior and disable the test. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## 'long double' to '(unsigned) long long' values. (This flag should be set for +## all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence +## of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long +## start to go wrong on these two machines. Adjusting it higher to +## 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted +## values wildly wrong. This test detects this wrong behavior and disable the test. +## AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3879,13 +3885,13 @@ else fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine can accurately convert -dnl '(unsigned) long long' to 'long double' values. (This flag should be set for -dnl all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., -dnl 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice -dnl as big as they should be. -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine can accurately convert +## '(unsigned) long long' to 'long double' values. (This flag should be set for +## all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., +## 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice +## as big as they should be. +## AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values]) if test ${ac_cv_sizeof_long_double} = 0; then @@ -3944,12 +3950,12 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set the flag to indicate that the machine generates bad code -dnl for the H5V_log2_gen() routine in src/H5Vprivate.h -dnl (This flag should be set to no for all machines, except for SGI IRIX64, -dnl where the cache value is set to yes in it's config file) -dnl +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine generates bad code +## for the H5V_log2_gen() routine in src/H5Vprivate.h +## (This flag should be set to no for all machines, except for SGI IRIX64, +## where the cache value is set to yes in it's config file) +## AC_MSG_CHECKING([if bad code for log2 routine is generated]) AC_CACHE_VAL([hdf5_cv_bad_log2_code_generated], [hdf5_cv_bad_log2_code_generated=no]) @@ -3961,28 +3967,28 @@ else AC_MSG_RESULT([no]) fi -dnl ---------------------------------------------------------------------- -dnl Set some variables for general configuration information to be saved -dnl and installed with the libraries. -dnl +## ---------------------------------------------------------------------- +## Set some variables for general configuration information to be saved +## and installed with the libraries. +## -dnl HDF5 version from the first line of the README.txt file. +## HDF5 version from the first line of the README.txt file. H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" AC_SUBST([H5_VERSION]) -dnl Configuration date +## Configuration date AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" -dnl User doing the configuration +## User doing the configuration AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" if test -n "$ORGANIZATION"; then CONFIG_USER="$CONFIG_USER at $ORGANIZATION" fi -dnl Configuration mode (production, development, profile, etc) saved above. +## Configuration mode (production, development, profile, etc) saved above. AC_SUBST([CONFIG_MODE]) -dnl Byte sex from the AC_C_BIGENDIAN macro. +## Byte sex from the AC_C_BIGENDIAN macro. AC_SUBST([BYTESEX]) if test "X$ac_cv_c_bigendian" = "Xyes"; then BYTESEX="big-endian" @@ -3998,13 +4004,13 @@ else fi AC_SUBST([WORDS_BIGENDIAN]) -dnl Parallel support? (set above except empty if none) +## Parallel support? (set above except empty if none) PARALLEL=${PARALLEL:-no} -dnl Compiler with version information. This consists of the full path -dnl name of the compiler and the reported version number. +## Compiler with version information. This consists of the full path +## name of the compiler and the reported version number. AC_SUBST([CC_VERSION]) -dnl Strip anything that looks like a flag off of $CC +## Strip anything that looks like a flag off of $CC CC_NOFLAGS=`echo $CC | sed 's/ -.*//'` if `echo $CC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -4023,7 +4029,7 @@ if test -n "$cc_version_info"; then fi AC_SUBST([FC_VERSION]) -dnl Strip anything that looks like a flag off of $CC +## Strip anything that looks like a flag off of $CC FC_NOFLAGS=`echo $FC | sed 's/ -.*//'` if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -4042,7 +4048,7 @@ if test -n "$fc_version_info"; then fi AC_SUBST([CXX_VERSION]) -dnl Strip anything that looks like a flag off of $CC +## Strip anything that looks like a flag off of $CC CXX_NOFLAGS=`echo $CXX | sed 's/ -.*//'` if `echo $CXX_NOFLAGS | grep ^/ >/dev/null 2>&1`; then @@ -4060,12 +4066,12 @@ if test -n "$cxx_version_info"; then CXX_VERSION="$CXX_VERSION ( $cxx_version_info)" fi -dnl ---------------------------------------------------------------------- -dnl Where is the root of the source tree. Give an absolute address so -dnl we can find it no matter which directory of the distribution is our -dnl current directory. The built-in pwd fails on some systems, but the -dnl /bin/pwd version works OK. -dnl +## ---------------------------------------------------------------------- +## Where is the root of the source tree. Give an absolute address so +## we can find it no matter which directory of the distribution is our +## current directory. The built-in pwd fails on some systems, but the +## /bin/pwd version works OK. +## if test -x /bin/pwd; then pwd=/bin/pwd else @@ -4073,16 +4079,16 @@ else fi AC_SUBST([ROOT]) ROOT="`$pwd`" -dnl ---------------------------------------------------------------------- -dnl Move any compiler-specific libraries into the main LIBS varaible. -dnl +## ---------------------------------------------------------------------- +## Move any compiler-specific libraries into the main LIBS varaible. +## LIBS="$DEFAULT_LIBS $LIBS" -dnl ---------------------------------------------------------------------- -dnl Determine the runtime libraries we may need to include in the -dnl libtools command so that executables will find the correct dynamic -dnl libraries. -dnl +## ---------------------------------------------------------------------- +## Determine the runtime libraries we may need to include in the +## libtools command so that executables will find the correct dynamic +## libraries. +## AC_SUBST([DYNAMIC_DIRS]) DYNAMIC_DIRS="" if test -n "$AM_LDFLAGS $LDFLAGS"; then @@ -4092,8 +4098,8 @@ if test -n "$AM_LDFLAGS $LDFLAGS"; then d="`echo $d | sed -e 's/-L//g'`" case "$d" in .*) - dnl If the path isn't absolute, make it so by - dnl prepending the ROOT directory to it. + ## If the path isn't absolute, make it so by + ## prepending the ROOT directory to it. d=${ROOT}/$d ;; esac @@ -4108,8 +4114,8 @@ if test -n "$AM_CPPFLAGS"; then for d in $AM_CPPFLAGS ; do case "$d" in -I.*) - dnl If the path isn't absolute, make it so by prepending - dnl the ROOT directory to it. + ## If the path isn't absolute, make it so by prepending + ## the ROOT directory to it. d="`echo $d | sed -e 's/-I//g'`" d="-I${ROOT}/${d}" ;; @@ -4119,16 +4125,16 @@ if test -n "$AM_CPPFLAGS"; then AM_CPPFLAGS=$TEMP_CPPFLAGS fi -dnl ---------------------------------------------------------------------- -dnl Check if they would like the High Level library compiled -dnl +## ---------------------------------------------------------------------- +## Check if they would like the High Level library compiled +## AC_SUBST(HL) HL="" -# name of fortran folder inside "hl", if FORTRAN compile is requested +## name of fortran folder inside "hl", if FORTRAN compile is requested AC_SUBST(HL_FOR) HL_FOR="" AC_MSG_CHECKING([if high level library is enabled]) AC_ARG_ENABLE([hl], - [AC_HELP_STRING([--enable-hl], + [AS_HELP_STRING([--enable-hl], [Enable the high level library [default=yes]])], [HDF5_HL=$enableval], [HDF5_HL=yes]) @@ -4142,14 +4148,14 @@ else echo "no" fi -dnl ---------------------------------------------------------------------- -dnl Some programs shouldn't be built by default (e.g., programs to generate -dnl data files used by tests, some optional tests). -dnl Check if they want such programs built anyway. -dnl +## ---------------------------------------------------------------------- +## Some programs shouldn't be built by default (e.g., programs to generate +## data files used by tests, some optional tests). +## Check if they want such programs built anyway. +## AC_MSG_CHECKING([additional programs should be built]) AC_ARG_ENABLE([build-all], - [AC_HELP_STRING([--enable-build-all], + [AS_HELP_STRING([--enable-build-all], [Build helper programs that only developers should need [default=no]])], [BUILD_ALL=$enableval], [BUILD_ALL=no]) @@ -4161,13 +4167,13 @@ else fi AM_CONDITIONAL([BUILD_ALL_CONDITIONAL], [test "X$BUILD_ALL" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Enable deprecated public API symbols -dnl +## ---------------------------------------------------------------------- +## Enable deprecated public API symbols +## AC_SUBST([DEPRECATED_SYMBOLS]) AC_MSG_CHECKING([if deprecated public symbols are available]); AC_ARG_ENABLE([deprecated-symbols], - [AC_HELP_STRING([--enable-deprecated-symbols], + [AS_HELP_STRING([--enable-deprecated-symbols], [Enable deprecated public API symbols [default=yes]])], [DEPREC_SYMBOLS=$enableval], [DEPREC_SYMBOLS=yes]) @@ -4185,17 +4191,17 @@ case "X-$DEPREC_SYMBOLS" in ;; esac -dnl -------------------------------------------------------------------------- -dnl Which version of the public APIs should the 'base' versioned symbols use? -dnl +## -------------------------------------------------------------------------- +## Which version of the public APIs should the 'base' versioned symbols use? +## AC_SUBST([DEFAULT_API_VERSION]) AC_MSG_CHECKING([which version of public symbols to use by default]) AC_ARG_WITH([default-api-version], - [AC_HELP_STRING([--with-default-api-version=(v16|v18|v110)], + [AS_HELP_STRING([--with-default-api-version=(v16|v18|v110)], [Specify default release version of public symbols [default=v110]])],, - withval=v110) + [withval=v110]) if test "X$withval" = "Xv16"; then AC_MSG_RESULT([v16]) @@ -4212,28 +4218,28 @@ else AC_MSG_ERROR([invalid version of public symbols given]) fi -dnl It's an error to try to disable deprecated public API symbols while -dnl choosing an older version of the public API as the default. However, -dnl if the user insists on doing this via the --enable-unsupported configure -dnl flag, we'll let them. +## It's an error to try to disable deprecated public API symbols while +## choosing an older version of the public API as the default. However, +## if the user insists on doing this via the --enable-unsupported configure +## flag, we'll let them. if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then if test "X${DEFAULT_API_VERSION}" != "Xv110" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error.]) fi fi -dnl ---------------------------------------------------------------------- -dnl Enable strict file format checks -dnl +## ---------------------------------------------------------------------- +## Enable strict file format checks +## AC_SUBST([STRICT_FORMAT_CHECKS]) AC_MSG_CHECKING([Whether to perform strict file format checks]); AC_ARG_ENABLE([strict-format-checks], - [AC_HELP_STRING([--enable-strict-format-checks], + [AS_HELP_STRING([--enable-strict-format-checks], [Enable strict file format checks, default=yes if debug flag is enabled, no otherwise])], [STRICT_CHECKS=$enableval]) -dnl Default to yes if debug is enabled +## Default to yes if debug is enabled if test "X-$STRICT_CHECKS" = X- ; then if test -z "$DEBUG_PKG" ; then STRICT_CHECKS=no @@ -4256,12 +4262,12 @@ case "X-$STRICT_CHECKS" in esac -dnl ---------------------------------------------------------------------- -dnl Enable embedded library information -dnl +## ---------------------------------------------------------------------- +## Enable embedded library information +## AC_MSG_CHECKING([Whether to have library information embedded in the executables]) AC_ARG_ENABLE([embedded-libinfo], - [AC_HELP_STRING([--enable-embedded-libinfo], + [AS_HELP_STRING([--enable-embedded-libinfo], [Enable embedded library information [default=yes]])], [enable_embedded_libinfo=$enableval], [enable_embedded_libinfo=yes]) @@ -4275,9 +4281,9 @@ AC_ARG_ENABLE([embedded-libinfo], fi -dnl ---------------------------------------------------------------------- -dnl Check if pointer alignments are enforced -dnl +## ---------------------------------------------------------------------- +## Check if pointer alignments are enforced +## AC_MSG_CHECKING([if alignment restrictions are strictly enforced]) AC_RUN_IFELSE([ AC_LANG_PROGRAM([ @@ -4323,8 +4329,8 @@ AC_RUN_IFELSE([ ]) -dnl ---------------------------------------------------------------------- -dnl Restore user's CFLAGS. +## ---------------------------------------------------------------------- +## Restore user's CFLAGS. CFLAGS="$saved_user_CFLAGS" FCFLAGS="$saved_user_FCFLAGS" CXXFLAGS="$saved_user_CXXFLAGS" @@ -4332,9 +4338,9 @@ CPPFLAGS="$saved_user_CPPFLAGS" LDFLAGS="$saved_user_LDFLAGS" -dnl ---------------------------------------------------------------------- -dnl Create automake conditionals to tell automake makefiles which directories -dnl need to be compiled +## ---------------------------------------------------------------------- +## Create automake conditionals to tell automake makefiles which directories +## need to be compiled AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"]) AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"]) @@ -4342,37 +4348,37 @@ AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"]) AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"]) -dnl ---------------------------------------------------------------------- -dnl Build the Makefiles. -dnl +## ---------------------------------------------------------------------- +## Build the Makefiles. +## -dnl The directory search list +## The directory search list AC_SUBST([SEARCH]) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"' SEARCH="$SEARCH_RULE`eval $cmd`" export SEARCH -dnl We don't need to say when we're entering directories if we're using -dnl GNU make because make does it for us. +## We don't need to say when we're entering directories if we're using +## GNU make because make does it for us. if test "X$GMAKE" = "Xyes"; then AC_SUBST([SETX]) SETX=":" else AC_SUBST([SETX]) SETX="set -x" fi -dnl Some cleanup stuff +## Some cleanup stuff rm -f conftest conftest.o conftest.c dummy.o *.mod -dnl Build config.status, touch the stamp files, and build all the Makefiles. -dnl The order is such that the first `make' does not need to update any -dnl configuration information. See config/commence.in for the order in which -dnl things need to be done. +## Build config.status, touch the stamp files, and build all the Makefiles. +## The order is such that the first `make' does not need to update any +## configuration information. See config/commence.in for the order in which +## things need to be done. -# First the stamp1 file for H5config.h.in +## First the stamp1 file for H5config.h.in mkdir ./config >/dev/null 2>&1 touch ./config/stamp1 -# Then the config.status file (but not makefiles) +## Then the config.status file (but not makefiles) saved_no_create=$no_create no_create=yes @@ -4467,16 +4473,16 @@ AC_OUTPUT LT_OUTPUT no_create=$saved_no_create -# Then the stamp2 file for H5config.h +## Then the stamp2 file for H5config.h touch ./config/stamp2 -# Finally the makefiles +## Finally the makefiles test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -dnl Post processing to patch up some deficiencies in libtool +## Post processing to patch up some deficiencies in libtool case $host_os in linux* | freebsd* ) - # If gcc is not used, need to set $wl to use "-Wl," + ## If gcc is not used, need to set $wl to use "-Wl," if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then : using gcc else @@ -4490,12 +4496,12 @@ EOF ;; esac -dnl Are we compiling static libraries, shared libraries, or both? This -dnl is only used for the libhdf5.settings file. We can't just look at -dnl $enable_static and $enable_shared because if they're yes the ltconfig -dnl might have decided that one or the other is simply not possible. -dnl Therefore we have to ask the generated `libtool' shell script -dnl which 'features' it has enabled. +## Are we compiling static libraries, shared libraries, or both? This +## is only used for the libhdf5.settings file. We can't just look at +## $enable_static and $enable_shared because if they're yes the ltconfig +## might have decided that one or the other is simply not possible. +## Therefore we have to ask the generated `libtool' shell script +## which 'features' it has enabled. if (./libtool --features | grep '^enable shared libraries' > /dev/null); then enable_shared=yes else @@ -4528,9 +4534,9 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi -dnl We don't want inline defined for C++ compilers -dnl Don't worry about the C++ ifdef wrappers in the H5pubconf file, since -dnl 'H5_inline' isn't a C++ keyword. +## We don't want inline defined for C++ compilers +## Don't worry about the C++ ifdef wrappers in the H5pubconf file, since +## 'H5_inline' isn't a C++ keyword. cat >> src/H5config.h <<EOF #if defined(__cplusplus) && defined(inline) @@ -4538,5 +4544,5 @@ cat >> src/H5config.h <<EOF #endif EOF -dnl show the configure settings +## show the configure settings cat src/libhdf5.settings |