From c16ae673e3324a3151435e3a33c5d96effb61c8c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 11 Sep 2012 15:11:44 -0500 Subject: [svn-r22752] Update autotools macros and comment indicators. Added autotools quotation around parameters h5committest --- aclocal.m4 | 9 - configure | 1159 +++++++++++++++++++++++++---- configure.ac | 2322 +++++++++++++++++++++++++++++----------------------------- 3 files changed, 2174 insertions(+), 1316 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index ee9c639..e6aae87 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -406,15 +406,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. diff --git a/configure b/configure index cfaccd8..faff1f4 100755 --- a/configure +++ b/configure @@ -3227,6 +3227,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +## AM_INIT_AUTOMAKE takes a list of options that should be applied to +## every Makefile.am when automake is run. am__api_version='1.12' # Find a good install program. We prefer a C program (faster), @@ -3760,6 +3762,16 @@ fi AM_BACKSLASH='\' +## 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @@ -3784,9 +3796,26 @@ fi -ac_config_commands="$ac_config_commands default-1" +## ---------------------------------------------------------------------- +## Set prefix default (install directory) to a directory in the build area. +## This allows multiple src-dir builds within one host. +## 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="$ac_config_commands pubconf" + + +## 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 @@ -3866,18 +3895,23 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but +## not exported to h5cc (or h5fc, etc.) +## 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. +## 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}" @@ -3889,26 +3923,57 @@ FCFLAGS="${FCFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" +## 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" +## 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="" +## 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 - - +## ---------------------------------------------------------------------- +## Dump all shell variables values. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking shell variables initial values" >&5 $as_echo_n "checking shell variables initial values... " >&6; } set >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } +## 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. MPE=no @@ -3932,7 +3997,17 @@ $as_echo "done" >&6; } 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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename works" >&5 $as_echo_n "checking if basename works... " >&6; } @@ -3954,6 +4029,10 @@ else $as_echo "yes" >&6; } fi +## ---------------------------------------------------------------------- +## Check that the cache file was build on the same host as what we're +## running on now. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cached host" >&5 $as_echo_n "checking for cached host... " >&6; } if ${hdf5_cv_host+:} false; then : @@ -3971,6 +4050,22 @@ elif test $hdf5_cv_host != $host; then as_fn_error $? "config.cache file is invalid" "$LINENO" 5 fi +## ---------------------------------------------------------------------- +## 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*) @@ -4027,6 +4122,7 @@ if test "X$host_config" != "Xnone"; then . $host_config fi +## Source any special site-specific file hname="`hostname`" while test -n "$hname"; do file=$srcdir/config/site-specific/host-$hname @@ -4045,16 +4141,28 @@ $as_echo "no" >&6; } test "$hname_tmp" = "$hname" && break done +## ---------------------------------------------------------------------- +## 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}" +## ---------------------------------------------------------------------- +## 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 +## ---------------------------------------------------------------------- +## Check for programs. +## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5037,6 +5145,11 @@ fi CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" +## ---------------------------------------------------------------------------- +## 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsupported combinations of configure options are allowed" >&5 $as_echo_n "checking if unsupported combinations of configure options are allowed... " >&6; } # Check whether --enable-unsupported was given. @@ -5058,6 +5171,9 @@ $as_echo "yes" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## HDF5_INTERFACES="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 $as_echo_n "checking if Fortran interface enabled... " >&6; } @@ -5074,6 +5190,9 @@ else fi +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 2003 interface enabled" >&5 $as_echo_n "checking if Fortran 2003 interface enabled... " >&6; } # Check whether --enable-fortran2003 was given. @@ -5082,6 +5201,9 @@ if test "${enable_fortran2003+set}" = set; then : fi +## ---------------------------------------------------------------------- +## 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" @@ -5100,9 +5222,15 @@ if test "X$HDF_FORTRAN" = "Xyes"; then HDF5_INTERFACES="$HDF5_INTERFACES fortran" - HAVE_FORTRAN_2003="no" + ## -------------------------------------------------------------------- + ## Default for FORTRAN 2003 compliant compilers + ## + HAVE_FORTRAN_2003="no" HAVE_F2003_REQUIREMENTS="no" + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## @@ -5112,10 +5240,16 @@ if test "X$HDF_FORTRAN" = "Xyes"; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" + ## -------------------------------------------------------------------- + ## General Fortran flags + ## + AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" FCFLAGS="${FCFLAGS} ${FFLAGS}" - ac_ext=${ac_fc_srcext-f} + ## -------------------------------------------------------------------- + ## Fortran source extention + ## + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -5385,7 +5519,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_ext=${ac_fc_srcext-f} + ## -------------------------------------------------------------------- + ## Check for a Fortran 9X compiler and how to include modules. + ## + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -5688,15 +5825,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - F77=$FC + ## 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 - ac_ext=${ac_fc_srcext-f} + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_ext=${ac_fc_srcext-f} + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -6378,8 +6522,13 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ## -------------------------------------------------------------------- + ## See if the compiler will support the "-I." option + ## + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } @@ -6409,6 +6558,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi + ## Check to see if -r8 was specified to determine if we need to + ## compile the DOUBLE PRECISION interfaces. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran default REAL is DOUBLE PRECISION" >&5 $as_echo_n "checking if Fortran default REAL is DOUBLE PRECISION... " >&6; } @@ -6449,7 +6600,7 @@ $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - FORTRAN_DEFAULT_REALisDBLE="yes" + FORTRAN_DEFAULT_REALisDBLE="yes" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -6458,6 +6609,8 @@ fi if test "X$HDF_FORTRAN2003" = "Xyes"; then + ## Checking if the compiler supports the required Fortran 2003 features and + ## disable Fortran 2003 if it does not. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } @@ -6487,18 +6640,19 @@ else $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 + ## echo $HAVE_FORTRAN_2003 + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003" "$LINENO" 5 else + ## echo $HAVE_FORTRAN_2003 HAVE_FORTRAN_2003="yes" - fi - + fi fi else FC="no" fi +## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6531,6 +6685,12 @@ else fi +## ---------------------------------------------------------------------- +## 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_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7080,6 +7240,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + ## this is checked for when AC_HEADER_STDC is done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 $as_echo_n "checking if c++ interface enabled... " >&6; } @@ -7094,7 +7255,8 @@ if test "X$HDF_CXX" = "Xyes"; then echo "yes" HDF5_INTERFACES="$HDF5_INTERFACES c++" - ac_ext=cpp + ## Change to the C++ language + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -7329,6 +7491,7 @@ else CXX="no" fi +## Change back to the C language ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7336,6 +7499,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## ---------------------------------------------------------------------- +## Check if they have Perl installed on their system. We only need Perl +## if they're using a GNU compiler. +## PERL="" if test "X$GCC" = "Xyes"; then for ac_prog in perl @@ -7383,6 +7550,10 @@ done fi +## ---------------------------------------------------------------------- +## Check which archiving tool to use. This needs to be done before +## the AM_PROG_LIBTOOL macro. +## if test -z "$AR"; then for ac_prog in ar xar @@ -7431,6 +7602,8 @@ test -n "$AR" || AR=":" fi +## Export the AR macro so that it will be placed in the libtool file +## correctly. export AR { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 @@ -7467,6 +7640,8 @@ fi +## ---------------------------------------------------------------------- +## Check that the tr utility is working properly. # Extract the first word of "tr", so it can be a program name with args. set dummy tr; ac_word=$2 @@ -7515,6 +7690,10 @@ if test "X${TR_TEST}" != "XTEST"; then fi +## ---------------------------------------------------------------------- +## 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 $as_echo_n "checking if srcdir= and time commands work together... " >&6; } @@ -7532,18 +7711,64 @@ $as_echo "no" >&6; } fi - - - - - +## 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. +## + + + + + +## ---------------------------------------------------------------------- +## 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) - PARALLEL=mpicc + ## The mpich compiler. Use mpiexec from the same directory if it + ## exists. + PARALLEL=mpicc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpiexec" >&5 $as_echo_n "checking for mpiexec... " >&6; } - cmd="`echo $CC | cut -f1 -d' '`" + ## 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/'`" else @@ -7554,7 +7779,8 @@ $as_echo_n "checking for mpiexec... " >&6; } done fi - if test -x $path/mpiexec; then + ## Is there an mpiexec at that path? + if test -x $path/mpiexec; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $path/mpiexec" >&5 $as_echo "$path/mpiexec" >&6; } RUNSERIAL="${RUNSERIAL:-none}" @@ -7569,16 +7795,27 @@ $as_echo "none" >&6; } ;; mpcc|mpcc_r) - PARALLEL="$CC_BASENAME" + ## The IBM compiler + PARALLEL="$CC_BASENAME" ;; *) - ;; + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. + ;; esac +## ---------------------------------------------------------------------- +## 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 - ac_ext=${ac_fc_srcext-f} + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -7586,11 +7823,14 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu case "$FC" in *mpif90*) - PARALLEL=mpif90 + ## The Fortran mpich compiler. Use mpiexec from the same directory + ## if it exists. + PARALLEL=mpif90 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpiexec" >&5 $as_echo_n "checking for mpiexec... " >&6; } - cmd=`echo $FC |cut -f1 -d' '` + ## 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/'`" else @@ -7601,7 +7841,8 @@ $as_echo_n "checking for mpiexec... " >&6; } done fi - if test -x $path/mpiexec; then + ## Is there an mpiexec at that path? + if test -x $path/mpiexec; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $path/mpiexec" >&5 $as_echo "$path/mpiexec" >&6; } RUNSERIAL="${RUNSERIAL:-none}" @@ -7616,14 +7857,18 @@ $as_echo "none" >&6; } ;; *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - PARALLEL="$FC" + ## The IBM compiler + PARALLEL="$FC" ;; *) - ;; + ## Probably not a parallel compiler, but if `--enable-parallel' + ## is defined below then we're still building a parallel hdf5. + ;; esac - ac_ext=c + ## Change to the C language + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -7631,6 +7876,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi +## ----------------------------------------------------------------------------- +## 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' @@ -7644,6 +7892,10 @@ elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then echo ' shared libraries explicitly enabled by user' fi +## ---------------------------------------------------------------------- +## Fortran libraries are not currently supported on Mac. Disable them. +## (this is overridable with --enable-unsupported). +## H5_FORTRAN_SHARED="no" if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then @@ -7651,6 +7903,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then $as_echo_n "checking if shared Fortran libraries are supported... " >&6; } H5_FORTRAN_SHARED="yes" + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) case "`uname`" in Darwin*) @@ -7659,6 +7912,7 @@ $as_echo_n "checking if shared Fortran libraries are supported... " >&6; } ;; esac + ## Report results of check(s) if test "X${H5_FORTRAN_SHARED}" = "Xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -7693,6 +7947,9 @@ else fi +## ---------------------------------------------------------------------- +## Disable C++ shared libraries if +DD64 flag is detected. +## H5_CXX_SHARED="no" if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then @@ -7700,12 +7957,14 @@ if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then $as_echo_n "checking if shared C++ libraries are supported... " >&6; } H5_CXX_SHARED="yes" + ## 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 + ## Report results of check(s) if test "X${H5_CXX_SHARED}" = "Xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -7739,12 +7998,20 @@ else fi +## ---------------------------------------------------------------------- +## 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 +## ---------------------------------------------------------------------- +## 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 @@ -7759,6 +8026,9 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then esac fi +## ---------------------------------------------------------------------- +## Windows won't create DLLs without the following macro. +## enable_win32_dll=yes case $host in @@ -8063,6 +8333,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. enable_dlopen=yes @@ -21747,6 +22020,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## ---------------------------------------------------------------------- +## 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 $as_echo_n "checking if we should install only statically linked executables... " >&6; } # Check whether --enable-static_exec was given. @@ -21757,7 +22035,8 @@ fi if test "X$STATIC_EXEC" = "Xyes"; then echo "yes" - if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then + ## 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 LT_STATIC_EXEC="-all-static" @@ -21768,12 +22047,19 @@ fi +## 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 +## ---------------------------------------------------------------------- +## 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 $as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } # Check whether --enable-sharedlib-rpath was given. @@ -21804,10 +22090,15 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking make" >&5 $as_echo_n "checking make... " >&6; } +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking how make searches directories" >&5 $as_echo_n "checking how make searches directories... " >&6; } while true; do #for break - # The most common method is `VPATH=DIR1 DIR2 ...' + ## The most common method is `VPATH=DIR1 DIR2 ...' cat >maketest <&6; } break fi - cat >maketest <maketest <&6; } break fi - cat >maketest <maketest <&6; } break fi - SEARCH_RULE='## SEARCH DISABLED: ' + ## No way for make to search directories + SEARCH_RULE='## SEARCH DISABLED: ' SEARCH_SEP=' ' { $as_echo "$as_me:${as_lineno-$LINENO}: result: it doesn't" >&5 $as_echo "it doesn't" >&6; } @@ -21873,8 +22168,13 @@ $as_echo "it doesn't" >&6; } done rm maketest +## ---------------------------------------------------------------------- +## pmake will throw an error if variables are undefined in a Makefile. +## These errors can be changed to warnings using the -V flag. +## AM_MAKEFLAGS="" +## Don't run test if MAKE is defined but is the empty string if test -n "${MAKE-make}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make will build with undefined variables" >&5 @@ -21897,6 +22197,10 @@ $as_echo "no, setting -V flag" >&6; } rm maketest fi +## ---------------------------------------------------------------------- +## Production flags? Save the value in $CONFIG_MODE so we have it for +## the record. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 $as_echo_n "checking for production mode... " >&6; } # Check whether --enable-production was given. @@ -21944,6 +22248,9 @@ $as_echo "user-defined" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check for system libraries. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 $as_echo_n "checking for ceil in -lm... " >&6; } if ${ac_cv_lib_m_ceil+:} false; then : @@ -21999,7 +22306,8 @@ fi if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 + ## ...for Solaris + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 @@ -22108,6 +22416,9 @@ fi fi +## ---------------------------------------------------------------------- +## Check for system header files. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : @@ -22272,6 +22583,11 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi +## ---------------------------------------------------------------------- +## 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). +## for ac_func in difftime do : ac_fn_c_check_func "$LINENO" "difftime" "ac_cv_func_difftime" @@ -22374,6 +22690,7 @@ fi done +## Unix for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -22426,6 +22743,7 @@ fi done +## Darwin for ac_header in mach/mach_time.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" @@ -22439,6 +22757,7 @@ fi done +## Windows case "`uname`" in CYGWIN*) for ac_header in io.h sys/timeb.h @@ -22537,7 +22856,11 @@ esac case "$host" in alpha*-dec*-osf*) - for ac_header in sys/sysinfo.h sys/proc.h + ## The and 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. + for ac_header in sys/sysinfo.h sys/proc.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -22552,7 +22875,11 @@ done ;; mips*-sgi*-irix*) - for ac_header in sys/fpu.h + ## The 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. + for ac_header in sys/fpu.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/fpu.h" "ac_cv_header_sys_fpu_h" "$ac_includes_default" if test "x$ac_cv_header_sys_fpu_h" = xyes; then : @@ -22578,22 +22905,33 @@ done ;; esac +## ---------------------------------------------------------------------- +## 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 $as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } case "`uname`" in CYGWIN*|MINGW*|AIX*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + ## Add in the -no-undefined flag to LDFLAGS for libtool. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } H5_LDFLAGS="$H5_LDFLAGS -no-undefined" ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + ## Don't add in anything. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi +## ---------------------------------------------------------------------- +## Test for Largefile support. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if configure should try to set up large file support" >&5 $as_echo_n "checking if configure should try to set up large file support... " >&6; } @@ -22603,11 +22941,14 @@ if test "${enable_largefile+set}" = set; then : fi +## If largefile support is enabled, then set up appropriate compiler options. if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 + ## Check for needed compiler options. This check is pulled drectly + ## from autoconf's AC_SYS_LARGEFILE macro, as of Autoconf v2.65. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 @@ -22616,9 +22957,9 @@ else 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. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ## IRIX 6.2 and later do not support large files by default, + ## so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -22645,16 +22986,16 @@ main () return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext - break + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -22666,8 +23007,15 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } CC=$CC$ac_cv_sys_largefile_CC fi + ## 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. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + ## Check for _FILE_OFFSET_BITS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 @@ -22753,7 +23101,8 @@ _ACEOF esac rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then + ## Check for _LARGE_FILES + if test "$ac_cv_sys_file_offset_bits" = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : @@ -22841,7 +23190,9 @@ esac rm -rf conftest* fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if large (64-bit) files are supported on this system." >&5 + ## Now actually test to see if we can create large files after we've + ## checked for any needed defines. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if large (64-bit) files are supported on this system." >&5 $as_echo_n "checking if large (64-bit) files are supported on this system.... " >&6; } if ${hdf5_cv_have_lfs+:} false; then : $as_echo_n "(cached) " >&6 @@ -22901,18 +23252,49 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Add necessary defines for Linux Systems. +## case "$host_cpu-$host_vendor-$host_os" in *linux*) - if test "X$LARGEFILE" != "Xno"; then + ## 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 - H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS" - - AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS" + ## Add POSIX support on Linux systems, so defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in . + ## 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" + + ## Also add BSD support on Linux systems, so defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in and snprintf & vsnprintf defined + ## correctly in + ## 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 +## 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" @@ -23005,6 +23387,9 @@ $as_echo "skipping test for stat64() and fstat64()" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## Data types and their sizes. +## ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : @@ -23652,6 +24037,7 @@ _ACEOF +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -23738,6 +24124,7 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## Posix.1g types (C9x) cat >>confdefs.h <<\EOF #include EOF @@ -24714,6 +25101,7 @@ _ACEOF +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -24800,6 +25188,9 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## ---------------------------------------------------------------------- +## Check if the dev_t type is a scalar type (must come after the check for +## sys/types.h) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dev_t is scalar" >&5 $as_echo_n "checking if dev_t is scalar... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24838,6 +25229,11 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## 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. +## # Check whether --with-fnord was given. if test "${with_fnord+set}" = set; then : @@ -24845,6 +25241,12 @@ if test "${with_fnord+set}" = set; then : fi +## ---------------------------------------------------------------------- +## 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. +## # Check whether --with-dmalloc was given. if test "${with_dmalloc+set}" = set; then : @@ -24951,7 +25353,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$dmalloc_inc" = "X/usr/include"; then + ## 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 if test "X$dmalloc_lib" = "X/usr/lib"; then @@ -25050,6 +25454,12 @@ fi ;; esac +## ---------------------------------------------------------------------- +## 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. +## USE_FILTER_DEFLATE="no" # Check whether --with-zlib was given. @@ -25162,7 +25572,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$zlib_inc" = "X/usr/include"; then + ## 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 if test "X$zlib_lib" = "X/usr/lib"; then @@ -25272,13 +25684,20 @@ $as_echo "#define HAVE_FILTER_DEFLATE 1" >>confdefs.h USE_FILTER_DEFLATE="yes" - if test "X$EXTERNAL_FILTERS" != "X"; then + ## Add "deflate" to external filter list + if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)" fi +## ---------------------------------------------------------------------- +## 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. +## USE_FILTER_SZIP="no" # Check whether --with-szlib was given. @@ -25386,7 +25805,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$szlib_inc" = "X/usr/include"; then + ## 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 if test "X$szlib_lib" = "X/usr/lib"; then @@ -25486,10 +25907,14 @@ fi esac if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5 + ## SZLIB library is available. Check if it can encode + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5 $as_echo_n "checking for szlib encoder... " >&6; } - if test -z "$LD_LIBRARY_PATH"; then + ## 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 export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH" @@ -25547,7 +25972,8 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } fi - if test ${hdf5_cv_szlib_can_encode} = "yes"; then + ## 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}," fi @@ -25571,6 +25997,7 @@ else fi +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -25657,6 +26084,13 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## ---------------------------------------------------------------------- +## 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. +## PTHREAD=yes # Check whether --with-pthread was given. @@ -25758,7 +26192,9 @@ $as_echo "suppressed" >&6; } ;; esac - if test "X$pthread_inc" = "X/usr/include"; then + ## 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 if test "X$pthread_lib" = "X/usr/lib"; then @@ -25922,6 +26358,9 @@ fi ;; esac +## ---------------------------------------------------------------------- +## Enable thread-safe version of library. It requires Pthreads support. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread safe support" >&5 $as_echo_n "checking for thread safe support... " >&6; } # Check whether --enable-threadsafe was given. @@ -25936,7 +26375,8 @@ case "X-$THREADSAFE" in $as_echo "no" >&6; } ;; X-yes) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ## Check that we can link a simple Pthread program. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef FC_DUMMY_MAIN @@ -25977,6 +26417,10 @@ $as_echo "#define HAVE_THREADSAFE 1" >>confdefs.h fi +## ---------------------------------------------------------------------- +## 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_fn_c_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include " if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes; then : @@ -25986,14 +26430,19 @@ else fi +## ---------------------------------------------------------------------- +## How does one figure out the local time zone? Anyone know of a +## Posix way to do this? +## +## First check if `struct tm' has a `tm_gmtoff' member. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5 $as_echo_n "checking for tm_gmtoff in struct tm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26014,7 +26463,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26022,13 +26471,14 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## check if `struct tm' has a `__tm_gmtoff' member. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tm_gmtoff in struct tm" >&5 $as_echo_n "checking for __tm_gmtoff in struct tm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26049,7 +26499,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE___TM_GMTOFF 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26057,6 +26507,7 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## Check whether the global variable `timezone' is defined. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for global timezone variable" >&5 $as_echo_n "checking for global timezone variable... " >&6; } @@ -26091,7 +26542,7 @@ if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_TIMEZONE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26102,6 +26553,7 @@ rm -f core conftest.err conftest.$ac_objext \ ;; esac +## Check whether `struct timezone' is defined. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : @@ -26225,9 +26677,9 @@ $as_echo_n "checking for struct timezone... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include + #include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26248,8 +26700,8 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h -have_struct_tz="yes" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + have_struct_tz="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26257,6 +26709,7 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday() gives timezone" >&5 @@ -26312,12 +26765,15 @@ $as_echo "no" >&6; } fi fi +## ---------------------------------------------------------------------- +## Does the struct stat have the st_blocks field? This field is not Posix. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blocks in struct stat" >&5 $as_echo_n "checking for st_blocks in struct stat... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -26338,7 +26794,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STAT_ST_BLOCKS 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26346,6 +26802,9 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## How do we figure out the width of a tty in characters? +## for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -26396,7 +26855,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STRUCT_VIDEOCONFIG 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26429,7 +26888,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_STRUCT_TEXT_INFO 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26462,7 +26921,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TIOCGWINSZ 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26495,7 +26954,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TIOCGETD 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26504,6 +26963,9 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## Check for functions. +## for ac_func in alarm BSDgettimeofday fork frexpf frexpl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -26577,6 +27039,9 @@ fi done +## 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 for ac_func in vsnprintf do : ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" @@ -26584,7 +27049,18 @@ if test "x$ac_cv_func_vsnprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VSNPRINTF 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf returns correct value" >&5 + ## 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) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf returns correct value" >&5 $as_echo_n "checking if vsnprintf returns correct value... " >&6; } if ${hdf5_cv_vsnprintf_works+:} false; then : @@ -26649,6 +27125,11 @@ fi done +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lone colon can be used as an argument" >&5 $as_echo_n "checking if lone colon can be used as an argument... " >&6; } if ${hdf5_cv_lone_colon+:} false; then : @@ -26676,6 +27157,9 @@ $as_echo "$hdf5_cv_lone_colon" >&6; } H5_LONE_COLON="$hdf5_cv_lone_colon" +## ---------------------------------------------------------------------- +## Check compiler characteristics +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : @@ -26833,7 +27317,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_ATTRIBUTE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26866,7 +27350,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_C99_FUNC 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26898,7 +27382,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_FUNCTION 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26938,7 +27422,7 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_C99_DESIGNATED_INITIALIZER 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26946,12 +27430,21 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print long long" >&5 $as_echo_n "checking how to print long long... " >&6; } if ${hdf5_cv_printf_ll+:} false; then : $as_echo_n "(cached) " >&6 else - LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" + +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 @@ -26961,17 +27454,17 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include + #include + #include + #include -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")); -} + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -26984,6 +27477,7 @@ fi done fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: %${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u" >&5 $as_echo "%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u" >&6; } @@ -26992,6 +27486,10 @@ cat >>confdefs.h <<_ACEOF _ACEOF +## ---------------------------------------------------------------------- +## Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) +## is supported on this system +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking Threads support system scope" >&5 $as_echo_n "checking Threads support system scope... " >&6; } if ${hdf5_cv_system_scope_threads+:} false; then : @@ -27006,20 +27504,20 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if STDC_HEADERS -#include -#include -#endif + #if STDC_HEADERS + #include + #include + #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); -} + pthread_attr_init(&attribute); + ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); + exit(ret==0 ? 0 : 1); + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -27045,6 +27543,9 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Checking to see if GPFS is available on this filesystem +## # Check whether --enable-gpfs was given. if test "${enable_gpfs+set}" = set; then : enableval=$enable_gpfs; @@ -27087,14 +27588,14 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_GPFS 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - LIBS="$LIBS -lgpfs" - GPFS="yes" + LIBS="$LIBS -lgpfs" + GPFS="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - GPFS="no" + GPFS="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -27110,6 +27611,10 @@ $as_echo "suppressed" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Turn on debugging by setting compiler flags +## This must come after the enable-production since it depends on production. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug flags" >&5 $as_echo_n "checking for debug flags... " >&6; } # Check whether --enable-debug was given. @@ -27118,6 +27623,7 @@ if test "${enable_debug+set}" = set; then : fi +## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then DEBUG_PKG=no @@ -27159,6 +27665,9 @@ if test -n "$DEBUG_PKG"; then done fi +## ---------------------------------------------------------------------- +## Check if they would like the function stack support compiled in +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function stack tracking is enabled" >&5 $as_echo_n "checking whether function stack tracking is enabled... " >&6; } # Check whether --enable-codestack was given. @@ -27183,6 +27692,9 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like the metadata trace file code compiled in +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether metadata trace file code is enabled" >&5 $as_echo_n "checking whether metadata trace file code is enabled... " >&6; } # Check whether --enable-metadata-trace-file was given. @@ -27207,6 +27719,10 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Enable tracing of the API +## This must come after the enable-debug since it depends on debug. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for API tracing" >&5 $as_echo_n "checking for API tracing... " >&6; }; @@ -27216,6 +27732,7 @@ if test "${enable_trace+set}" = set; then : fi +## Default to no if debug is disabled if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then TRACE=no @@ -27239,6 +27756,10 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Enable instrumenting of the library's internal operations +## This must come after the enable-debug since it depends on debug. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for instrumented library" >&5 $as_echo_n "checking for instrumented library... " >&6; }; @@ -27248,6 +27769,7 @@ if test "${enable_instrument+set}" = set; then : fi +## Default to no if debug is disabled if test "X-$INSTRUMENT" = X- ; then if test -z "$DEBUG_PKG" ; then INSTRUMENT=no @@ -27272,6 +27794,10 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Check if they would like to securely clear file buffers before they are +## written. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to clear file buffers" >&5 $as_echo_n "checking whether to clear file buffers... " >&6; } @@ -27297,6 +27823,12 @@ $as_echo "no" >&6; } ;; esac +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a memory checking tool will be used" >&5 $as_echo_n "checking whether a memory checking tool will be used... " >&6; } @@ -27322,6 +27854,7 @@ $as_echo "no" >&6; } ;; esac +## Checkpoint the cache cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -27408,24 +27941,40 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## 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. +## # Check whether --enable-parallel was given. if test "${enable_parallel+set}" = set; then : enableval=$enable_parallel; fi +## 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 as_fn_error $? "--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 fi fi +## --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 as_fn_error $? "--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 fi fi +## 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 as_fn_error $? "An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error." "$LINENO" 5 @@ -27439,16 +27988,23 @@ fi $as_echo_n "checking for parallel support files... " >&6; } case "X-$enable_parallel" in X-|X-no|X-none) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 + ## 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). + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 $as_echo "skipped" >&6; } ;; X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: provided by compiler" >&5 + ## We want to compile a parallel library with a compiler that + ## may already know how to link with MPI and MPI-IO. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: provided by compiler" >&5 $as_echo "provided by compiler" >&6; } PARALLEL=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ## Try link a simple MPI program. If fail, try again with -lmpi and + ## -lmpich. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef FC_DUMMY_MAIN @@ -27470,8 +28026,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : else - \ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 @@ -27523,8 +28078,7 @@ _ACEOF LIBS="-lmpi $LIBS" else - \ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 @@ -27585,7 +28139,9 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "X$PARALLEL" = "Xyes"; then + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. + if test "X$PARALLEL" = "Xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27669,13 +28225,15 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "X$HDF_FORTRAN" = "Xyes"; then - ac_ext=${ac_fc_srcext-f} + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - cat > conftest.$ac_ext <<_ACEOF + ## Try link a simple MPI program. If fail, try again with -lmpi. + cat > conftest.$ac_ext <<_ACEOF program main include 'mpif.h' @@ -27738,7 +28296,9 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "X$PARALLEL" = "Xyes"; then + ## Then try link a simple MPI-IO program. If fail, try again with + ## -lmpio. + if test "X$PARALLEL" = "Xyes"; then cat > conftest.$ac_ext <<_ACEOF program main @@ -27803,7 +28363,8 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi - ac_ext=c + ## Change to the C language + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -27811,8 +28372,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi - if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then - for path in `echo $PATH | ${TR} ":" " "`; do + ## 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 + ## 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}" break; @@ -27820,7 +28385,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu done fi - if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then + ## Set RUNPARALLEL to mpiexec if not set yet. + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" fi ;; @@ -27832,16 +28398,22 @@ $as_echo "error" >&6; } ;; esac +## ---------------------------------------------------------------------- +## Print some other parallel information and do some sanity checks. +## ADD_PARALLEL_FILES="no" if test -n "$PARALLEL"; then - TESTPARALLEL=testpar + ## The 'testpar' directory should participate in the build + TESTPARALLEL=testpar + ## We are building a parallel library $as_echo "#define HAVE_PARALLEL 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for running on one processor" >&5 + ## Display what we found about running programs + { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for running on one processor" >&5 $as_echo_n "checking prefix for running on one processor... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNSERIAL" >&5 $as_echo "$RUNSERIAL" >&6; } @@ -27850,7 +28422,8 @@ $as_echo_n "checking prefix for running in parallel... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNPARALLEL" >&5 $as_echo "$RUNPARALLEL" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO program can be linked" >&5 + ## Check that we can link a simple MPI and MPI-IO application + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO program can be linked" >&5 $as_echo_n "checking whether a simple MPI-IO program can be linked... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27882,11 +28455,15 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test -z "$RUNPARALLEL"; then + ## There *must* be some way to run in parallel even if it's just the + ## word `none'. + if test -z "$RUNPARALLEL"; then as_fn_error $? "no way to run a parallel program" "$LINENO" 5 fi - if test "X$RUNSERIAL" = "Xnone"; then + ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with + ## the empty string. + if test "X$RUNSERIAL" = "Xnone"; then RUNSERIAL="" fi if test "X$RUNPARALLEL" = "Xnone"; then @@ -27967,7 +28544,13 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi - MPE=yes + ## -------------------------------------------------------------------- + ## 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 # Check whether --with-mpe was given. if test "${with_mpe+set}" = set; then : @@ -28125,7 +28708,9 @@ fi ;; esac - if test "X$mpe_inc" = "X/usr/include"; then + ## 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 if test "X$mpe_lib" = "X/usr/lib"; then @@ -28405,7 +28990,13 @@ $as_echo "#define HAVE_MPE 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MPI_File_set_size works for files over 2GB" >&5 + ## ---------------------------------------------------------------------- + ## 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) + ## + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MPI_File_set_size works for files over 2GB" >&5 $as_echo_n "checking if MPI_File_set_size works for files over 2GB... " >&6; } if ${hdf5_cv_mpi_file_set_size_big+:} false; then : $as_echo_n "(cached) " >&6 @@ -28425,7 +29016,14 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } fi - # Check whether --enable-mpi-size was given. + ## ---------------------------------------------------------------------- + ## 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.) + ## + # Check whether --enable-mpi-size was given. if test "${enable_mpi_size+set}" = set; then : enableval=$enable_mpi_size; MPI_GET_SIZE=$enableval fi @@ -28452,6 +29050,14 @@ $as_echo "#define HAVE_MPI_GET_SIZE 1" >>confdefs.h esac fi +## ---------------------------------------------------------------------- +## 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. +## USE_FILTER_SHUFFLE="no" USE_FILTER_FLETCHER32="no" @@ -28465,6 +29071,7 @@ if test "${enable_filters+set}" = set; then : fi +## Eventually: all_filters="shuffle,foo,bar,baz" all_filters="shuffle,fletcher32,nbit,scaleoffset" case "X-$FILTERS" in X-|X-all) @@ -28485,7 +29092,11 @@ esac if test -n "$FILTERS"; then for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do - if test $filter = "SHUFFLE"; then + ## ------------------------------------------------------------------ + ## 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 $as_echo "#define HAVE_FILTER_SHUFFLE 1" >>confdefs.h @@ -28512,12 +29123,19 @@ $as_echo "#define HAVE_FILTER_SCALEOFFSET 1" >>confdefs.h done fi +## ---------------------------------------------------------------------- +## This is defined only when we're using CodeWarrior, since it has a +## broken "open()" call. +# if test 1 = 2; then $as_echo "#define NO_SHARED_WRITING 1" >>confdefs.h fi +## -------------------------------------------------------------------------- +## Should the Default Virtual File Driver be compiled? +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Default Virtual File Driver definition" >&5 $as_echo_n "checking for Default Virtual File Driver definition... " >&6; } @@ -28554,6 +29172,9 @@ _ACEOF fi +## ---------------------------------------------------------------------- +## Check if Direct I/O driver is enabled by --enable-direct-vfd +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Direct Virtual File Driver support" >&5 $as_echo_n "checking for Direct Virtual File Driver support... " >&6; } @@ -28654,6 +29275,12 @@ else fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether exception handling functions is checked during data conversions" >&5 $as_echo_n "checking whether exception handling functions is checked during data conversions... " >&6; } # Check whether --enable-dconv-exception was given. @@ -28675,6 +29302,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether data accuracy is guaranteed during data conversions" >&5 $as_echo_n "checking whether data accuracy is guaranteed during data conversions... " >&6; } # Check whether --enable-dconv-accuracy was given. @@ -28696,6 +29329,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting denormalized floating-point values is possible" >&5 $as_echo_n "checking if converting denormalized floating-point values is possible... " >&6; } if ${hdf5_cv_convert_denormal_float+:} false; then : @@ -28716,6 +29355,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting floating-point values to long long is not working" >&5 $as_echo_n "checking if converting floating-point values to long long is not working... " >&6; } if ${hdf5_cv_convert_float_llong_not_works+:} false; then : @@ -28736,6 +29381,12 @@ else $as_echo "false" >&6; } fi +## ---------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the machine has window style path name" >&5 $as_echo_n "checking if the machine has window style path name... " >&6; } @@ -28753,6 +29404,13 @@ $as_echo "no" >&6; } ;; esac +## ----------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting from long double to integers is accurate" >&5 $as_echo_n "checking if converting from long double to integers is accurate... " >&6; } @@ -28778,6 +29436,13 @@ else $as_echo "no" >&6; } fi +## ----------------------------------------------------------------------- +## 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) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting from long double to integers works" >&5 $as_echo_n "checking if converting from long double to integers works... " >&6; } @@ -28844,6 +29509,13 @@ else $as_echo "no" >&6; } fi +## ----------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting from integers to long double" >&5 $as_echo_n "checking if accurately converting from integers to long double... " >&6; } @@ -28869,6 +29541,14 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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.) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting unsigned long to float values" >&5 $as_echo_n "checking if accurately converting unsigned long to float values... " >&6; } @@ -28937,6 +29617,14 @@ $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting unsigned long long to floating-point values" >&5 $as_echo_n "checking if accurately converting unsigned long long to floating-point values... " >&6; } @@ -29044,6 +29732,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately roundup converting floating-point to unsigned long long values" >&5 $as_echo_n "checking if accurately roundup converting floating-point to unsigned long long values... " >&6; } @@ -29100,6 +29795,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if right maximum converting floating-point to unsigned long long values" >&5 $as_echo_n "checking if right maximum converting floating-point to unsigned long long values... " >&6; } @@ -29163,6 +29865,11 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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.) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to unsigned int values" >&5 $as_echo_n "checking if correctly converting long double to unsigned int values... " >&6; } @@ -29220,6 +29927,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling unsigned long long to floating-point typecasts work" >&5 $as_echo_n "checking if compiling unsigned long long to floating-point typecasts work... " >&6; } if ${hdf5_cv_ullong_to_fp_cast_works+:} false; then : @@ -29240,6 +29954,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling long long to floating-point typecasts work" >&5 $as_echo_n "checking if compiling long long to floating-point typecasts work... " >&6; } if ${hdf5_cv_llong_to_fp_cast_works+:} false; then : @@ -29260,6 +29981,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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.) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting unsigned long long to long double with precision" >&5 $as_echo_n "checking if converting unsigned long long to long double with precision... " >&6; } @@ -29377,6 +30105,13 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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). +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if overflows normally converting floating-point to integer values" >&5 $as_echo_n "checking if overflows normally converting floating-point to integer values... " >&6; } @@ -29427,6 +30162,15 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if using special algorithm to convert long double to (unsigned) long values" >&5 $as_echo_n "checking if using special algorithm to convert long double to (unsigned) long values... " >&6; } @@ -29524,6 +30268,14 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if using special algorithm to convert (unsigned) long to long double values" >&5 $as_echo_n "checking if using special algorithm to convert (unsigned) long to long double values... " >&6; } @@ -29623,6 +30375,15 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to (unsigned) long long values" >&5 $as_echo_n "checking if correctly converting long double to (unsigned) long long values... " >&6; } @@ -29704,6 +30465,13 @@ $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting (unsigned) long long to long double values" >&5 $as_echo_n "checking if correctly converting (unsigned) long long to long double values... " >&6; } @@ -29788,6 +30556,12 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## 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) +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bad code for log2 routine is generated" >&5 $as_echo_n "checking if bad code for log2 routine is generated... " >&6; } if ${hdf5_cv_bad_log2_code_generated+:} false; then : @@ -29808,19 +30582,28 @@ else $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Set some variables for general configuration information to be saved +## and installed with the libraries. +## +## HDF5 version from the first line of the README.txt file. H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" +## Configuration date CONFIG_DATE="`date`" +## User doing the configuration CONFIG_USER="`whoami`@`hostname`" if test -n "$ORGANIZATION"; then CONFIG_USER="$CONFIG_USER at $ORGANIZATION" fi +## Configuration mode (production, development, profile, etc) saved above. +## Byte sex from the AC_C_BIGENDIAN macro. if test "X$ac_cv_c_bigendian" = "Xyes"; then BYTESEX="big-endian" @@ -29836,9 +30619,13 @@ else fi +## Parallel support? (set above except empty if none) PARALLEL=${PARALLEL:-no} +## Compiler with version information. This consists of the full path +## name of the compiler and the reported version number. +## 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 @@ -29857,6 +30644,7 @@ if test -n "$cc_version_info"; then fi +## 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 @@ -29875,6 +30663,7 @@ if test -n "$fc_version_info"; then fi +## 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 @@ -29892,6 +30681,12 @@ if test -n "$cxx_version_info"; then CXX_VERSION="$CXX_VERSION ( $cxx_version_info)" fi +## ---------------------------------------------------------------------- +## 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 @@ -29899,8 +30694,16 @@ else fi ROOT="`$pwd`" +## ---------------------------------------------------------------------- +## Move any compiler-specific libraries into the main LIBS varaible. +## LIBS="$DEFAULT_LIBS $LIBS" +## ---------------------------------------------------------------------- +## Determine the runtime libraries we may need to include in the +## libtools command so that executables will find the correct dynamic +## libraries. +## DYNAMIC_DIRS="" if test -n "$AM_LDFLAGS $LDFLAGS"; then @@ -29910,7 +30713,9 @@ if test -n "$AM_LDFLAGS $LDFLAGS"; then d="`echo $d | sed -e 's/-L//g'`" case "$d" in .*) - d=${ROOT}/$d + ## If the path isn't absolute, make it so by + ## prepending the ROOT directory to it. + d=${ROOT}/$d ;; esac DYNAMIC_DIRS="-R${d} $DYNAMIC_DIRS" @@ -29924,7 +30729,9 @@ if test -n "$AM_CPPFLAGS"; then for d in $AM_CPPFLAGS ; do case "$d" in -I.*) - d="`echo $d | sed -e 's/-I//g'`" + ## 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}" ;; esac @@ -29933,9 +30740,12 @@ if test -n "$AM_CPPFLAGS"; then AM_CPPFLAGS=$TEMP_CPPFLAGS fi +## ---------------------------------------------------------------------- +## Check if they would like the High Level library compiled +## HL="" -# name of fortran folder inside "hl", if FORTRAN compile is requested +## name of fortran folder inside "hl", if FORTRAN compile is requested HL_FOR="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 $as_echo_n "checking if high level library is enabled... " >&6; } @@ -29957,6 +30767,11 @@ else echo "no" fi +## ---------------------------------------------------------------------- +## 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. +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional programs should be built" >&5 $as_echo_n "checking additional programs should be built... " >&6; } # Check whether --enable-build-all was given. @@ -29981,6 +30796,9 @@ else fi +## ---------------------------------------------------------------------- +## Enable deprecated public API symbols +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if deprecated public symbols are available" >&5 $as_echo_n "checking if deprecated public symbols are available... " >&6; }; @@ -30008,6 +30826,9 @@ $as_echo "#define NO_DEPRECATED_SYMBOLS 1" >>confdefs.h ;; esac +## -------------------------------------------------------------------------- +## Which version of the public APIs should the 'base' versioned symbols use? +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking which version of public symbols to use by default" >&5 @@ -30040,12 +30861,19 @@ else as_fn_error $? "invalid version of public symbols given" "$LINENO" 5 fi +## 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 as_fn_error $? "Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error." "$LINENO" 5 fi fi +## ---------------------------------------------------------------------- +## Enable strict file format checks +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to perform strict file format checks" >&5 $as_echo_n "checking Whether to perform strict file format checks... " >&6; }; @@ -30055,6 +30883,7 @@ if test "${enable_strict_format_checks+set}" = set; then : fi +## Default to yes if debug is enabled if test "X-$STRICT_CHECKS" = X- ; then if test -z "$DEBUG_PKG" ; then STRICT_CHECKS=no @@ -30080,6 +30909,9 @@ $as_echo "no" >&6; } esac +## ---------------------------------------------------------------------- +## Enable embedded library information +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking Whether to have library information embedded in the executables" >&5 $as_echo_n "checking Whether to have library information embedded in the executables... " >&6; } # Check whether --enable-embedded-libinfo was given. @@ -30102,6 +30934,9 @@ $as_echo "no" >&6; } fi +## ---------------------------------------------------------------------- +## Check if pointer alignments are enforced +## { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alignment restrictions are strictly enforced" >&5 $as_echo_n "checking if alignment restrictions are strictly enforced... " >&6; } if test "$cross_compiling" = yes; then : @@ -30183,6 +31018,8 @@ fi +## ---------------------------------------------------------------------- +## Restore user's CFLAGS. CFLAGS="$saved_user_CFLAGS" FCFLAGS="$saved_user_FCFLAGS" CXXFLAGS="$saved_user_CXXFLAGS" @@ -30190,6 +31027,9 @@ CPPFLAGS="$saved_user_CPPFLAGS" LDFLAGS="$saved_user_LDFLAGS" +## ---------------------------------------------------------------------- +## Create automake conditionals to tell automake makefiles which directories +## need to be compiled if test "X$HDF_CXX" = "Xyes"; then BUILD_CXX_CONDITIONAL_TRUE= @@ -30225,26 +31065,37 @@ fi +## ---------------------------------------------------------------------- +## Build the Makefiles. +## +## The directory search list SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"' SEARCH="$SEARCH_RULE`eval $cmd`" export SEARCH +## 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 SETX=":" else SETX="set -x" fi +## Some cleanup stuff rm -f conftest conftest.o conftest.c dummy.o *.mod +## 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 @@ -31034,7 +31885,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" @@ -31509,7 +32359,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;; - "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;; @@ -32182,7 +33032,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "default-1":C) + "pubconf":C) echo "creating src/H5pubconf.h" sed 's/#define /#define H5_/' pubconf @@ -35163,15 +36013,16 @@ $lt_cl_success || as_fn_exit 1 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 +## 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 @@ -35185,6 +36036,12 @@ EOF ;; esac +## 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 @@ -35217,6 +36074,9 @@ if test "X$HDF_CXX" = "Xyes"; then chmod 755 c++/src/h5c++ fi +## 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 <> src/H5config.h <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 <maketest <maketest < and 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 and 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 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 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 defines - dnl __USE_POSIX, which is required to get the prototype for fdopen - dnl defined correctly in . - 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 defines + ## __USE_POSIX, which is required to get the prototype for fdopen + ## defined correctly in . + ## 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 defines - dnl __USE_BSD, which is required to get the prototype for strdup - dnl defined correctly in and snprintf & vsnprintf defined - dnl correctly in - 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 defines + ## __USE_BSD, which is required to get the prototype for strdup + ## defined correctly in and snprintf & vsnprintf defined + ## correctly in + ## 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 ], [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 #include ], @@ -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 does not define.])]) +AC_CHECK_TYPE([ssize_t], [], + [AC_DEFINE_UNQUOTED([ssize_t], [long], + [Define to `long' if does not define.])]) +AC_CHECK_TYPE([ptrdiff_t], [], + [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], + [Define to `long' if 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 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 ]]) +## ---------------------------------------------------------------------- +## 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 ]]) -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 -#include ], [struct tm tm; tm.tm_gmtoff=0;], -AC_DEFINE([HAVE_TM_GMTOFF], [1], + #include + #include ], [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 -#include ], [struct tm tm; tm.__tm_gmtoff=0;], -AC_DEFINE([HAVE___TM_GMTOFF], [1], + #include + #include ], [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 #include ], [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 -#include -#include ], [struct timezone tz; tz.tz_minuteswest=0;], -AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], + #include + #include + #include ], [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 ],[struct stat sb; sb.st_blocks=0;], -AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], + #include ],[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 ],[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 ],[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 -#include -#include + #include + #include + #include -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 -#include -#endif + [AC_TRY_RUN([ + #if STDC_HEADERS + #include + #include + #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 ], [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 <> src/H5config.h <