summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
author(no author) <(no author)@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-10-26 21:03:52 (GMT)
committer(no author) <(no author)@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-10-26 21:03:52 (GMT)
commit77d972ffc3f83c4fdb9f14ad98c24ce67fb24b36 (patch)
tree4848bf9eccacc71e1fe72795d88fb98e762b2b67 /addon
parent49dcfeef8aaeca15320299194569f97b86a7e153 (diff)
downloadDoxygen-Release_1_3_4_20031026.zip
Doxygen-Release_1_3_4_20031026.tar.gz
Doxygen-Release_1_3_4_20031026.tar.bz2
This commit was manufactured by cvs2svn to create tagRelease_1_3_4_20031026
'Release_1_3_4_20031026'.
Diffstat (limited to 'addon')
0 files changed, 0 insertions, 0 deletions
S="${AM_FCFLAGS}" +AM_CPPFLAGS="${AM_CPPFLAGS}" +AM_LDFLAGS="${AM_LDFLAGS}" +CFLAGS="${CFLAGS}" +CXXFLAGS="${CXXFLAGS}" +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. +## +AC_MSG_CHECKING([shell variables initial values]) +set >&AS_MESSAGE_LOG_FD +AC_MSG_RESULT([done]) + +## 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. +## 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([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`" +if test $BASENAME_TEST != "basename_works"; then + AC_MSG_ERROR([basename program doesn't work]) +else + AC_MSG_RESULT([yes]) +fi + +AC_MSG_CHECKING([if xargs works]) +XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`" +if test $XARGS_TEST != "xargs_works"; then + AC_MSG_ERROR([xargs program doesn't work]) +else + AC_MSG_RESULT([yes]) +fi + +## ---------------------------------------------------------------------- +## 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]) +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*) + host_os_novers=aix + ;; + freebsd*) + host_os_novers=freebsd + ;; + irix5.*) + host_os_novers=irix5.x + ;; + irix6.*) + host_os_novers=irix6.x + ;; + osf4.*) + host_os_novers=osf4.x + ;; + osf5.*) + host_os_novers=osf5.x + ;; + solaris2.*) + host_os_novers=solaris2.x + ;; + *) + host_os_novers=$host_os + ;; +esac + +host_config="none" +for f in $host_cpu-$host_vendor-$host_os \ + $host_cpu-$host_vendor-$host_os_novers \ + $host_vendor-$host_os \ + $host_vendor-$host_os_novers \ + $host_cpu-$host_os \ + $host_cpu-$host_os_novers \ + $host_cpu-$host_vendor \ + $host_os \ + $host_os_novers \ + $host_vendor \ + $host_cpu ; do + AC_MSG_CHECKING([for config $f]) + if test -f "$srcdir/config/$f"; then + host_config=$srcdir/config/$f + AC_MSG_RESULT([found]) + break + fi + AC_MSG_RESULT([no]) +done +if test "X$host_config" != "Xnone"; then + CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" + . $host_config +fi + +## Source any special site-specific file +hname="`hostname`" +while test -n "$hname"; do + file=$srcdir/config/site-specific/host-$hname + AC_MSG_CHECKING([for config $file]) + if test -f "$file"; then + . $file + AC_MSG_RESULT([found]) + break + fi + AC_MSG_RESULT([no]) + hname_tmp=$hname + hname="`echo $hname | cut -d. -f2-99`" + 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_PROG_CC +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. +AC_MSG_CHECKING([if unsupported combinations of configure options are allowed]) +AC_ARG_ENABLE([unsupported], + [AS_HELP_STRING([--enable-unsupported], + [Allow unsupported combinations of configure options])], + [ALLOW_UNSUPPORTED=$enableval]) + +case "X-$ALLOW_UNSUPPORTED" in + X-|X-no) + AC_MSG_RESULT([no]) + ;; + X-yes) + AC_MSG_RESULT([yes]) + ;; + *) + ;; +esac + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-fortran], + [Compile the Fortran 77/90/95 interface [default=no]])], + [HDF_FORTRAN=$enableval]) + +if test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" +else + echo "no" +fi + + +## ---------------------------------------------------------------------- +## Check if they would like the Fortran 2003 interface compiled +## +AC_MSG_CHECKING([if Fortran 2003 interface enabled]) +AC_ARG_ENABLE([fortran2003], + [AS_HELP_STRING([--enable-fortran2003], + [Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no]])], + [HDF_FORTRAN2003=$enableval]) + +## ---------------------------------------------------------------------- +## 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" + AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003]) +else + echo "yes" +fi + +HAVE_SIZEOF="no" +HAVE_C_SIZEOF="no" +HAVE_STORAGE_SIZE="no" +FORTRAN_DEFAULT_REALisDBLE="no" + +if test "X$HDF_FORTRAN" = "Xyes"; then + + AC_SUBST([FC]) HDF_FORTRAN=yes + AC_SUBST([HAVE_FORTRAN_2003]) + + HDF5_INTERFACES="$HDF5_INTERFACES fortran" + + ## -------------------------------------------------------------------- + ## Default for FORTRAN 2003 compliant compilers + ## + HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" + + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## + AC_SUBST([R_LARGE]) + AC_SUBST([R_INTEGER]) + AC_SUBST([HADDR_T]) + AC_SUBST([HSIZE_T]) + AC_SUBST([HSSIZE_T]) + AC_SUBST([HID_T]) + AC_SUBST([SIZE_T]) + AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) + + ## -------------------------------------------------------------------- + ## Fortran source extention + ## + AC_FC_SRCEXT([f90]) + + AC_SUBST([F9XSUFFIXFLAG]) + AC_SUBST([FSEARCH_DIRS]) + + ## -------------------------------------------------------------------- + ## 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 + + ## 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 + + ## Change to the Fortran 90 language + AC_LANG_PUSH(Fortran) + + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + AC_FC_WRAPPERS + + ## -------------------------------------------------------------------- + ## See if the compiler will support the "-I." option + ## + dnl AM_FCFLAGS_saved=$AM_FCFLAGS + dnl AM_FCFLAGS="${AM_FCFLAGS} -I." + + dnl AC_MSG_CHECKING(if compiler supports -I. option) + dnl AC_TRY_FCOMPILE([ + dnl program conftest + dnl end + dnl ], AC_MSG_RESULT(yes), + dnl AC_MSG_RESULT(no) + dnl AM_FCFLAGS="$AM_FCFLAGS_saved") + + ## -------------------------------------------------------------------- + ## 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]) + HAVE_SIZEOF="yes"], + [AC_MSG_RESULT([no])]) + + ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + + AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) + AC_TRY_RUN([ + PROGRAM main + USE ISO_C_BINDING + INTEGER(C_INT) :: a + INTEGER(C_SIZE_T) :: result + result = C_SIZEOF(a) + END PROGRAM + ], [AC_MSG_RESULT([yes]) + HAVE_C_SIZEOF="yes"], + [AC_MSG_RESULT([no])]) + + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + + AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) + AC_TRY_RUN([ + PROGRAM main + INTEGER :: a + INTEGER :: result + result = STORAGE_SIZE(a) + END PROGRAM + ], [AC_MSG_RESULT([yes]) + HAVE_STORAGE_SIZE="yes"], + [AC_MSG_RESULT([no])]) + + ## 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]) + + AC_TRY_RUN([ + MODULE type_mod + INTERFACE h5t + MODULE PROCEDURE h5t_real + MODULE PROCEDURE h5t_dble + END INTERFACE + CONTAINS + SUBROUTINE h5t_real(r) + REAL :: r + END SUBROUTINE h5t_real + SUBROUTINE h5t_dble(d) + DOUBLE PRECISION :: d + END SUBROUTINE h5t_dble + END MODULE type_mod + PROGRAM main + USE type_mod + REAL :: r + DOUBLE PRECISION :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + ], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + FORTRAN_DEFAULT_REALisDBLE="yes"]) + + 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. + + AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) + HAVE_FORTRAN_2003="no" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + ])], + [AC_MSG_RESULT([yes]) + HAVE_F2003_REQUIREMENTS=[yes]], + [AC_MSG_RESULT([no])]) + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + ## 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" + fi + fi +else + FC="no" +fi + +## Change back to the C language +AC_LANG_POP(Fortran) + +AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE" = "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"]) + + + +## ---------------------------------------------------------------------- +## 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 ## this is checked for when AC_HEADER_STDC is done + +AC_MSG_CHECKING([if c++ interface enabled]) + +AC_ARG_ENABLE([cxx], + [AS_HELP_STRING([--enable-cxx], + [Compile the C++ interface [default=no]])], + [HDF_CXX=$enableval]) + +if test "X$HDF_CXX" = "Xyes"; then + echo "yes" + HDF5_INTERFACES="$HDF5_INTERFACES c++" + + ## Change to the C++ language + AC_LANG_PUSH(C++) + + AC_MSG_CHECKING([if $CXX needs old style header files in includes]) + AC_TRY_RUN([ +#include + +int main(void) { return 0; } + ], [ + echo no + ], [ + echo yes + CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" + AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" + ]) + + AC_MSG_CHECKING([if $CXX can handle namespaces]) + AC_TRY_RUN([ +namespace H5 { +int fnord; +} + +int main(void) { + using namespace H5; + fnord = 37; + return 0; +} + ], [ + echo yes + ], [ + echo no + CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" + ]) + + AC_MSG_CHECKING([if $CXX supports std]) + AC_TRY_RUN([ +#include + +using namespace std; + +int main(void) { + string myString("testing namespace std"); + return 0; +} + ], [ + echo yes + ], [ + echo no + CXXFLAGS="${CXXFLAGS} -DH5_NO_STD" + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD" + ]) + + AC_MSG_CHECKING([if $CXX supports bool types]) + AC_TRY_RUN([ +int main(void) { + bool flag; + return 0; +} + ], [ + echo yes + ], [ + echo no + CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" + AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED" + ]) + + AC_MSG_CHECKING([if $CXX has offsetof extension]) + AC_TRY_COMPILE([ + #include + #include + ],[ + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) + ], + AC_DEFINE([CXX_HAVE_OFFSETOF], [1], + [Define if C++ compiler recognizes offsetof]) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) + + AC_MSG_CHECKING([if $CXX can handle static cast]) + AC_TRY_RUN([ +int main(void) { + float test_float; + int test_int; + test_float = 37.0; + test_int = static_cast (test_float); + return 0; +} + ], [ + echo yes + ], [ + echo no + CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" + AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" + ]) +else + echo "no" + CXX="no" +fi + +## Change back to the C language +AC_LANG_POP(C++) + +## ---------------------------------------------------------------------- +## 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 + + +## ---------------------------------------------------------------------- +## 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]) + +## Export the AR macro so that it will be placed in the libtool file +## correctly. +export AR + +AC_PROG_MAKE_SET +AC_PROG_INSTALL + + +## ---------------------------------------------------------------------- +## Check that the tr utility is working properly. + +AC_PATH_PROG([TR], [tr]) + +TR_TEST=`echo Test | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "` +if test "X${TR_TEST}" != "XTEST"; then + AC_MSG_ERROR([tr program doesn't work]) +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. +AC_MSG_CHECKING([if srcdir= and time commands work together]) + +AC_SUBST([TIME]) +TIME=time +TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` + +if test "X${TIME_TEST}" = "Xbaz"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + TIME= +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. +## +AC_SUBST([PARALLEL]) +AC_SUBST([RUNSERIAL]) +AC_SUBST([RUNPARALLEL]) +AC_SUBST([TESTPARALLEL]) + +## ---------------------------------------------------------------------- +## 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) + ## The mpich compiler. Use mpiexec from the same directory if it + ## exists. + PARALLEL=mpicc + AC_MSG_CHECKING([for mpiexec]) + + ## 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 + for path in `echo $PATH | ${TR} ":" " "`; do + if test -x $path/$cmd; then + break + fi + done + fi + + ## Is there an mpiexec at that path? + if test -x $path/mpiexec; then + AC_MSG_RESULT([$path/mpiexec]) + RUNSERIAL="${RUNSERIAL:-none}" + + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/mpiexec -n \$\${NPROCS:=6}" + fi + else + AC_MSG_RESULT([none]) + fi + ;; + + mpcc|mpcc_r) + ## 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 + ## Change to the Fortran 90 language + AC_LANG_PUSH(Fortran) + + case "$FC" in + *mpif90*) + ## The Fortran mpich compiler. Use mpiexec from the same directory + ## if it exists. + PARALLEL=mpif90 + AC_MSG_CHECKING([for mpiexec]) + + ## 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 + for path in `echo $PATH | ${TR} ":" " "`; do + if test -x $path/$cmd; then + break; + fi + done + fi + + ## Is there an mpiexec at that path? + if test -x $path/mpiexec; then + AC_MSG_RESULT([$path/mpiexec]) + RUNSERIAL="${RUNSERIAL:-none}" + + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/mpiexec -n \$\${NPROCS:=6}" + fi + else + AC_MSG_RESULT([none]) + fi + ;; + + *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) + ## 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 + + ## Change to the C language + AC_LANG_POP(Fortran) +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' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries explicitly enabled by user' +elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries disabled when a parallel compiler is being used' + enable_shared="no" +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). +## +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" + + ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) + + case "`uname`" in + Darwin*) + H5_FORTRAN_SHARED="no" + CHECK_WARN="Shared Fortran libraries not currently supported on Mac." + ;; + esac + + ## Report results of check(s) + + if test "X${H5_FORTRAN_SHARED}" = "Xno"; then + AC_MSG_RESULT([no]) + AC_MSG_WARN([$CHECK_WARN]) + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + AC_MSG_WARN([Disabling shared Fortran libraries.]) + AC_MSG_WARN([To override this behavior, please use --enable-unsupported configure option.]) + if test "X${enable_static}" = "Xno"; then + AC_MSG_ERROR([both static and shared Fortran libraries are disabled]) + fi + else + AC_MSG_WARN([Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag]) + H5_FORTRAN_SHARED="yes" + fi + else + AC_MSG_RESULT([yes]) + fi +fi + +AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"]) + +## ---------------------------------------------------------------------- +## 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" + + ## 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 + AC_MSG_RESULT([no]) + AC_MSG_WARN([$CHECK_WARN]) + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + AC_MSG_WARN([Disabling shared C++ libraries.]) + AC_MSG_WARN([To override this behavior, please use --enable-unsupported configure option.]) + if test "X${enable_static}" = "Xno"; then + AC_MSG_ERROR([both static and shared C++ libraries are disabled]) + fi + else + AC_MSG_WARN([Allowing unsupported C++ shared librares due to use of --enable-unsupported flag]) + fi + else + AC_MSG_RESULT([yes]) + fi +fi + +AM_CONDITIONAL([CXX_SHARED_CONDITIONAL], [test "X$H5_CXX_SHARED" = "Xyes"]) + +## ---------------------------------------------------------------------- +## 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 + CYGWIN*) + if test "X${enable_shared}" = "Xyes"; then + echo ' warning: shared libraries are not supported on Cygwin!' + echo ' disabling shared libraries' + echo ' use --enable-unsupported to override this warning and keep shared libraries enabled' + fi + enable_shared="no" + ;; + esac +fi + +## ---------------------------------------------------------------------- +## Windows won't create DLLs without the following macro. +## +AC_LIBTOOL_WIN32_DLL + +## ---------------------------------------------------------------------- +## Create libtool. If shared/static libraries are going to be enabled +## or disabled, it should happen before these macros. +LT_PREREQ([2.2]) +LT_INIT([dlopen]) + +## ---------------------------------------------------------------------- +## 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], + [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" + ## 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." + LT_STATIC_EXEC="" + else + LT_STATIC_EXEC="-all-static" + fi +else + echo "no" + LT_STATIC_EXEC="" +fi +AM_CONDITIONAL([USE_PLUGINS_CONDITIONAL], [test "X$LT_STATIC_EXEC" = X]) + +AC_SUBST([LT_STATIC_EXEC]) + +## 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. +AC_MSG_CHECKING([if -Wl,-rpath should be used to link shared libs in nondefault directories]) +AC_ARG_ENABLE([sharedlib-rpath], + [AS_HELP_STRING([--disable-sharedlib-rpath], + [Disable use of the '=Wl,-rpath' linker option])], + [RPATH=$enableval]) + +case "X-$RPATH" in + X-no) + AC_MSG_RESULT([no]) + runpath_var= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_into_libs=no + ;; + X-|X-yes) + AC_MSG_RESULT([yes]) + ;; + *) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enableval\' is not a valid rpath type]) + ;; +esac + +## ---------------------------------------------------------------------- +## 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 ...' + cat >maketest </dev/null 2>&1; then + SEARCH_RULE='VPATH=' + SEARCH_SEP=' ' + AC_MSG_RESULT([VPATH=DIR1 DIR2 ...]) + break + fi + + ## The second most common method is like above except with the + ## directories separated by colons. + cat >maketest </dev/null 2>&1; then + SEARCH_RULE='VPATH=' + SEARCH_SEP=':' + AC_MSG_RESULT([VPATH=DIR1:DIR2:...]) + break + fi + + ## pmake uses the construct `.PATH: DIR1 DIR2 + cat >maketest </dev/null 2>&1; then + SEARCH_RULE='.PATH: ' + SEARCH_SEP=' ' + AC_MSG_RESULT([.PATH: DIR1 DIR2 ...]) + break + fi + + ## No way for make to search directories + SEARCH_RULE='## SEARCH DISABLED: ' + SEARCH_SEP=' ' + AC_MSG_RESULT([it doesn't]) + if test ! -f configure; then + AC_MSG_ERROR([${MAKE-make} requires the build and source directories to be the same]) + fi + break +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. +## +AC_SUBST([AM_MAKEFLAGS]) AM_MAKEFLAGS="" + +## Don't run test if MAKE is defined but is the empty string +if test -n "${MAKE-make}"; then + + AC_MSG_CHECKING([whether make will build with undefined variables]) + + cat >maketest </dev/null 2>&1; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no, setting -V flag]) + AM_MAKEFLAGS="\-V" + fi + + rm maketest +fi + +## ---------------------------------------------------------------------- +## Production flags? Save the value in $CONFIG_MODE so we have it for +## the record. +## +AC_MSG_CHECKING([for production mode]) +AC_ARG_ENABLE([production], + [AS_HELP_STRING([--enable-production], + [Determines how to run the compiler.])]) + +case "X-$enable_production" in + X-yes) + enable_production="yes" + AC_MSG_RESULT([production]) + CONFIG_MODE=production + H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" + ;; + X-|X-no) + enable_production="no" + AC_MSG_RESULT([development]) + CONFIG_MODE=development + H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" + ;; + X-pg|X-profile) + enable_production="profile" + AC_MSG_RESULT([profile]) + CONFIG_MODE=profile + H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" + H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" + ;; + *) + enable_production="user-defined" + AC_MSG_RESULT([user-defined]) + CONFIG_MODE="$enableval" + ;; +esac + +## ---------------------------------------------------------------------- +## Check for system libraries. "dl" stands for dynamically loaded library +## +AC_CHECK_LIB([m], [ceil]) +AC_CHECK_LIB([dl], [dlopen]) + +if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then + ## ...for Solaris + AC_CHECK_LIB([socket], [socket]) + AC_CHECK_LIB([nsl], [xdr_int]) +fi + +dnl AC_CHECK_LIB([coug], [main]) ## ...for ASCI/Red + +## ---------------------------------------------------------------------- +## Check for system header files. +## +AC_HEADER_STDC +AC_HEADER_TIME + +## ---------------------------------------------------------------------- +## Check for these two functions before the time headers are checked +## for, otherwise they are not detected correctly on Solaris (the +## configure test will fail due to multiply-defined symbols). +## +AC_CHECK_FUNCS([difftime]) +AC_CHECK_FUNCS([gettimeofday], [have_gettime="yes"], [have_gettime="no"]) +AC_SEARCH_LIBS([clock_gettime], [rt posix4]) +AC_CHECK_FUNCS([clock_gettime],[have_clock_gettime="yes"],[have_clock_gettime="no"]) + +## Unix +AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h]) +AC_CHECK_HEADERS([sys/socket.h sys/types.h]) +AC_CHECK_HEADERS([stddef.h setjmp.h features.h]) +AC_CHECK_HEADERS([dirent.h]) +AC_CHECK_HEADERS([stdint.h], [C9x=yes]) + +## Darwin +AC_CHECK_HEADERS([mach/mach_time.h]) +## Also need to detect Darwin for pubconf +case $host_os in + darwin*) + AC_DEFINE([HAVE_DARWIN], [1], [Define if Darwin or Mac OS X]) + ;; +esac + +## Windows +case "`uname`" in + CYGWIN*) + AC_CHECK_HEADERS([io.h sys/timeb.h]) + ;; + MINGW*) + AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) + AC_HAVE_LIBRARY([ws2_32]) + ;; + *) + AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) + ;; +esac + +case "$host" in + alpha*-dec*-osf*) + ## 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*) + ## 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 + +## ---------------------------------------------------------------------- +## 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*) + ## Add in the -no-undefined flag to LDFLAGS for libtool. + AC_MSG_RESULT([yes]) + H5_LDFLAGS="$H5_LDFLAGS -no-undefined" + ;; + *) + ## Don't add in anything. + AC_MSG_RESULT([no]) + ;; + esac +fi + +## ---------------------------------------------------------------------- +## Test for Largefile support. +## +AC_MSG_CHECKING([if configure should try to set up large file support]) + +AC_ARG_ENABLE([largefile], + [AS_HELP_STRING([--disable-largefile], + [omit support for large files])]) + +## If largefile support is enabled, then set up appropriate compiler options. +if test "$enable_largefile" != no; then + AC_MSG_RESULT([yes]) + + ## 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 + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi]) + if test "$ac_cv_sys_largefile_CC" != no; then + 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. + + ## 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]) + + ## 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 + + ## 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([ + #include + #include + #include + #include + #define BIG_FILE (off_t)0x80000000UL + int main(void) { + int fd; + if ((fd=open("test.conf", O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0) exit(1); + if (lseek(fd, BIG_FILE, SEEK_SET)!=BIG_FILE) exit(1); + if (5!=write(fd, "hello", (size_t)5)) exit(1); + if (lseek(fd, 2*BIG_FILE, SEEK_SET) != 2*BIG_FILE) exit(1); + if (5!=write(fd, "hello", (size_t)5)) exit(1); + if (unlink("test.conf") < 0) exit(1); + exit(0); + } + ],[hdf5_cv_have_lfs=yes],[hdf5_cv_have_lfs=no],)]) + + if test "X${hdf5_cv_have_lfs}" = "Xyes"; then + AC_MSG_RESULT([yes]) + LARGEFILE="yes" + fi + if test "X${hdf5_cv_have_lfs}" = "Xno"; then + AC_MSG_RESULT([no]) + LARGEFILE="no" + fi + +else + LARGEFILE="no" + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- +## Add necessary defines for Linux Systems. +## +case "$host_cpu-$host_vendor-$host_os" in + *linux*) + ## 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 + + ## 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 CFLAGS/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" + +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_TRY_COMPILE([ +#include +#include ], +[struct stat64 sb;], +[AC_CHECK_FUNCS([stat64 fstat64])], +[AC_MSG_RESULT([skipping test for stat64() and fstat64()])]) + +## ---------------------------------------------------------------------- +## Data types and their sizes. +## +AC_TYPE_OFF_T +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]) +AC_CHECK_SIZEOF([int], [4]) +AC_CHECK_SIZEOF([unsigned], [4]) +AC_CHECK_SIZEOF([long], [4]) +AC_CHECK_SIZEOF([long long], [8]) +AC_CHECK_SIZEOF([__int64], [8]) +AC_CHECK_SIZEOF([float], [4]) +AC_CHECK_SIZEOF([double], [8]) +AC_CHECK_SIZEOF([long double], [8]) + +## Checkpoint the cache +AC_CACHE_SAVE + +## Posix.1g types (C9x) +cat >>confdefs.h <<\EOF +#include +EOF + +if test "X$C9x" = "Xyes"; then + cat >>confdefs.h <<\EOF +#include +EOF +fi + +AC_CHECK_SIZEOF( [int8_t], [1]) +AC_CHECK_SIZEOF( [uint8_t], [1]) +AC_CHECK_SIZEOF( [int_least8_t], [1]) +AC_CHECK_SIZEOF( [uint_least8_t], [1]) +AC_CHECK_SIZEOF( [int_fast8_t], [1]) +AC_CHECK_SIZEOF( [uint_fast8_t], [1]) + +AC_CHECK_SIZEOF( [int16_t], [2]) +AC_CHECK_SIZEOF( [uint16_t], [2]) +AC_CHECK_SIZEOF( [int_least16_t], [2]) +AC_CHECK_SIZEOF([uint_least16_t], [2]) +AC_CHECK_SIZEOF( [int_fast16_t], [2]) +AC_CHECK_SIZEOF( [uint_fast16_t], [2]) + +AC_CHECK_SIZEOF( [int32_t], [4]) +AC_CHECK_SIZEOF( [uint32_t], [4]) +AC_CHECK_SIZEOF( [int_least32_t], [4]) +AC_CHECK_SIZEOF([uint_least32_t], [4]) +AC_CHECK_SIZEOF( [int_fast32_t], [4]) +AC_CHECK_SIZEOF( [uint_fast32_t], [4]) + +AC_CHECK_SIZEOF( [int64_t], [8]) +AC_CHECK_SIZEOF( [uint64_t], [8]) +AC_CHECK_SIZEOF( [int_least64_t], [8]) +AC_CHECK_SIZEOF([uint_least64_t], [8]) +AC_CHECK_SIZEOF( [int_fast64_t], [8]) +AC_CHECK_SIZEOF( [uint_fast64_t], [8]) + +AC_CHECK_SIZEOF([size_t], [4]) +AC_CHECK_SIZEOF([ssize_t], [4]) +AC_CHECK_SIZEOF([ptrdiff_t], [4]) + +cat >>confdefs.h <<\EOF +#include /*for off_t definition*/ +EOF +AC_CHECK_SIZEOF([off_t], [4]) +AC_CHECK_SIZEOF([off64_t], [8]) + +## Checkpoint the cache +AC_CACHE_SAVE + +## ---------------------------------------------------------------------- +## 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 +#include +#endif + ], + [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]) +) + +## ---------------------------------------------------------------------- +## 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 + files and libraries are in two different ways: + + --with-xxx=INC,LIB - Specify individually the include directory and + library directory separated by a comma + --with-xxx=DIR - Specify only the directory which contains the + include/ and lib/ subdirectories + ]) + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--with-dmalloc=DIR], + [Use dmalloc memory debugging aid [default=no]])],, + [withval=no]) + +case $withval in + yes) + HAVE_DMALLOC="yes" + AC_CHECK_HEADERS([dmalloc.h],, [unset HAVE_DMALLOC]) + if test "x$HAVE_DMALLOC" = "xyes"; then + AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC]) + fi + if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find dmalloc library]) + fi + ;; + no) + HAVE_DMALLOC="no" + AC_MSG_CHECKING([for dmalloc library]) + AC_MSG_RESULT([suppressed]) + ;; + *) + HAVE_DMALLOC="yes" + case "$withval" in + *,*) + dmalloc_inc="`echo $withval |cut -f1 -d,`" + dmalloc_lib="`echo $withval |cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + dmalloc_inc="$withval/include" + dmalloc_lib="$withval/lib" + fi + ;; + esac + + ## 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 + dmalloc_lib="" + fi + + saved_CPPFLAGS="$CPPFLAGS" + saved_AM_CPPFLAGS="$AM_CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + saved_AM_LDFLAGS="$AM_LDFLAGS" + + if test -n "$dmalloc_inc"; then + CPPFLAGS="$CPPFLAGS -I$dmalloc_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc" + fi + + AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_DMALLOC]) + + if test "x$HAVE_DMALLOC" = "xyes"; then + 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]) + fi + + if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find dmalloc library]) + 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. +## +AC_SUBST([USE_FILTER_DEFLATE]) USE_FILTER_DEFLATE="no" +AC_ARG_WITH([zlib], + [AS_HELP_STRING([--with-zlib=DIR], + [Use zlib library for external deflate I/O + filter [default=yes]])],, + [withval=yes]) + +case $withval in + yes) + HAVE_ZLIB="yes" + AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"], [unset HAVE_ZLIB]) + if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then + AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB]) + fi + if test -z "$HAVE_ZLIB"; then + if test -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find zlib library]) + fi + else + AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"]) + fi + ;; + no) + HAVE_ZLIB="no" + AC_MSG_CHECKING([for GNU zlib]) + AC_MSG_RESULT([suppressed]) + ;; + *) + HAVE_ZLIB="yes" + case "$withval" in + *,*) + zlib_inc="`echo $withval | cut -f1 -d,`" + zlib_lib="`echo $withval | cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + zlib_inc="$withval/include" + zlib_lib="$withval/lib" + fi + ;; + esac + + ## 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 + zlib_lib="" + fi + + saved_CPPFLAGS="$CPPFLAGS" + saved_AM_CPPFLAGS="$AM_CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + saved_AM_LDFLAGS="$AM_LDFLAGS" + + if test -n "$zlib_inc"; then + CPPFLAGS="$CPPFLAGS -I$zlib_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$zlib_inc" + fi + + AC_CHECK_HEADERS([zlib.h], + [HAVE_ZLIB_H="yes"], + [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_ZLIB]) + + if test -n "$zlib_lib"; then + LDFLAGS="$LDFLAGS -L$zlib_lib" + AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib" + fi + + if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then + AC_CHECK_LIB([z], [compress2],, + [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB]) + fi + + if test -z "$HAVE_ZLIB"; then + if test -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find zlib library]) + fi + else + AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"]) + fi + ;; +esac + +if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then + AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled]) + USE_FILTER_DEFLATE="yes" + + ## 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. +## +AC_SUBST([USE_FILTER_SZIP]) USE_FILTER_SZIP="no" +AC_ARG_WITH([szlib], + [AS_HELP_STRING([--with-szlib=DIR], + [Use szlib library for external szlib I/O + filter [default=no]])],, + [withval=no]) + +case $withval in + yes) + HAVE_SZLIB="yes" + AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB]) + if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then + AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB]) + fi + if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find szlib library]) + fi + ;; + no) + HAVE_SZLIB="no" + AC_MSG_CHECKING([for szlib]) + AC_MSG_RESULT([suppressed]) + ;; + *) + HAVE_SZLIB="yes" + case "$withval" in + *,*) + szlib_inc="`echo $withval |cut -f1 -d,`" + szlib_lib="`echo $withval |cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + szlib_inc="$withval/include" + szlib_lib="$withval/lib" + fi + ;; + esac + + ## 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 + szlib_lib="" + fi + + saved_CPPFLAGS="$CPPFLAGS" + saved_AM_CPPFLAGS="$AM_CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + saved_AM_LDFLAGS="$AM_LDFLAGS" + + if test -n "$szlib_inc"; then + CPPFLAGS="$CPPFLAGS -I$szlib_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc" + fi + + AC_CHECK_HEADERS([szlib.h], + [HAVE_SZLIB_H="yes"], + [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB]) + + if test -n "$szlib_lib"; then + LDFLAGS="$LDFLAGS -L$szlib_lib" + AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib" + fi + + if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then + AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, + [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB]) + fi + + if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then + AC_MSG_ERROR([couldn't find szlib library]) + fi + ;; +esac + +if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then + ## SZLIB library is available. Check if it can encode + AC_MSG_CHECKING([for szlib encoder]) + + ## 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="$LD_LIBRARY_PATH:$szlib_lib" + fi + + AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH" + + AC_CACHE_VAL([hdf5_cv_szlib_can_encode], + [AC_TRY_RUN([ + #include + + int main(void) + { + /* SZ_encoder_enabled returns 1 if encoder is present */ + if(SZ_encoder_enabled() == 1) + exit(0); + else + exit(1); + } + ], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]) + + AC_DEFINE([HAVE_FILTER_SZIP], [1], + [Define if support for szip filter is enabled]) + USE_FILTER_SZIP="yes" + + if test ${hdf5_cv_szlib_can_encode} = "yes"; then + AC_MSG_RESULT([yes]) + fi + if test ${hdf5_cv_szlib_can_encode} = "no"; then + AC_MSG_RESULT([no]) + fi + + ## 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 + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)" + fi + if test ${hdf5_cv_szlib_can_encode} = "no"; then + if test "X$EXTERNAL_FILTERS" != "X"; then + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," + fi + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)" + fi +fi + +AM_CONDITIONAL([BUILD_SHARED_SZIP_CONDITIONAL], [test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"]) + +## Checkpoint the cache +AC_CACHE_SAVE + +## ---------------------------------------------------------------------- +## Enable thread-safe version of library. It requires Pthreads support +## on POSIX systems. +## +AC_MSG_CHECKING([for thread safe support]) +AC_ARG_ENABLE([threadsafe], + [AS_HELP_STRING([--enable-threadsafe], + [Enable thread-safe capability])], + [THREADSAFE=$enableval]) + +## The --enable-threadsafe 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_threadsafe}" = "Xyes"; then + AC_MSG_ERROR([--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) + fi +fi + +## --enable-threadsafe is also incompatible with --enable-fortran, unless +## --enable-unsupported has been specified on the configure line. +if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then + AC_MSG_ERROR([--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error.]) + fi +fi + +case "X-$THREADSAFE" in + X-|X-no) + AC_MSG_RESULT([no]) + ;; + X-yes) + THREADSAFE=yes + AC_MSG_RESULT([yes]) + ;; + *) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enableval\' is not a valid threadsafe type]) + ;; +esac + +if test "X$THREADSAFE" = "Xyes"; then + AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support]) + + ## ---------------------------------------------------------------------- + ## 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. + ## + ## Thread-safety in HDF5 only uses Pthreads via configure, so the + ## default is "yes", though this only has an effect when + ## --enable-threadsafe is specified. + AC_SUBST([HAVE_PTHREAD]) HAVE_PTHREAD=yes + AC_ARG_WITH([pthread], + [AS_HELP_STRING([--with-pthread=DIR], + [Specify alternative path to Pthreads library when thread-safe capability is built])],, + [withval=yes]) + + case "$withval" in + yes) + AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD]) + if test "x$HAVE_PTHREAD" = "xyes"; then + AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD]) + fi + ;; + no) + AC_MSG_CHECKING([for pthread]) + AC_MSG_RESULT([suppressed]) + unset HAVE_PTHREAD + ;; + *) + case "$withval" in + *,*) + pthread_inc="`echo $withval | cut -f1 -d,`" + pthread_lib="`echo $withval | cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + pthread_inc="$withval/include" + pthread_lib="$withval/lib" + fi + ;; + esac + + ## 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 + pthread_lib="" + fi + + if test -n "$pthread_inc"; then + saved_CPPFLAGS="$CPPFLAGS" + saved_AM_CPPFLAGS="$AM_CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$pthread_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$pthread_inc" + AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset HAVE_PTHREAD]) + else + AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD]) + fi + + if test "x$HAVE_PTHREAD" = "xyes"; then + if test -n "$pthread_lib"; then + saved_LDFLAGS="$LDFLAGS" + saved_AM_LDFLAGS="$AM_LDFLAGS" + LDFLAGS="$LDFLAGS -L$pthread_lib" + AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib" + AC_CHECK_LIB([pthread], [pthread_self],, + [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_PTHREAD]) + else + AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD]) + fi + fi + ;; + esac +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_CHECK_DECL([CLOCK_MONOTONIC],[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include ]]) + +## ---------------------------------------------------------------------- +## 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. +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], + [Define if `tm_gmtoff' is a member of `struct tm']) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +## 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], + [Define if `__tm_gmtoff' is a member of `struct tm']) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +## Check whether the global variable `timezone' is defined. +AC_MSG_CHECKING([for global timezone variable]) + +case "`uname`" in + CYGWIN*) + AC_MSG_RESULT([disabled in CYGWIN]) + ;; + *) + AC_TRY_LINK([ + #include + #include ], [timezone=0;], + [AC_DEFINE([HAVE_TIMEZONE], [1], + [Define if `timezone' is a global variable]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + ;; +esac + +## 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], + [Define if `struct timezone' is defined]) + have_struct_tz="yes" + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +## 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) + AC_CACHE_VAL([hdf5_cv_gettimeofday_tz], + [AC_TRY_RUN([ + #include + #include + int main(void) + { + struct timeval tv; + struct timezone tz; + tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */ + tz.tz_dsttime = 7; + gettimeofday(&tv, &tz); + /* Check whether the function returned any value at all */ + if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) + exit(1); + else exit (0); + }], + [hdf5_cv_gettimeofday_tz=yes], + [hdf5_cv_gettimeofday_tz=no])]) + + if test ${hdf5_cv_gettimeofday_tz} = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([GETTIMEOFDAY_GIVES_TZ], [1], + [Define if gettimeofday() populates the tz pointer passed in]) + else + AC_MSG_RESULT([no]) + fi +fi + +## ---------------------------------------------------------------------- +## 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], + [Define if `struct stat' has the `st_blocks' field]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +## ---------------------------------------------------------------------- +## How do we figure out the width of a tty in characters? +## +AC_CHECK_FUNCS([_getvideoconfig gettextinfo]) +case "`uname`" in + CYGWIN*) + ;; + *) + AC_CHECK_FUNCS([GetConsoleScreenBufferInfo]) + ;; +esac +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], + [Define if `struct videoconfig' is defined]) + 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], + [Define if `struct text_info' is defined]) + 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], + [Define if the ioctl TIOGWINSZ is defined]) + 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], + [Define if the ioctl TIOCGETD is defined]) + 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 asprintf 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], + AC_TRY_RUN([ +#include +#include +#include + +int test_vsnprintf(const char *fmt,...) +{ + va_list ap; + char *s = malloc(16); + int ret; + + va_start(ap, fmt); + ret=vsnprintf(s,16,"%s",ap); + va_end(ap); + + return(ret!=42 ? 1 : 0); +} + +int main(void) +{ + exit(test_vsnprintf("%s","A string that is longer than 16 characters")); +} + ],[hdf5_cv_vsnprintf_works=yes],[hdf5_cv_vsnprintf_works=no],)) + + if test ${hdf5_cv_vsnprintf_works} = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([VSNPRINTF_WORKS], [1], + [Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed]) + else + AC_MSG_RESULT([no]) + fi + ,) + +## ---------------------------------------------------------------------- +## 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], + [ + echo "int main(int argc, char * argv[]) {return 0;}" > conftest.c + $CC $CFLAGS conftest.c -o a.out> /dev/null 2> /dev/null + echo "./a.out :" > conftest.sh + chmod 700 conftest.sh + + ./conftest.sh 2> conftest.out + rm -f a.out + TEST_OUTPUT=`cat conftest.out` + + if test "X$TEST_OUTPUT" = "X"; then + hdf5_cv_lone_colon=yes + else + hdf5_cv_lone_colon=no + fi + ]) + +AC_SUBST([H5_LONE_COLON]) H5_LONE_COLON="$hdf5_cv_lone_colon" + +## ---------------------------------------------------------------------- +## 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], + [Define if the __attribute__(()) extension is present]) + 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], + [Define if the compiler understands the __func__ keyword]) + 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], + [Define if the compiler understands the __FUNCTION__ keyword]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) +AC_MSG_CHECKING([for C99 designated initialization support]) +AC_TRY_COMPILE(,[ + typedef struct { + int x; + union { + int i; + double d; + } u; + } di_struct_t; + di_struct_t x = {0, { .d = 0.0}}; ], + [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])]) + +## ---------------------------------------------------------------------- +## 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. +## +AC_MSG_CHECKING([how to print long long]) +AC_CACHE_VAL([hdf5_cv_printf_ll], [ + +for hdf5_cv_printf_ll in l ll L q unknown; do + AC_TRY_RUN([ + #include + #include + #include + + 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]) + +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']) + +## ---------------------------------------------------------------------- +## 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 + + 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],)]) + +if test ${hdf5_cv_system_scope_threads} = "yes"; then + AC_DEFINE([SYSTEM_SCOPE_THREADS], [1], + [Define if your system supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) call.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- +## 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], + [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 + the word no. The default is most packages + if production is disabled; no if it is enabled. + ])], + [DEBUG_PKG=$enableval]) + +## Default to no if producton is enabled +if test "X-$DEBUG_PKG" = X- ; then + if test "$enable_production" = yes ; then + DEBUG_PKG=no + else + DEBUG_PKG=yes + fi +fi + +AC_SUBST([DEBUG_PKG]) +all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" +case "X-$DEBUG_PKG" in + X-yes) + DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" + H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" + AC_MSG_RESULT([default ($DEBUG_PKG)]) + ;; + X-all) + DEBUG_PKG=$all_packages + H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" + AC_MSG_RESULT([all ($DEBUG_PKG)]) + ;; + X-no|X-none) + AC_MSG_RESULT([none]) + DEBUG_PKG= + H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" + ;; + *) + AC_MSG_RESULT([$DEBUG_PKG]) + ;; +esac + +if test -n "$DEBUG_PKG"; then + for pkg in `echo $DEBUG_PKG | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do + H5_CPPFLAGS="$H5_CPPFLAGS -DH5${pkg}_DEBUG" + done +fi + +## ---------------------------------------------------------------------- +## Check if they would like the function stack support compiled in +## +AC_MSG_CHECKING([whether function stack tracking is enabled]) +AC_ARG_ENABLE([codestack], + [AS_HELP_STRING([--enable-codestack], + [Enable the function stack tracing (for developer debugging).])], + [CODESTACK=$enableval]) + +case "X-$CODESTACK" in + X-yes) + CODESTACK=yes + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_CODESTACK], [1], + [Define if the function stack tracing code is to be compiled in]) + ;; + *) + CODESTACK=no + AC_MSG_RESULT([no]) + ;; +esac + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-metadata-trace-file], + [Enable metadata trace file collection.])], + [METADATATRACEFILE=$enableval]) + +case "X-$METADATATRACEFILE" in + X-yes) + METADATATRACEFILE=yes + AC_MSG_RESULT([yes]) + AC_DEFINE([METADATA_TRACE_FILE], [1], + [Define if the metadata trace file code is to be compiled in]) + ;; + *) + METADATATRACEFILE=no + AC_MSG_RESULT([no]) + ;; +esac + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-trace], + [Enable API tracing capability. Default=no + if debug is disabled.])], + [TRACE=$enableval]) + +## Default to no if debug is disabled +if test "X-$TRACE" = X- ; then + if test -z "$DEBUG_PKG" ; then + TRACE=no + else + TRACE=yes + fi +fi + +case "X-$TRACE" in + X-yes) + AC_MSG_RESULT([yes]) + TRACE_API=yes + H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API" + ;; + X-no|*) + AC_MSG_RESULT([no]) + TRACE_API=no + H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API" + ;; +esac + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-instrument], + [Enable library instrumentation of optimization + tracing. Default=no if debug is disabled.])], + [INSTRUMENT=$enableval]) + +## Default to no if debug is disabled +if test "X-$INSTRUMENT" = X- ; then + if test -z "$DEBUG_PKG" ; then + INSTRUMENT=no + else + INSTRUMENT=yes + fi +fi + +case "X-$INSTRUMENT" in + X-yes) + AC_MSG_RESULT([yes]) + INSTRUMENT_LIBRARY=yes + AC_DEFINE([HAVE_INSTRUMENTED_LIBRARY], [1], + [Define if library will contain instrumentation to detect correct optimization operation]) + ;; + X-no|*) + AC_MSG_RESULT([no]) + INSTRUMENT_LIBRARY=no + ;; +esac + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-clear-file-buffers], + [Securely clear file buffers before writing + to file. Default=yes.])], + [CLEARFILEBUF=$enableval]) + +case "X-$CLEARFILEBUF" in + *) + CLEARFILEBUF=yes + AC_MSG_RESULT([yes]) + AC_DEFINE([CLEAR_MEMORY], [1], + [Define if the memory buffers being written to disk should be + cleared before writing.]) + ;; + X-no) + CLEARFILEBUF=no + AC_MSG_RESULT([no]) + ;; +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. +## +AC_SUBST([USINGMEMCHECKER]) +AC_MSG_CHECKING([whether a memory checking tool will be used]) +AC_ARG_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 + more picky about it's memory operations and also + disables the library's free space manager code. + Default=no.])], + [USINGMEMCHECKER=$enableval]) + +case "X-$USINGMEMCHECKER" in + X-yes) + USINGMEMCHECKER=yes + AC_MSG_RESULT([yes]) + AC_DEFINE([USING_MEMCHECKER], [1], + [Define if a memory checking tool will be used on the library, + to cause library to be very picky about memory operations and + also disable the internal free list manager code.]) + ;; + *) + USINGMEMCHECKER=no + AC_MSG_RESULT([no]) + ;; +esac + +## Checkpoint the cache +AC_CACHE_SAVE + +## 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], + [AS_HELP_STRING([--enable-parallel], + [Search for MPI-IO and MPI support files])]) + +## 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 + +## --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 + +## 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.]) + fi + if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then + AC_MSG_ERROR([An MPI compiler is being used; --enable-threadsafe is not allowed. Use --enable-unsupported to override this error.]) + fi +fi + +AC_MSG_CHECKING([for parallel support files]) +case "X-$enable_parallel" in + X-|X-no|X-none) + ## 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) + ## 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 + + ## 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])])]) + + ## 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 + ## Change to the Fortran 90 language + AC_LANG_PUSH(Fortran) + + ## 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], [mpi_file_open],, [PARALLEL=no])]) + + ## 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 + include 'mpif.h' + integer:: ierr + call mpi_file_open( ierr ) + end],, + [AC_CHECK_LIB([mpio], [mpi_file_open],, [PARALLEL=no])]) + fi + + ## Change to the C language + AC_LANG_POP(Fortran) + fi + + ## 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; + fi + done + fi + + ## Set RUNPARALLEL to mpiexec if not set yet. + if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then + RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" + fi + ;; + + *) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enable_parallel\' is not a valid parallel search type]) + ;; +esac + +## ---------------------------------------------------------------------- +## Print some other parallel information and do some sanity checks. +## +AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" + +if test -n "$PARALLEL"; then + ## The 'testpar' directory should participate in the build + TESTPARALLEL=testpar + + ## We are building a parallel library + AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) + + ## 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]) + + ## 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])]) + + ## 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 + + ## 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 + RUNPARALLEL="" + fi + + if test "X$HDF_FORTRAN" = "Xyes"; then + ADD_PARALLEL_FILES="yes" + AC_MSG_CHECKING([for MPI_Comm_c2f and MPI_Comm_f2c functions]) + + AC_TRY_LINK([#include ], + [MPI_Comm c_comm; MPI_Comm_c2f(c_comm)], + AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1], + [Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists]) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + ) + + AC_MSG_CHECKING([for MPI_Info_c2f and MPI_Info_f2c functions]) + AC_TRY_LINK([#include ], + [MPI_Info c_info; MPI_Info_c2f(c_info)], + AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1], + [Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists]) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]) + ) + fi + + ## -------------------------------------------------------------------- + ## 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], + [AS_HELP_STRING([--with-mpe=DIR], + [Use MPE instrumentation [default=no]])],, + [withval=no]) + + case "X-$withval" in + X-|X-no|X-none) + AC_MSG_CHECKING([for MPE]) + AC_MSG_RESULT([suppressed]) + unset MPE + ;; + X-yes) + AC_CHECK_HEADERS([mpe.h],, [unset MPE]) + AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE]) + AC_CHECK_LIB([lmpe], [MPE_Init_mpi_io],, [unset MPE]) + ;; + *) + case "$withval" in + *,*) + mpe_inc="`echo $withval | cut -f1 -d,`" + mpe_lib="`echo $withval | cut -f2 -d, -s`" + ;; + *) + if test -n "$withval"; then + mpe_inc="$withval/include" + mpe_lib="$withval/lib" + fi + ;; + esac + + ## 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 + mpe_lib="" + fi + + if test -n "$mpe_inc"; then + saved_CPPFLAGS="$CPPFLAGS" + saved_AM_CPPFLAGS="$AM_CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$mpe_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$mpe_inc" + AC_CHECK_HEADERS([mpe.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset MPE]) + else + AC_CHECK_HEADERS([mpe.h],, [unset MPE]) + fi + + if test -n "$mpe_lib"; then + saved_LDFLAGS="$LDFLAGS" + saved_AM_LDFLAGS="$AM_LDFLAGS" + LDFLAGS="$LDFLAGS -L$mpe_lib" + AM_LDFLAGS="$AM_LDFLAGS -L$mpe_lib" + AC_CHECK_LIB([mpe], [MPE_Init_log],, + [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset MPE]) + AC_CHECK_LIB([lmpe], [MPE_Init_mpi_io],, + [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset MPE]) + + else + AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE]) + AC_CHECK_LIB([lmpe], [MPE_Init_mpi_io],, [unset MPE]) + fi + ;; + esac + + if test "X-$MPE" = "X-yes"; then + AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support]) + fi +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. +## +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_MSG_CHECKING([for I/O filters]) +AC_ARG_ENABLE([filters], + [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]) + +## Eventually: all_filters="shuffle,foo,bar,baz" +all_filters="shuffle,fletcher32,nbit,scaleoffset" +case "X-$FILTERS" in + X-|X-all) + FILTERS=$all_filters + AC_MSG_RESULT([all ($FILTERS)]) + ;; + X-no|X-none) + AC_MSG_RESULT([none]) + FILTERS="none" + ;; + *) + AC_MSG_RESULT([$FILTERS]) + ;; +esac + +if test -n "$FILTERS"; then + for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do + ## ------------------------------------------------------------------ + ## 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]) + USE_FILTER_SHUFFLE="yes" + fi + if test $filter = "FLETCHER32"; then + AC_DEFINE([HAVE_FILTER_FLETCHER32], [1], + [Define if support for Fletcher32 checksum is enabled]) + USE_FILTER_FLETCHER32="yes" + fi + if test $filter = "NBIT"; then + AC_DEFINE([HAVE_FILTER_NBIT], [1], + [Define if support for nbit filter is enabled]) + USE_FILTER_NBIT="yes" + fi + if test $filter = "SCALEOFFSET"; then + AC_DEFINE([HAVE_FILTER_SCALEOFFSET], [1], + [Define if support for scaleoffset filter is enabled]) + USE_FILTER_SCALEOFFSET="yes" + fi + done +fi + +## ---------------------------------------------------------------------- +## 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 + +## -------------------------------------------------------------------------- +## Should the Default Virtual File Driver be compiled? +## + +AC_MSG_CHECKING([for Default Virtual File Driver definition]) +AC_ARG_WITH([default-vfd], + [AS_HELP_STRING([--with-default-vfd=driver], + [Specify default file driver + [default=sec2]])],, + withval=sec2) + +if test "X$withval" = "Xsec2"; then + AC_MSG_RESULT([yes]) + default_vfd=yes + vfd_define=H5FD_SEC2 +elif test "X$withval" = "Xstdio"; then + AC_MSG_RESULT([yes]) + default_vfd=yes + vfd_define=H5FD_STDIO +else + AC_MSG_RESULT([no]) + default_vfd=no +fi + +if test "X$default_vfd" = "Xyes"; then + AC_DEFINE_UNQUOTED([DEFAULT_VFD], [$vfd_define], + [Define the default virtual file driver to compile]) +fi + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-direct-vfd], + [Build the Direct I/O Virtual File Driver + [default=yes]])], + [DIRECT_VFD=$enableval], [DIRECT_VFD=yes]) + +if test "$DIRECT_VFD" = "yes"; then + AC_CACHE_VAL([hdf5_cv_direct_io], + [AC_TRY_RUN([ + #include + #include + #include + int main(void) + { + int fid; + if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0) + exit(1); + 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],)]) + + if test ${hdf5_cv_direct_io} = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_DIRECT], [1], + [Define if the direct I/O virtual file driver should be compiled]) + else + AC_MSG_RESULT([no]) + DIRECT_VFD=no + fi +else + AC_MSG_RESULT([suppressed]) +fi + +AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"]) + +## ---------------------------------------------------------------------- +## Enable custom plugin default path for library. It requires SHARED support. +## +AC_MSG_CHECKING([for custom plugin default path definition]) +AC_ARG_WITH([default-plugindir], + [AS_HELP_STRING([--with-default-plugindir=location], + [Specify default location for plugins + [default="/usr/local/hdf5/lib/plugin"]])],, + withval="/usr/local/hdf5/lib/plugin") + +if test "X$withval" = "X"; then + AC_MSG_RESULT([default]) + default_plugindir="/usr/local/hdf5/lib/plugin" +else + AC_MSG_RESULT([$withval]) + default_plugindir=$withval +fi + +AC_DEFINE_UNQUOTED([DEFAULT_PLUGINDIR], ["$default_plugindir"], + [Define the default plugins path to compile]) + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-dconv-exception], + [if exception handling functions is checked during + data conversions [default=yes]])], + [DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes]) + +if test "$DCONV_EXCEPTION" = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([WANT_DCONV_EXCEPTION], [1], + [Check exception handling functions during data conversions]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([whether data accuracy is guaranteed during data conversions]) +AC_ARG_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]) + +if test "$DATA_ACCURACY" = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([WANT_DATA_ACCURACY], [1], + [Data accuracy is prefered to speed during data conversions]) +else + AC_MSG_RESULT([no]) +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) +## +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]) + +if test ${hdf5_cv_convert_denormal_float} = "yes"; then + AC_DEFINE([CONVERT_DENORMAL_FLOAT], [1], + [Define if your system can handle converting denormalized floating-point values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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) +## +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]) + +if test ${hdf5_cv_convert_float_llong_not_works} = "yes"; then + AC_DEFINE([HW_FP_TO_LLONG_NOT_WORKS], [1], + [Define if your system can't handle converting floating-point values to long long.]) + AC_MSG_RESULT([true]) +else + AC_MSG_RESULT([false]) +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) +## +AC_MSG_CHECKING([if the machine has window style path name]) + +case "`uname`" in + MINGW*) + AC_DEFINE([HAVE_WINDOW_PATH], [1], + [Define if your system has window style path name.]) + AC_MSG_RESULT([yes]) + ;; + *) + AC_MSG_RESULT([no]) + ;; +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. +## +AC_MSG_CHECKING([if converting from long double to integers is accurate]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_integer_accurate=${hdf5_cv_ldouble_to_integer_accurate=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_integer_accurate], [hdf5_cv_ldouble_to_integer_accurate=yes]) +fi + +if test "${hdf5_cv_ldouble_to_integer_accurate}" = "yes"; then + AC_DEFINE([LDOUBLE_TO_INTEGER_ACCURATE], [1], + [Define if your system can convert long double to integers accurately.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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) + +AC_MSG_CHECKING([if converting from long double to integers works]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_integer_works=${hdf5_cv_ldouble_to_integer_works=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_integer_works], + [AC_TRY_RUN([ + int main(void) + { + void *align; + long double ld= 9701917572145405952.00L; + unsigned char v1; + short v2; + unsigned int v3; + int ret = 0; + + align = (void*)malloc(sizeof(long double)); + memcpy(align, &ld, sizeof(long double)); + + /*For HU-UX11.00, there's floating exception(core dump) when doing some of casting + *from 'long double' to integers*/ + v1=(unsigned char)(*((long double*)align)); + v2=(short)(*((long double*)align)); + v3=(unsigned int)(*((long double*)align)); + + done: + exit(ret); + } + ], [hdf5_cv_ldouble_to_integer_works=yes], [hdf5_cv_ldouble_to_integer_works=no],)]) +fi + +if test ${hdf5_cv_ldouble_to_integer_works} = "yes"; then + AC_DEFINE([LDOUBLE_TO_INTEGER_WORKS], [1], + [Define if your system can convert from long double to integer values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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) +## +AC_MSG_CHECKING([if accurately converting from integers to long double]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_integer_to_ldouble_accurate=${hdf5_cv_integer_to_ldouble_accurate=no} +else + AC_CACHE_VAL([hdf5_cv_integer_to_ldouble_accurate], [hdf5_cv_integer_to_ldouble_accurate=yes]) +fi + +if test ${hdf5_cv_integer_to_ldouble_accurate} = "yes"; then + AC_DEFINE([INTEGER_TO_LDOUBLE_ACCURATE], [1], + [Define if your system can accurately convert from integers to long double values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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.) +## +AC_MSG_CHECKING([if accurately converting unsigned long to float values]) + +AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate], + [AC_TRY_RUN([ + int main(void) + { + int ret = 0; + unsigned long l1; + unsigned long l2; + unsigned long l3; + float f1; + float f2; + float f3; + + + if(sizeof(unsigned long)==8) { + l1 = 0xffffffffffffffffUL; + l2 = 0xffffffffffff0000UL; + l3 = 0xf000000000000000UL; + + f1 = (float)l1; + f2 = (float)l2; + f3 = (float)l3; + + if((f1 < 0) || (f2 < 0) || (f3 < 0)) + ret = 1; + } + +done: + exit(ret); + } + ], [hdf5_cv_ulong_to_float_accurate=yes], [hdf5_cv_ulong_to_float_accurate=no],)]) + +if test ${hdf5_cv_ulong_to_float_accurate} = "yes"; then + AC_DEFINE([ULONG_TO_FLOAT_ACCURATE], [1], + [Define if your system accurately converting unsigned long to float values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if accurately converting unsigned long long to floating-point values]) + +if test ${host_os_novers} = "solaris2.x"; then + AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate], + [AC_TRY_RUN([ + int main(void) + { + unsigned long l1; + unsigned long l2; + unsigned long l3; + unsigned long l4; + unsigned long long ld1; + unsigned long long ld2; + unsigned long long ld3; + unsigned long long ld4; + double d1, d2, d3, d4; + unsigned char s[8]; + int ret = 0; + + if(sizeof(unsigned long)==8) { + l1 = 0xf000000000000b00UL; /*Round-down case*/ + l2 = 0xf000000000000401UL; /*Round-up case*/ + l3 = 0xf000000000000400UL; /*Round-down case*/ + l4 = 0xf000000000000c00UL; /*Round-up case*/ + + d1 = (double)l1; + d2 = (double)l2; + d3 = (double)l3; + d4 = (double)l4; + } else if(sizeof(unsigned long long)==8) { + ld1 = 0xf000000000000b00ULL; /*Round-down case*/ + ld2 = 0xf000000000000401ULL; /*Round-up case*/ + ld3 = 0xf000000000000400ULL; /*Round-down case*/ + ld4 = 0xf000000000000c00ULL; /*Round-up case*/ + + d1 = (double)ld1; + d2 = (double)ld2; + d3 = (double)ld3; + d4 = (double)ld4; + } else { + ret = 1; + goto done; + } + + memcpy(s, &d1, 8); + if(s[7]!=1) + ret = 1; + + memcpy(s, &d2, 8); + if(s[7]!=1) + ret = 1; + + memcpy(s, &d3, 8); + if(s[7]!=0) + ret = 1; + + memcpy(s, &d4, 8); + if(s[7]!=2) + ret = 1; + +done: + exit(ret); + } + ], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=no],)]) +else + AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes]) +fi + +if test ${hdf5_cv_ulong_to_fp_bottom_bit_accurate} = "yes"; then + AC_DEFINE([ULONG_TO_FP_BOTTOM_BIT_ACCURATE], [1], + [Define if your system can accurately convert unsigned (long) long values to floating-point values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if accurately roundup converting floating-point to unsigned long long values]) + +AC_CACHE_VAL([hdf5_cv_fp_to_ullong_accurate], + [AC_TRY_RUN([ + int main(void) + { + float f = 111.60f; + double d = 222.55L; + unsigned long long l1 = (unsigned long long)f; + unsigned long long l2 = (unsigned long long)d; + int ret = 0; + + if(l1 == 112) + ret = 1; + if(l2 == 223) + ret = 1; + +done: + exit(ret); + } + ], [hdf5_cv_fp_to_ullong_accurate=yes], [hdf5_cv_fp_to_ullong_accurate=no],)]) + +if test ${hdf5_cv_fp_to_ullong_accurate} = "yes"; then + AC_DEFINE([FP_TO_ULLONG_ACCURATE], [1], + [Define if your system roundup accurately converting floating-point to unsigned long long values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if right maximum converting floating-point to unsigned long long values]) + +AC_CACHE_VAL([hdf5_cv_fp_to_ullong_right_maximum], + [AC_TRY_RUN([ + int main(void) + { + float f = 9701917572145405952.00f; + double d1 = 9701917572145405952.00L; + long double d2 = 9701917572145405952.00L; + double d3 = 2e40L; + unsigned long long l1 = (unsigned long long)f; + unsigned long long l2 = (unsigned long long)d1; + unsigned long long l3 = (unsigned long long)d2; + unsigned long long l4; + unsigned long long l5 = 0x7fffffffffffffffULL; + int ret = 0; + + if(l1 <= l5 || l2 <= l5 || l3 <= l5) + ret = 1; + + l4 = (unsigned long long)d3; + if(l4 <= l5) + ret = 1; + +done: + exit(ret); + } + ], [hdf5_cv_fp_to_ullong_right_maximum=yes], [hdf5_cv_fp_to_ullong_right_maximum=no],)]) + +if test ${hdf5_cv_fp_to_ullong_right_maximum} = "yes"; then + AC_DEFINE([FP_TO_ULLONG_RIGHT_MAXIMUM], [1], + [Define if your system has right maximum convert floating-point to unsigned long long values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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.) +## +AC_MSG_CHECKING([if correctly converting long double to unsigned int values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_uint_accurate=${hdf5_cv_ldouble_to_uint_accurate=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_uint_accurate], + [AC_TRY_RUN([ + int main(void) + { + long double ld = 2733248032.9183987530L; + unsigned int i; + int ret = 0; + + i = (unsigned int)ld; + if(i!=2733248032 && i!=2733248031 && i!=2733248033) + ret = 1; + + done: + exit(ret); + } + ], [hdf5_cv_ldouble_to_uint_accurate=yes], [hdf5_cv_ldouble_to_uint_accurate=no],)]) +fi + +if test ${hdf5_cv_ldouble_to_uint_accurate} = "yes"; then + AC_DEFINE([LDOUBLE_TO_UINT_ACCURATE], [1], + [Define if your system can convert long double to unsigned int values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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) +## +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]) + +if test ${hdf5_cv_ullong_to_fp_cast_works} = "yes"; then + AC_DEFINE([ULLONG_TO_FP_CAST_WORKS], [1], + [Define if your system can compile unsigned long long to floating-point casts.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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) +## +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]) + +if test ${hdf5_cv_llong_to_fp_cast_works} = "yes"; then + AC_DEFINE([LLONG_TO_FP_CAST_WORKS], [1], + [Define if your system can compile long long to floating-point casts.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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.) +## +AC_MSG_CHECKING([if converting unsigned long long to long double with precision]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ullong_to_ldouble_precision=${hdf5_cv_ullong_to_ldouble_precision=no} +else + AC_CACHE_VAL([hdf5_cv_ullong_to_ldouble_precision], + [AC_TRY_RUN([ + #include + #include + + int main(void) + { + /* General variables */ + int endian; + int tst_value = 1; + int ret = 0; + + /* For FreeBSD */ + unsigned long long l = 0xa601e80bda85fcefULL; + long double ld; + unsigned char *c1, *c2; + size_t size; + + /* For Cygwin */ + unsigned long long l_cyg = 0xfffffffffffffff0ULL; + long double ld_cyg; + unsigned char *c2_cyg; + size_t size_cyg; + + + /* Determine this system's endianess */ + c1 = (unsigned char*)calloc(1, sizeof(int)); + memcpy((void*)c1, &tst_value, sizeof(int)); + if(c1[0]==1) + endian = 0; /* little endian */ + else + endian = 1; /* big endian */ + + /* For FreeBSD */ + size = sizeof(long double); + memset(&ld, 0, size); + ld = (long double)l; + + c2 = (unsigned char*)calloc(1, size); + memcpy((void*)c2, &ld, size); + + /* Test if the last 2 bytes of mantissa are lost. Mainly for FreeBSD on Intel + * architecture(sleipnir) where it happens. */ + /*if(endian==0 && c2[0]==0 && c2[1]==0)*/ /*little endian*/ + if(endian==0 && c2[0]==0) { /*little endian*/ + ret = 1; + goto done; + } + + /* For Cygwin */ + size_cyg = sizeof(long double); + memset(&ld_cyg, 0, size); + ld_cyg = (long double)l_cyg; + + c2_cyg = (unsigned char*)calloc(1, size_cyg); + memcpy((void*)c2_cyg, &ld_cyg, size_cyg); + + /* Test if the last 4 bytes(roughly) of mantissa are rounded up. Mainly for Cygwin + * where the values like 0xffffffffffffffff, 0xfffffffffffffffe, ..., + * 0xfffffffffffff000 ... are rounded up as 0x0000403f8000000000000000 + * instead of 0x0000403effffffffffffffff, 0x0000403efffffffffffffffe, ..., + * 0x0000403efffffffffffff000 ... + */ + if(endian==0 && c2_cyg[0]==0 && c2_cyg[1]==0 && c2_cyg[2]==0 && c2_cyg[3]==0) + ret = 1; + + done: + if(c1) + free(c1); + if(c2) + free(c2); + if(c2_cyg) + free(c2_cyg); + exit(ret); + } + ], [hdf5_cv_ullong_to_ldouble_precision=yes], [hdf5_cv_ullong_to_ldouble_precision=no],)]) +fi + +if test ${hdf5_cv_ullong_to_ldouble_precision} = "yes"; then + AC_DEFINE([ULLONG_TO_LDOUBLE_PRECISION], [1], + [Define if your system can convert unsigned long long to long double with correct precision.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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). +## +AC_MSG_CHECKING([if overflows normally converting floating-point to integer values]) + +AC_CACHE_VAL([hdf5_cv_fp_to_integer_overflow_works], + [AC_TRY_RUN([ + int main(void) + { + float f = 2147483648.0f; + int i; + + i = (int)f; + +done: + exit(0); + } + ], [hdf5_cv_fp_to_integer_overflow_works=yes], [hdf5_cv_fp_to_integer_overflow_works=no],)]) + +if test ${hdf5_cv_fp_to_integer_overflow_works} = "yes"; then + AC_DEFINE([FP_TO_INTEGER_OVERFLOW_WORKS], [1], + [Define if your system can handle overflow converting floating-point to integer values.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if using special algorithm to convert long double to (unsigned) long values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_long_special=${hdf5_cv_ldouble_to_long_special=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_long_special], + [AC_TRY_RUN([ + int main(void) + { + long double ld = 20041683600089727.779961L; + long ll; + unsigned long ull; + unsigned char s[16]; + unsigned char s2[8]; + int ret = 1; + + if(sizeof(long double) == 16 && sizeof(long) == 8) { + /*make sure the long double type has 16 bytes in size and + * 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /* Assign the hexadecimal value of long double type. */ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + + ll = (long)ld; + memcpy(s2, &ll, 8); + + /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82 + * and gets wrong value 20041683600089730 on the IBM Power6 Linux. + * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f + * and gets the correct value 20041683600089727. It uses some special + * algorithm. We're going to define the macro and skip the test until + * we can figure out how they do it. */ + if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && + s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) + ret = 0; + + ull = (unsigned long)ld; + memcpy(s2, &ull, 8); + + /* The unsigned long is the same as signed long. */ + if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && + s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) + ret = 0; + } + } + + done: + exit(ret); + } + ], [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)]) +fi + +if test ${hdf5_cv_ldouble_to_long_special} = "yes"; then + AC_DEFINE([LDOUBLE_TO_LONG_SPECIAL], [1], + [Define if your system converts long double to (unsigned) long values with special algorithm.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_long_to_ldouble_special=${hdf5_cv_long_to_ldouble_special=no} +else + AC_CACHE_VAL([hdf5_cv_long_to_ldouble_special], + [AC_TRY_RUN([ + int main(void) + { + long double ld; + long ll; + unsigned long ull; + unsigned char s[16]; + int flag=0, ret=1; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long)==8) { + ll = 0x003fffffffffffffL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /* The library converts the value to 0x434fffffffffffff8000000000000000. + * In decimal it is 18014398509481982.000000, one value short of the original. + * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000. + * The value is correct in decimal. It uses some special + * algorithm. We're going to define the macro and skip the test until + * we can figure out how they do it. */ + if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && + s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && + s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) + ret = 0; + } + if(flag==1 && sizeof(unsigned long)==8) { + ull = 0xffffffffffffffffUL; + ld = (long double)ull; + memcpy(s, &ld, 16); + /* Use a different value from signed long to test. The problem is the same + * for both long and unsigned long. The value is 18446744073709551615. + * The library converts the value to 0x43effffffffffffffe000000000000000. + * In decimal it's 18446744073709548544.000000, very different from the original. + * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000. + * The value is correct in decimal. It uses some special + * algorithm. We're going to define the macro and skip the test until + * we can figure out how they do it. */ + if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && + s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && + s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) + ret = 0; + } + done: + exit(ret); + } + ], [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)]) +fi + +if test ${hdf5_cv_long_to_ldouble_special} = "yes"; then + AC_DEFINE([LONG_TO_LDOUBLE_SPECIAL], [1], + [Define if your system can convert (unsigned) long to long double values with special algorithm.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if correctly converting long double to (unsigned) long long values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} +else + AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate], + [AC_TRY_RUN([ + int main(void) + { + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } + done: + exit(ret); + } + ], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],)]) +fi + +if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then + AC_DEFINE([LDOUBLE_TO_LLONG_ACCURATE], [1], + [Define if your system can convert long double to (unsigned) long long values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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. +## +AC_MSG_CHECKING([if correctly converting (unsigned) long long to long double values]) + +if test ${ac_cv_sizeof_long_double} = 0; then + hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} +else + AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct], + [AC_TRY_RUN([ + int main(void) + { + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + done: + exit(ret); + } + ], [hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],)]) +fi + +if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then + AC_DEFINE([LLONG_TO_LDOUBLE_CORRECT], [1], + [Define if your system can convert (unsigned) long long to long double values correctly.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +## ---------------------------------------------------------------------- +## Set the flag to indicate that the machine generates bad code +## for the H5VM_log2_gen() routine in src/H5VMprivate.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]) + +if test ${hdf5_cv_bad_log2_code_generated} = "yes"; then + AC_DEFINE([BAD_LOG2_CODE_GENERATED], [1], + [Define if your system generates wrong code for log2 routine.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +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`" +AC_SUBST([H5_VERSION]) + +## Configuration date +AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" + +## User doing the configuration +AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" +if test -n "$ORGANIZATION"; then + CONFIG_USER="$CONFIG_USER at $ORGANIZATION" +fi + +## Configuration mode (production, development, profile, etc) saved above. +AC_SUBST([CONFIG_MODE]) + +## Byte sex from the AC_C_BIGENDIAN macro. +AC_SUBST([BYTESEX]) +if test "X$ac_cv_c_bigendian" = "Xyes"; then + BYTESEX="big-endian" +else + BYTESEX="little-endian" +fi + + +if test "X$ac_cv_c_bigendian" = "Xyes"; then + WORDS_BIGENDIAN="yes" +else + WORDS_BIGENDIAN="no" +fi +AC_SUBST([WORDS_BIGENDIAN]) + +## 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. +AC_SUBST([CC_VERSION]) +## 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 + CC_VERSION="$CC" +else + CC_VERSION="$CC"; + for x in `echo $PATH | sed -e 's/:/ /g'`; do + if test -x $x/$CC_NOFLAGS; then + CC_VERSION="$x/$CC" + break + fi + done +fi +if test -n "$cc_version_info"; then + CC_VERSION="$CC_VERSION ( $cc_version_info)" +fi + +AC_SUBST([FC_VERSION]) +## Strip anything that looks like a flag off of $FC +FC_NOFLAGS=`echo $FC | sed 's/ -.*//'` + +if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then + FC_VERSION="$FC" +else + FC_VERSION="$FC"; + for x in `echo $PATH | sed -e 's/:/ /g'`; do + if test -x $x/$FC_NOFLAGS; then + FC_VERSION="$x/$FC" + break + fi + done +fi +if test -n "$fc_version_info"; then + FC_VERSION="$FC_VERSION ( $fc_version_info)" +fi + +AC_SUBST([CXX_VERSION]) +## Strip anything that looks like a flag off of $CXX +CXX_NOFLAGS=`echo $CXX | sed 's/ -.*//'` + +if `echo $CXX_NOFLAGS | grep ^/ >/dev/null 2>&1`; then + CXX_VERSION="$CXX" +else + CXX_VERSION="$FC"; + for x in `echo $PATH | sed -e 's/:/ /g'`; do + if test -x $x/$CXX_NOFLAGS; then + CXX_VERSION="$x/$CXX" + break + fi + done +fi +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 + pwd=pwd +fi +AC_SUBST([ROOT]) 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. +## +AC_SUBST([DYNAMIC_DIRS]) DYNAMIC_DIRS="" + +if test -n "$AM_LDFLAGS $LDFLAGS"; then + for d in $AM_LDFLAGS $LDFLAGS ; do + case "$d" in + -L*) + d="`echo $d | sed -e 's/-L//g'`" + case "$d" in + .*) + ## 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" + ;; + esac + done +fi + +if test -n "$AM_CPPFLAGS"; then + TEMP_CPPFLAGS="" + for d in $AM_CPPFLAGS ; do + case "$d" in + -I.*) + ## 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 + TEMP_CPPFLAGS="$d $TEMP_CPPFLAGS" + done + AM_CPPFLAGS=$TEMP_CPPFLAGS +fi + +## ---------------------------------------------------------------------- +## 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 +AC_SUBST(HL_FOR) HL_FOR="" +AC_MSG_CHECKING([if high level library is enabled]) +AC_ARG_ENABLE([hl], + [AS_HELP_STRING([--enable-hl], + [Enable the high level library [default=yes]])], + [HDF5_HL=$enableval], + [HDF5_HL=yes]) + +if test "X$HDF5_HL" = "Xyes"; then + echo "yes" + HL="hl" + AC_DEFINE([INCLUDE_HL], [1], + [Define if HDF5's high-level library headers should be included in hdf5.h]) + +## Check if Fortran's default real is double precision. If it is and HL is being built then configure +## should fail due to bug HDFFV-889. + if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then + AC_MSG_ERROR([Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl.]) + fi +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. +## +AC_MSG_CHECKING([additional programs should be built]) +AC_ARG_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]) + +if test "X$BUILD_ALL" = "Xyes"; then + echo "yes" +else + echo "no" +fi +AM_CONDITIONAL([BUILD_ALL_CONDITIONAL], [test "X$BUILD_ALL" = "Xyes"]) + +## ---------------------------------------------------------------------- +## Enable deprecated public API symbols +## +AC_SUBST([DEPRECATED_SYMBOLS]) +AC_MSG_CHECKING([if deprecated public symbols are available]); +AC_ARG_ENABLE([deprecated-symbols], + [AS_HELP_STRING([--enable-deprecated-symbols], + [Enable deprecated public API symbols [default=yes]])], + [DEPREC_SYMBOLS=$enableval], + [DEPREC_SYMBOLS=yes]) + +case "X-$DEPREC_SYMBOLS" in + X-yes) + AC_MSG_RESULT([yes]) + DEPRECATED_SYMBOLS=yes + ;; + X-no|*) + AC_MSG_RESULT([no]) + DEPRECATED_SYMBOLS=no + AC_DEFINE([NO_DEPRECATED_SYMBOLS], [1], + [Define if deprecated public API symbols are disabled]) + ;; +esac + +## -------------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--with-default-api-version=(v16|v18|v110)], + [Specify default release version of public symbols + [default=v110]])],, + [withval=v110]) + +if test "X$withval" = "Xv16"; then + AC_MSG_RESULT([v16]) + DEFAULT_API_VERSION=v16 + AC_DEFINE([USE_16_API_DEFAULT], [1], + [Define using v1.6 public API symbols by default]) +elif test "X$withval" = "Xv18"; then + AC_MSG_RESULT([v18]) + DEFAULT_API_VERSION=v18 +elif test "X$withval" = "Xv110"; then + AC_MSG_RESULT([v110]) + DEFAULT_API_VERSION=v110 +else + AC_MSG_ERROR([invalid version of public symbols given]) +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 + 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 + +## ---------------------------------------------------------------------- +## 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], + [AS_HELP_STRING([--enable-strict-format-checks], + [Enable strict file format checks, default=yes if + debug flag is enabled, no otherwise])], + [STRICT_CHECKS=$enableval]) + +## Default to yes if debug is enabled +if test "X-$STRICT_CHECKS" = X- ; then + if test -z "$DEBUG_PKG" ; then + STRICT_CHECKS=no + else + STRICT_CHECKS=yes + fi +fi + +case "X-$STRICT_CHECKS" in + X-yes) + AC_MSG_RESULT([yes]) + STRICT_FORMAT_CHECKS=yes + AC_DEFINE([STRICT_FORMAT_CHECKS], [1], + [Define if strict file format checks are enabled]) + ;; + X-no|*) + AC_MSG_RESULT([no]) + STRICT_FORMAT_CHECKS=no + ;; +esac + + +## ---------------------------------------------------------------------- +## Enable embedded library information +## +AC_MSG_CHECKING([whether to have library information embedded in the executables]) +AC_ARG_ENABLE([embedded-libinfo], + [AS_HELP_STRING([--enable-embedded-libinfo], + [Enable embedded library information [default=yes]])], + [enable_embedded_libinfo=$enableval], + [enable_embedded_libinfo=yes]) + + if test "${enable_embedded_libinfo}" = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_EMBEDDED_LIBINFO], [1], + [Define if library information should be embedded in the executables]) + else + AC_MSG_RESULT([no]) + fi + + +## ---------------------------------------------------------------------- +## Check if pointer alignments are enforced +## +AC_MSG_CHECKING([if alignment restrictions are strictly enforced]) +AC_RUN_IFELSE([ + AC_LANG_PROGRAM([ + #include + #include + + typedef struct { + size_t len; + void *p; + } hvl_t; + ], [ + char *chp = "beefs"; + char **chpp = malloc (2 * sizeof (char *)); + char **chpp2; + hvl_t vl = { 12345, (void *) chp }; + hvl_t *vlp; + hvl_t *vlp2; + + memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *)); + chpp2 = (char **) ((char *) chpp + 1); + if (strcmp (*chpp2, chp)) { + free (chpp); + return 1; + } + free (chpp); + + vlp = malloc (2 * sizeof (hvl_t)); + memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t)); + vlp2 = (hvl_t *) ((char *) vlp + 1); + if (vlp2->len != vl.len || vlp2->p != vl.p) { + free (vlp); + return 1; + } + free (vlp); + ]) + ], [ + AC_DEFINE([NO_ALIGNMENT_RESTRICTIONS], [1], [Define if we can violate pointer alignment restrictions]) + AC_MSG_RESULT([no]) + ], [ + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([unknown, assuming yes]) + ]) + + +## ---------------------------------------------------------------------- +## Restore user's CFLAGS. +CFLAGS="$saved_user_CFLAGS" +FCFLAGS="$saved_user_FCFLAGS" +CXXFLAGS="$saved_user_CXXFLAGS" +CPPFLAGS="$saved_user_CPPFLAGS" +LDFLAGS="$saved_user_LDFLAGS" + + +## ---------------------------------------------------------------------- +## 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"]) +AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"]) + + +## ---------------------------------------------------------------------- +## Build the Makefiles. +## + +## 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 + +## 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 + +## 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 +mkdir ./config >/dev/null 2>&1 +touch ./config/stamp1 + +## Then the config.status file (but not makefiles) +saved_no_create=$no_create +no_create=yes + +PARALLEL_MAKE="" +FORTRAN_PARALLEL_MAKE="" + +if test -n "$TESTPARALLEL"; then + PARALLEL_MAKE="$TESTPARALLEL/Makefile" + + if test "X$HDF_FORTRAN" = "Xyes"; then + FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile + fi +fi +LT_OUTPUT +no_create=$saved_no_create + +## Then the stamp2 file for H5config.h +touch ./config/stamp2 + +## 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 $CC -v 2>&1 | grep '^gcc' > /dev/null ; then + : using gcc + else + echo 'fixing $wl in' $ofile +ed - $ofile < /dev/null +g/^wl=""/s//wl="-Wl,"/ +w +q +EOF + fi + ;; +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 + enable_shared=no +fi + +if (./libtool --features | grep '^enable static libraries' > /dev/null); then + enable_static=yes +else + enable_static=no +fi + +if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then + STATIC_SHARED="static, shared" +elif test "X$enable_static" = "Xyes"; then + STATIC_SHARED="static" +elif test "X$enable_shared" = "Xyes"; then + STATIC_SHARED="shared" +else + STATIC_SHARED="none" +fi + +## ---------------------------------------------------------------------- +## Set a macro if shared library is enabled. +## +AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"]) + +AC_CONFIG_FILES([src/libhdf5.settings + Makefile + src/Makefile + test/Makefile + test/testcheck_version.sh + test/testerror.sh + test/H5srcdir_str.h + test/testlibinfo.sh + test/testlinks_env.sh + test/test_plugin.sh + testpar/Makefile + tools/Makefile + tools/h5dump/Makefile + tools/h5dump/testh5dump.sh + tools/h5dump/testh5dumppbits.sh + tools/h5dump/testh5dumpxml.sh + tools/h5ls/testh5ls.sh + tools/h5import/Makefile + tools/h5import/h5importtestutil.sh + tools/h5diff/Makefile + tools/h5diff/testh5diff.sh + tools/h5diff/testph5diff.sh + tools/h5jam/Makefile + tools/h5jam/testh5jam.sh + tools/h5repack/Makefile + tools/h5repack/h5repack.sh + tools/h5repack/h5repack_plugin.sh + tools/h5ls/Makefile + tools/h5copy/Makefile + tools/h5copy/testh5copy.sh + tools/lib/Makefile + tools/misc/Makefile + tools/misc/h5cc + tools/misc/testh5mkgrp.sh + tools/misc/testh5repart.sh + tools/h5stat/testh5stat.sh + tools/h5stat/Makefile + tools/perform/Makefile + examples/Makefile + examples/run-c-ex.sh + examples/testh5cc.sh + c++/Makefile + c++/src/Makefile + c++/src/h5c++ + c++/test/Makefile + c++/test/H5srcdir_str.h + c++/examples/Makefile + c++/examples/run-c++-ex.sh + c++/examples/testh5c++.sh + fortran/Makefile + fortran/src/h5fc + fortran/src/Makefile + fortran/test/Makefile + fortran/testpar/Makefile + fortran/examples/Makefile + fortran/examples/run-fortran-ex.sh + fortran/examples/testh5fc.sh + hl/Makefile + hl/src/Makefile + hl/test/Makefile + hl/test/H5srcdir_str.h + hl/tools/Makefile + hl/tools/gif2h5/Makefile + hl/tools/gif2h5/h52giftest.sh + hl/examples/Makefile + hl/examples/run-hlc-ex.sh + hl/c++/Makefile + hl/c++/src/Makefile + hl/c++/test/Makefile + hl/c++/examples/Makefile + hl/c++/examples/run-hlc++-ex.sh + hl/fortran/Makefile + hl/fortran/src/Makefile + hl/fortran/test/Makefile + hl/fortran/examples/Makefile + hl/fortran/examples/run-hlfortran-ex.sh]) + +AC_OUTPUT + +chmod 755 tools/misc/h5cc + +if test "X$HDF_FORTRAN" = "Xyes"; then + chmod 755 fortran/src/h5fc +fi + +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 < Date: Mon, 26 Jan 2015 05:06:53 -0500 Subject: [svn-r26028] Removed code from configure.ac that #defined (H5)_NO_SHARED_WRITING under CodeWarrior as a work-around to broken open() functionality (it's not clear which version). The only effect of this #define was to cause test_file_close() in test/tfile.c to be skipped. Fixes HDFFV-9080 Tested on: jam We don't have CodeWarrior, so I just ensured the deletion didn't adversely affect a typical build. --- config/cmake/H5pubconf.h.in | 3 --- configure | 10 ---------- configure.ac | 9 --------- src/H5config.h.in | 3 --- test/tfile.c | 2 -- vms/src/h5pubconf.h | 3 --- 6 files changed, 30 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 8235c54..05058d2 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -540,9 +540,6 @@ /* Define if deprecated public API symbols are disabled */ #cmakedefine H5_NO_DEPRECATED_SYMBOLS @H5_NO_DEPRECATED_SYMBOLS@ -/* Define if shared writing must be disabled (CodeWarrior only) */ -#cmakedefine H5_NO_SHARED_WRITING @H5_NO_SHARED_WRITING@ - /* Name of package */ #define H5_PACKAGE "@HDF5_PACKAGE@" diff --git a/configure b/configure index e229b06..0b9e8c4 100755 --- a/configure +++ b/configure @@ -29303,16 +29303,6 @@ $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? ## diff --git a/configure.ac b/configure.ac index e70ed30..c2c263f 100644 --- a/configure.ac +++ b/configure.ac @@ -2966,15 +2966,6 @@ if test -n "$FILTERS"; then done fi -## ---------------------------------------------------------------------- -## 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 - ## -------------------------------------------------------------------------- ## Should the Default Virtual File Driver be compiled? ## diff --git a/src/H5config.h.in b/src/H5config.h.in index daf7d0d..eca8583 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -482,9 +482,6 @@ /* Define if deprecated public API symbols are disabled */ #undef NO_DEPRECATED_SYMBOLS -/* Define if shared writing must be disabled (CodeWarrior only) */ -#undef NO_SHARED_WRITING - /* Name of package */ #undef PACKAGE diff --git a/test/tfile.c b/test/tfile.c index 4bef41c..5de035a 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -3652,9 +3652,7 @@ test_file(void) test_file_create(); /* Test file creation(also creation templates)*/ test_file_open(); /* Test file opening */ -#ifndef H5_NO_SHARED_WRITING test_file_close(); /* Test file close behavior */ -#endif /* H5_NO_SHARED_WRITING */ test_get_file_id(); /* Test H5Iget_file_id */ test_get_obj_ids(); /* Test H5Fget_obj_ids for Jira Issue 8528 */ test_file_perm(); /* Test file access permissions */ diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 67f0443..66785ce 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -488,9 +488,6 @@ /* Define if deprecated public API symbols are disabled */ /* #undef H5_NO_DEPRECATED_SYMBOLS */ -/* Define if shared writing must be disabled (CodeWarrior only) */ -#define H5_NO_SHARED_WRITING 1 - /* Name of package */ #define H5_PACKAGE "hdf5" -- cgit v0.12 From 4e37d30dbaa04b907cf05a6ec7ffe9df3abcfb62 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 26 Jan 2015 06:14:54 -0500 Subject: [svn-r26029] Updated the comment on the Cygwin 'srcdir= and time' test to indicate that it's still an issue with recent versions of Cygwin. Fixes HDFFV-9082 Tested on: jam (bin/reconfigure only - just a comment change) --- configure | 5 +++++ configure.ac | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/configure b/configure index 0b9e8c4..a035b9c 100755 --- a/configure +++ b/configure @@ -7917,6 +7917,11 @@ 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. +## +## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- +## and 64-bit platforms. Given how long this has been true, it seems +## unlikely to change, but we should probably re-test this periodically. + { $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; } diff --git a/configure.ac b/configure.ac index c2c263f..d7804a6 100644 --- a/configure.ac +++ b/configure.ac @@ -763,6 +763,11 @@ 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. +## +## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- +## and 64-bit platforms. Given how long this has been true, it seems +## unlikely to change, but we should probably re-test this periodically. + AC_MSG_CHECKING([if srcdir= and time commands work together]) AC_SUBST([TIME]) -- cgit v0.12 From b10f26ab1801d5ac152c8396b9226ec4fafe6797 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 26 Jan 2015 22:31:03 -0500 Subject: [svn-r26042] Updated configure.ac so that POSIX_C_SOURCE=200112L and GNU_SOURCE are defined. The former is for posix_memalign() and the latter for the O_DIRECT flag for open(). Both are for direct VFD support. Fixes HDFFV-9088 Tested on: jam --- configure | 13 +++++++++++-- configure.ac | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/configure b/configure index a035b9c..b2fcbf1 100755 --- a/configure +++ b/configure @@ -23573,19 +23573,28 @@ case "$host_cpu-$host_vendor-$host_os" in ## 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. + ## correctly. This was later updated to 200112L so that + ## posix_memalign() is visible for the direct VFD code on Linux + ## systems. + ## ## 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" + H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" + + ## Need to add this so that O_DIRECT is visible for the direct + ## VFD on Linux systems. + AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS" ## Also add BSD support on Linux systems, so defines ## __USE_BSD, which is required to get the prototype for strdup diff --git a/configure.ac b/configure.ac index d7804a6..e7bbda5 100644 --- a/configure.ac +++ b/configure.ac @@ -1479,19 +1479,28 @@ case "$host_cpu-$host_vendor-$host_os" in ## 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. + ## correctly. This was later updated to 200112L so that + ## posix_memalign() is visible for the direct VFD code on Linux + ## systems. + ## ## 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" + H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" + + ## Need to add this so that O_DIRECT is visible for the direct + ## VFD on Linux systems. + AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS" ## Also add BSD support on Linux systems, so defines ## __USE_BSD, which is required to get the prototype for strdup -- cgit v0.12 From 1e85e7ca5257c66c73fc426ebe58c9faf85597ca Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 10:29:06 -0500 Subject: [svn-r26047] Fix for HDFFV-9092 Change AC_TRY_RUN TO AC_TRY_COMPILE Changed all the instances of AC_TRY_RUN for the Fortran and C++ tests to use AC_COMPILE_IFELSE tested: jam --- configure | 281 +++++++++++------------------------------------------------ configure.ac | 120 +++++++++---------------- 2 files changed, 93 insertions(+), 308 deletions(-) diff --git a/configure b/configure index b2fcbf1..b98746c 100755 --- a/configure +++ b/configure @@ -1888,48 +1888,6 @@ fi } # ac_fn_c_try_link -# ac_fn_fc_try_run LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_fc_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_run - # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -2005,48 +1963,6 @@ fi } # ac_fn_cxx_try_cpp -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -6663,21 +6579,10 @@ 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; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat > conftest.$ac_ext <<_ACEOF PROGRAM main @@ -6685,29 +6590,20 @@ else END PROGRAM _ACEOF -if ac_fn_fc_try_run "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_SIZEOF="yes" + HAVE_SIZEOF_FORTRAN="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat > conftest.$ac_ext <<_ACEOF PROGRAM main @@ -6718,29 +6614,20 @@ else END PROGRAM _ACEOF -if ac_fn_fc_try_run "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_C_SIZEOF="yes" + HAVE_C_SIZEOF_FORTRAN="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat > conftest.$ac_ext <<_ACEOF PROGRAM main @@ -6750,18 +6637,15 @@ else END PROGRAM _ACEOF -if ac_fn_fc_try_run "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_STORAGE_SIZE="yes" + HAVE_STORAGE_SIZE_FORTRAN="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. @@ -6769,12 +6653,6 @@ fi { $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; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat > conftest.$ac_ext <<_ACEOF MODULE type_mod @@ -6799,18 +6677,15 @@ else END PROGRAM main _ACEOF -if ac_fn_fc_try_run "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $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 -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "X$HDF_FORTRAN2003" = "Xyes"; then @@ -6865,7 +6740,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "X$HAVE_SIZEOF" = "Xyes"; then + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then FORTRAN_HAVE_SIZEOF_TRUE= FORTRAN_HAVE_SIZEOF_FALSE='#' else @@ -6873,7 +6748,7 @@ else FORTRAN_HAVE_SIZEOF_FALSE= fi - if test "X$HAVE_C_SIZEOF" = "Xyes"; then + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then FORTRAN_HAVE_C_SIZEOF_TRUE= FORTRAN_HAVE_C_SIZEOF_FALSE='#' else @@ -6881,7 +6756,7 @@ else FORTRAN_HAVE_C_SIZEOF_FALSE= fi - if test "X$HAVE_STORAGE_SIZE" = "Xyes"; then + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then FORTRAN_HAVE_STORAGE_SIZE_TRUE= FORTRAN_HAVE_STORAGE_SIZE_FALSE='#' else @@ -6906,8 +6781,6 @@ else fi - - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## @@ -7489,13 +7362,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5 $as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } -if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7503,30 +7370,19 @@ else int main(void) { return 0; } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - - echo no - +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else - - echo yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 $as_echo_n "checking if $CXX can handle namespaces... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7541,30 +7397,19 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - - echo yes - +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - - echo no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports std" >&5 $as_echo_n "checking if $CXX supports std... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7578,30 +7423,19 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - - echo yes - +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - - echo no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DH5_NO_STD" AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD" - fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports bool types" >&5 $as_echo_n "checking if $CXX supports bool types... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7611,21 +7445,16 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - - echo yes - +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - - echo no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED" - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 $as_echo_n "checking if $CXX has offsetof extension... " >&6; } @@ -7663,11 +7492,11 @@ main () } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } $as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h - { $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 $as_echo "no" >&6; } @@ -7676,12 +7505,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 $as_echo_n "checking if $CXX can handle static cast... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7694,23 +7517,19 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - - echo yes - +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - - echo no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" - fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } CXX="no" fi diff --git a/configure.ac b/configure.ac index e7bbda5..51e40d7 100644 --- a/configure.ac +++ b/configure.ac @@ -460,56 +460,42 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_FC_WRAPPERS ## -------------------------------------------------------------------- - ## See if the compiler will support the "-I." option - ## - dnl AM_FCFLAGS_saved=$AM_FCFLAGS - dnl AM_FCFLAGS="${AM_FCFLAGS} -I." - - dnl AC_MSG_CHECKING(if compiler supports -I. option) - dnl AC_TRY_FCOMPILE([ - dnl program conftest - dnl end - dnl ], AC_MSG_RESULT(yes), - dnl AC_MSG_RESULT(no) - dnl AM_FCFLAGS="$AM_FCFLAGS_saved") - - ## -------------------------------------------------------------------- ## See if the fortran compiler supports the intrinsic function "SIZEOF" AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ PROGRAM main i = sizeof(x) END PROGRAM - ], [AC_MSG_RESULT([yes]) - HAVE_SIZEOF="yes"], - [AC_MSG_RESULT([no])]) + ])],[AC_MSG_RESULT([yes]) + HAVE_SIZEOF_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ PROGRAM main USE ISO_C_BINDING INTEGER(C_INT) :: a INTEGER(C_SIZE_T) :: result result = C_SIZEOF(a) END PROGRAM - ], [AC_MSG_RESULT([yes]) - HAVE_C_SIZEOF="yes"], + ])], [AC_MSG_RESULT([yes]) + HAVE_C_SIZEOF_FORTRAN="yes"], [AC_MSG_RESULT([no])]) ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ PROGRAM main INTEGER :: a INTEGER :: result result = STORAGE_SIZE(a) END PROGRAM - ], [AC_MSG_RESULT([yes]) - HAVE_STORAGE_SIZE="yes"], + ])], [AC_MSG_RESULT([yes]) + HAVE_STORAGE_SIZE_FORTRAN="yes"], [AC_MSG_RESULT([no])]) ## Check to see if -r8 was specified to determine if we need to @@ -517,7 +503,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ MODULE type_mod INTERFACE h5t MODULE PROCEDURE h5t_real @@ -538,10 +524,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then CALL h5t(r) 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 @@ -561,8 +546,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ptr = C_LOC(ichr(1:1)) - ])], - [AC_MSG_RESULT([yes]) + ])],[AC_MSG_RESULT([yes]) HAVE_F2003_REQUIREMENTS=[yes]], [AC_MSG_RESULT([no])]) if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then @@ -580,14 +564,12 @@ fi ## Change back to the C language AC_LANG_POP(Fortran) -AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF" = "Xyes"]) -AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_SIZEOF], [test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_C_SIZEOF], [test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([FORTRAN_HAVE_STORAGE_SIZE], [test "X$HAVE_STORAGE_SIZE_FORTRAN" = "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"]) - - ## ---------------------------------------------------------------------- ## Check if they would like the C++ interface compiled ## @@ -612,20 +594,18 @@ if test "X$HDF_CXX" = "Xyes"; then AC_LANG_PUSH(C++) AC_MSG_CHECKING([if $CXX needs old style header files in includes]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main(void) { return 0; } - ], [ - echo no - ], [ - echo yes + ])], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" - AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" - ]) + AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"]) AC_MSG_CHECKING([if $CXX can handle namespaces]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ namespace H5 { int fnord; } @@ -635,16 +615,13 @@ int main(void) { fnord = 37; return 0; } - ], [ - echo yes - ], [ - echo no + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" - ]) + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"]) AC_MSG_CHECKING([if $CXX supports std]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include using namespace std; @@ -653,30 +630,24 @@ int main(void) { string myString("testing namespace std"); return 0; } - ], [ - echo yes - ], [ - echo no + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) CXXFLAGS="${CXXFLAGS} -DH5_NO_STD" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD" - ]) + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"]) AC_MSG_CHECKING([if $CXX supports bool types]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ int main(void) { bool flag; return 0; } - ], [ - echo yes - ], [ - echo no + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" - AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED" - ]) + AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED"]) AC_MSG_CHECKING([if $CXX has offsetof extension]) - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include #include ],[ @@ -690,14 +661,12 @@ int main(void) { int x,y; x = offsetof(struct index_st, len); y = offsetof(index_t, num) - ], - AC_DEFINE([CXX_HAVE_OFFSETOF], [1], - [Define if C++ compiler recognizes offsetof]) - AC_MSG_RESULT([yes]), + ])],[AC_MSG_RESULT([yes]) + AC_DEFINE([CXX_HAVE_OFFSETOF], [1], [Define if C++ compiler recognizes offsetof])], AC_MSG_RESULT([no])) AC_MSG_CHECKING([if $CXX can handle static cast]) - AC_TRY_RUN([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ int main(void) { float test_float; int test_int; @@ -705,15 +674,12 @@ int main(void) { test_int = static_cast (test_float); return 0; } - ], [ - echo yes - ], [ - echo no + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" - AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" - ]) + AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"]) else - echo "no" + AC_MSG_RESULT([no]) CXX="no" fi -- cgit v0.12 From 4d34a0c6ad62e0482b699987c6852014dc60b699 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 12:17:09 -0500 Subject: [svn-r26051] Fix for HDFFV-9092 Change AC_TRY_RUN TO AC_TRY_COMPILE Changed all the instances of AC_TRY_RUN for the Fortran and C++ tests to use AC_COMPILE_IFELSE and moved all the tests to new files in m4 directory: aclocal_cxx.m4 (for C++ tests) aclocal_fc.m4 (for Fortran tests) tested: jam --- MANIFEST | 2 + Makefile.in | 3 +- aclocal.m4 | 2 + acsite.m4 | 84 -------------- c++/Makefile.in | 3 +- c++/examples/Makefile.in | 3 +- c++/src/Makefile.in | 3 +- c++/test/Makefile.in | 3 +- configure | 78 ++++--------- configure.ac | 184 ++++-------------------------- examples/Makefile.in | 3 +- fortran/Makefile.in | 3 +- fortran/examples/Makefile.in | 3 +- fortran/src/Makefile.in | 3 +- fortran/test/Makefile.in | 3 +- fortran/testpar/Makefile.in | 3 +- hl/Makefile.in | 3 +- hl/c++/Makefile.in | 3 +- hl/c++/examples/Makefile.in | 3 +- hl/c++/src/Makefile.in | 3 +- hl/c++/test/Makefile.in | 3 +- hl/examples/Makefile.in | 3 +- hl/fortran/Makefile.in | 3 +- hl/fortran/examples/Makefile.in | 3 +- hl/fortran/src/Makefile.in | 3 +- hl/fortran/test/Makefile.in | 3 +- hl/src/Makefile.in | 3 +- hl/test/Makefile.in | 3 +- hl/tools/Makefile.in | 3 +- hl/tools/gif2h5/Makefile.in | 3 +- m4/aclocal_cxx.m4 | 117 +++++++++++++++++++ m4/aclocal_fc.m4 | 242 ++++++++++++++++++++++++++++++++++++++++ src/Makefile.in | 3 +- test/Makefile.in | 3 +- testpar/Makefile.in | 3 +- tools/Makefile.in | 3 +- tools/h5copy/Makefile.in | 3 +- tools/h5diff/Makefile.in | 3 +- tools/h5dump/Makefile.in | 3 +- tools/h5import/Makefile.in | 3 +- tools/h5jam/Makefile.in | 3 +- tools/h5ls/Makefile.in | 3 +- tools/h5repack/Makefile.in | 3 +- tools/h5stat/Makefile.in | 3 +- tools/lib/Makefile.in | 3 +- tools/misc/Makefile.in | 3 +- tools/perform/Makefile.in | 3 +- 47 files changed, 486 insertions(+), 343 deletions(-) create mode 100644 m4/aclocal_cxx.m4 create mode 100644 m4/aclocal_fc.m4 diff --git a/MANIFEST b/MANIFEST index fbc4a1e..e049eaa 100644 --- a/MANIFEST +++ b/MANIFEST @@ -33,6 +33,8 @@ ./m4/ltversion.m4 _DO_NOT_DISTRIBUTE_ ./m4/lt~obsolete.m4 _DO_NOT_DISTRIBUTE_ ./m4/ltoptions.m4 _DO_NOT_DISTRIBUTE_ +./m4/aclocal_fc.m4 +./m4/aclocal_cxx.m4 ./README.txt ./aclocal.m4 ./acsite.m4 diff --git a/Makefile.in b/Makefile.in index 670bbde..31884e6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -121,7 +121,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am $(srcdir)/Makefile.in \ $(top_srcdir)/bin/missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/aclocal.m4 b/aclocal.m4 index 1ecfa26..e10c539 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1183,6 +1183,8 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/aclocal_cxx.m4]) +m4_include([m4/aclocal_fc.m4]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, diff --git a/acsite.m4 b/acsite.m4 index eaab535..b144962 100644 --- a/acsite.m4 +++ b/acsite.m4 @@ -53,87 +53,3 @@ esac rm -rf conftest*[]dnl ])# _AC_SYS_LARGEFILE_MACRO_VALUE -dnl ------------------------------------------------------------------------- -dnl AC_F9X_MODS() -dnl -dnl Check how F9X handles modules. This macro also checks which -dnl command-line option to use to include the module once it's built. -dnl -AC_DEFUN(AC_F9X_MODS, -[AC_MSG_CHECKING(what $FC does with modules) -AC_LANG_PUSH(Fortran) - -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * - -cat >conftest.$ac_ext <&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 - else - echo yes 6>&1 - fi -fi -cd .. - -AC_MSG_CHECKING(how $FC finds modules) - -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" -else - echo unknown 1>&6 -fi -AC_SUBST(F9XMODFLAG) -AC_SUBST(F9XMODEXT) -rm -rf conftest* -AC_LANG_POP(Fortran) -]) - diff --git a/c++/Makefile.in b/c++/Makefile.in index de87fa5..c409ef1 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -101,7 +101,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = c++ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 3403db4..a7b2a28 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -107,7 +107,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = $(TEST_SCRIPT) subdir = c++/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 7752e12..2532815 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -109,7 +109,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = c++/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 49c08e4..ddbd8e0 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -106,7 +106,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = $(am__EXEEXT_1) subdir = c++/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/configure b/configure index b98746c..841ae4e 100755 --- a/configure +++ b/configure @@ -5576,14 +5576,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ## -------------------------------------------------------------------- - ## Check for a Fortran 9X compiler and how to include modules. + ## Check for a Fortran 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 if test -n "$ac_tool_prefix"; then - for ac_prog in f90 pgf90 slf90 f95 g95 xlf95 efc ifort ftn + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -5627,7 +5627,7 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in f90 pgf90 slf90 f95 g95 xlf95 efc ifort ftn + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -6600,6 +6600,7 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 @@ -6624,6 +6625,7 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 @@ -6647,6 +6649,8 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. @@ -6687,12 +6691,13 @@ $as_echo "yes" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 "$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; } HAVE_FORTRAN_2003="no" @@ -6720,11 +6725,11 @@ 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 - ## 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 @@ -7359,10 +7364,12 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # Checking if C++ needs old style header files in includes + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5 $as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -7381,6 +7388,9 @@ $as_echo "yes" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + # Checking if C++ can handle namespaces + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 $as_echo_n "checking if $CXX can handle namespaces... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7408,53 +7418,8 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports std" >&5 -$as_echo_n "checking if $CXX supports std... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -using namespace std; - -int main(void) { - string myString("testing namespace std"); - return 0; -} - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $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 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DH5_NO_STD" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports bool types" >&5 -$as_echo_n "checking if $CXX supports bool types... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int main(void) { - bool flag; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $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 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" - AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Checking if C++ has offsetof extension { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 $as_echo_n "checking if $CXX has offsetof extension... " >&6; } @@ -7503,6 +7468,9 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + # if C++ can handle static cast + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 $as_echo_n "checking if $CXX can handle static cast... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7527,6 +7495,8 @@ $as_echo "no" >&6; } AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } diff --git a/configure.ac b/configure.ac index 51e40d7..393b194 100644 --- a/configure.ac +++ b/configure.ac @@ -441,9 +441,9 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([FSEARCH_DIRS]) ## -------------------------------------------------------------------- - ## Check for a Fortran 9X compiler and how to include modules. + ## Check for a Fortran compiler and how to include modules. ## - AC_PROG_FC([f90 pgf90 slf90 f95 g95 xlf95 efc ifort ftn],) + AC_PROG_FC([PAC_FC_SEARCH_LIST],) AC_F9X_MODS ## It seems that libtool (as of Libtool 1.5.14) is trying to @@ -461,99 +461,27 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## -------------------------------------------------------------------- ## See if the fortran compiler supports the intrinsic function "SIZEOF" - - AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - PROGRAM main - i = sizeof(x) - END PROGRAM - ])],[AC_MSG_RESULT([yes]) - HAVE_SIZEOF_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) + PAC_PROG_FC_SIZEOF ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" - - AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - PROGRAM main - USE ISO_C_BINDING - INTEGER(C_INT) :: a - INTEGER(C_SIZE_T) :: result - result = C_SIZEOF(a) - END PROGRAM - ])], [AC_MSG_RESULT([yes]) - HAVE_C_SIZEOF_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) + PAC_PROG_FC_C_SIZEOF ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - - AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - PROGRAM main - INTEGER :: a - INTEGER :: result - result = STORAGE_SIZE(a) - END PROGRAM - ])], [AC_MSG_RESULT([yes]) - HAVE_STORAGE_SIZE_FORTRAN="yes"], - [AC_MSG_RESULT([no])]) + PAC_PROG_FC_STORAGE_SIZE ## 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]) - - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - MODULE type_mod - INTERFACE h5t - MODULE PROCEDURE h5t_real - MODULE PROCEDURE h5t_dble - END INTERFACE - CONTAINS - SUBROUTINE h5t_real(r) - REAL :: r - END SUBROUTINE h5t_real - SUBROUTINE h5t_dble(d) - DOUBLE PRECISION :: d - END SUBROUTINE h5t_dble - END MODULE type_mod - PROGRAM main - USE type_mod - REAL :: r - DOUBLE PRECISION :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - ])], [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - FORTRAN_DEFAULT_REALisDBLE="yes"]) + PAC_PROG_FC_DEFAULT_REALisDBLE 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. - - AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) - HAVE_FORTRAN_2003="no" - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ - - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - - ptr = C_LOC(ichr(1:1)) - - ])],[AC_MSG_RESULT([yes]) - HAVE_F2003_REQUIREMENTS=[yes]], - [AC_MSG_RESULT([no])]) + PAC_PROG_FC_HAVE_F2003_REQUIREMENTS + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - ## 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" fi fi @@ -593,91 +521,18 @@ if test "X$HDF_CXX" = "Xyes"; then ## Change to the C++ language AC_LANG_PUSH(C++) - AC_MSG_CHECKING([if $CXX needs old style header files in includes]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include - -int main(void) { return 0; } - ])], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" - AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"]) - - AC_MSG_CHECKING([if $CXX can handle namespaces]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -namespace H5 { -int fnord; -} + # Checking if C++ needs old style header files in includes + PAC_PROG_CXX_HEADERS + + # Checking if C++ can handle namespaces + PAC_PROG_CXX_NAMESPACE + + # Checking if C++ has offsetof extension + PAC_PROG_CXX_OFFSETOF + + # if C++ can handle static cast + PAC_PROG_CXX_STAIC_CAST -int main(void) { - using namespace H5; - fnord = 37; - return 0; -} - ])], [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"]) - - AC_MSG_CHECKING([if $CXX supports std]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include - -using namespace std; - -int main(void) { - string myString("testing namespace std"); - return 0; -} - ])], [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - CXXFLAGS="${CXXFLAGS} -DH5_NO_STD" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"]) - - AC_MSG_CHECKING([if $CXX supports bool types]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -int main(void) { - bool flag; - return 0; -} - ])], [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED" - AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED"]) - - AC_MSG_CHECKING([if $CXX has offsetof extension]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ - #include - #include - ],[ - struct index_st - { - unsigned char type; - unsigned char num; - unsigned int len; - }; - typedef struct index_st index_t; - int x,y; - x = offsetof(struct index_st, len); - y = offsetof(index_t, num) - ])],[AC_MSG_RESULT([yes]) - AC_DEFINE([CXX_HAVE_OFFSETOF], [1], [Define if C++ compiler recognizes offsetof])], - AC_MSG_RESULT([no])) - - AC_MSG_CHECKING([if $CXX can handle static cast]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -int main(void) { - float test_float; - int test_int; - test_float = 37.0; - test_int = static_cast (test_float); - return 0; -} - ])], [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" - AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"]) else AC_MSG_RESULT([no]) CXX="no" @@ -695,7 +550,6 @@ if test "X$GCC" = "Xyes"; then AC_CHECK_PROGS([PERL], [perl],, [$PATH]) fi - ## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. diff --git a/examples/Makefile.in b/examples/Makefile.in index 71a9b4c..1a53108 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -107,7 +107,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = $(TEST_SCRIPT) subdir = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 4d8abdc..9dfbd0b 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -105,7 +105,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = fortran ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index b9b5efb..a42e5d8 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -115,7 +115,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = $(TEST_SCRIPT) subdir = fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 7e6b2eb..bf56554 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -112,7 +112,8 @@ noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index ca91cf5..936ac67 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -92,7 +92,8 @@ check_PROGRAMS = $(am__EXEEXT_2) TESTS = $(am__EXEEXT_2) subdir = fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 583b6dc..558bc00 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -109,7 +109,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = subdir = fortran/testpar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/Makefile.in b/hl/Makefile.in index cda0122..8950717 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -105,7 +105,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 3839814..f48852c 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -101,7 +101,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/c++ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 5712043..fbd94ae 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -106,7 +106,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/c++/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 3754fc9..b5b49e8 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -108,7 +108,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/c++/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index f6bd246..c410e07 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -105,7 +105,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = $(am__EXEEXT_1) subdir = hl/c++/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 6bbf493..8023d4f 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -106,7 +106,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 8fe9e35..d25ab46 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -105,7 +105,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/fortran ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 1051658..afb0e1a 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -106,7 +106,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/fortran/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 5d4eaf2..134048b 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -108,7 +108,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 4a929a6..f7d1f6f 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -107,7 +107,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = $(am__EXEEXT_1) subdir = hl/fortran/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 0ac1592..1a3e124 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -105,7 +105,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index a002482..a08c7c2 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -107,7 +107,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = $(am__EXEEXT_1) subdir = hl/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index a34e225..f2ea28d 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -101,7 +101,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = hl/tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 1c9be68..5ef6003 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -105,7 +105,8 @@ noinst_PROGRAMS = h52gifgentst$(EXEEXT) TESTS = $(TEST_SCRIPT) subdir = hl/tools/gif2h5 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4 new file mode 100644 index 0000000..2068587 --- /dev/null +++ b/m4/aclocal_cxx.m4 @@ -0,0 +1,117 @@ +dnl ------------------------------------------------------------------------- +dnl ------------------------------------------------------------------------- +dnl +dnl Copyright by the Board of Trustees of the University of Illinois. +dnl All rights reserved. +dnl +dnl This file is part of HDF5. The full HDF5 copyright notice, including +dnl terms governing use, modification, and redistribution, is contained in +dnl the files COPYING and Copyright.html. COPYING can be found at the root +dnl of the source code distribution tree; Copyright.html can be found at the +dnl root level of an installed copy of the electronic HDF5 document set and +dnl is linked from the top-level documents page. It can also be found at +dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have +dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +dnl +dnl ------------------------------------------------------------------------- +dnl ------------------------------------------------------------------------- + +dnl ********************************* +dnl PURPOSE +dnl Contains Macros for HDF5 C++ +dnl ********************************* + +dnl Checking if C++ needs old style header files in includes + +AC_DEFUN([PAC_PROG_CXX_HEADERS],[ + AC_MSG_CHECKING([if $CXX needs old style header files in includes]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include + +int main(void) { return 0; } + ])], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" + AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"]) +]) + +dnl Checking if ++ can handle namespaces + +AC_DEFUN([PAC_PROG_CXX_NAMESPACE],[ + AC_MSG_CHECKING([if $CXX can handle namespaces]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +namespace H5 { +int fnord; +} + +int main(void) { + using namespace H5; + fnord = 37; + return 0; +} + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"]) +]) + +dnl Checking if C++ supports std + +AC_DEFUN([PAC_PROG_CXX_STD],[ + AC_MSG_CHECKING([if $CXX supports std]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include + +using namespace std; + +int main(void) { + string myString("testing namespace std"); + return 0; +} + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + CXXFLAGS="${CXXFLAGS} -DH5_NO_STD" + AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"]) +]) + +dnl Checking if C++ has offsetof extension + +AC_DEFUN([PAC_PROG_CXX_OFFSETOF],[ + AC_MSG_CHECKING([if $CXX has offsetof extension]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include + #include + ],[ + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) + ])],[AC_MSG_RESULT([yes]) + AC_DEFINE([CXX_HAVE_OFFSETOF], [1], [Define if C++ compiler recognizes offsetof])], + AC_MSG_RESULT([no])) +]) + +dnl Checking if C++ can handle static cast + +AC_DEFUN([PAC_PROG_CXX_STAIC_CAST],[ + AC_MSG_CHECKING([if $CXX can handle static cast]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +int main(void) { + float test_float; + int test_int; + test_float = 37.0; + test_int = static_cast (test_float); + return 0; +} + ])], [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" + AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"]) +]) diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 new file mode 100644 index 0000000..ec638a3 --- /dev/null +++ b/m4/aclocal_fc.m4 @@ -0,0 +1,242 @@ +dnl ------------------------------------------------------------------------- +dnl ------------------------------------------------------------------------- +dnl +dnl Copyright by the Board of Trustees of the University of Illinois. +dnl All rights reserved. +dnl +dnl This file is part of HDF5. The full HDF5 copyright notice, including +dnl terms governing use, modification, and redistribution, is contained in +dnl the files COPYING and Copyright.html. COPYING can be found at the root +dnl of the source code distribution tree; Copyright.html can be found at the +dnl root level of an installed copy of the electronic HDF5 document set and +dnl is linked from the top-level documents page. It can also be found at +dnl http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have +dnl access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +dnl +dnl ------------------------------------------------------------------------- +dnl ------------------------------------------------------------------------- + +dnl ********************************* +dnl PURPOSE +dnl Contains Macros for HDF5 Fortran +dnl ********************************* +dnl +dnl PAC_FC_SEARCH_LIST - expands to a whitespace separated list of modern +dnl fortran compilers for use with AC_PROG_FC that is more suitable for HPC +dnl software packages +AC_DEFUN([PAC_FC_SEARCH_LIST], + [gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc]) +dnl +dnl PAC_PROG_FC([COMPILERS]) +dnl +dnl COMPILERS is a space separated list of Fortran compilers to search for. +dnl +dnl Compilers are ordered by +dnl 1. F90, F95, F2003 +dnl 2. Good/tested native compilers, bad/untested native compilers +dnl 3. Wrappers around f2c go last. +dnl +dnl frt is the Fujitsu Fortran compiler. +dnl pgf90 are the Portland Group F90 compilers. +dnl xlf/xlf90/xlf95/xlf2003 are IBM (AIX) F90/F95/F2003 compilers. +dnl lf95 is the Lahey-Fujitsu compiler. +dnl fl32 is the Microsoft Fortran "PowerStation" compiler. +dnl epcf90 is the "Edinburgh Portable Compiler" F90. +dnl fort is the Compaq Fortran 90 (now 95) compiler for Tru64 and Linux/Alpha. +dnl pathf90 is the Pathscale Fortran 90 compiler +dnl ifort is another name for the Intel f90 compiler +dnl efc - An older Intel compiler (?) +dnl ifc - An older Intel compiler +dnl fc - A compiler on some unknown system. This has been removed because +dnl it may also be the name of a command for something other than +dnl the Fortran compiler (e.g., fc=file system check!) +dnl gfortran - The GNU Fortran compiler (not the same as g95) +dnl gfc - An alias for gfortran recommended in cygwin installations +dnl NOTE: this macro suffers from a basically intractable "expanded before it +dnl was required" problem when libtool is also used +dnl [1] MPICH.org +dnl + +dnl See if the fortran compiler supports the intrinsic function "SIZEOF" + +AC_DEFUN([PAC_PROG_FC_SIZEOF],[ + AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + i = sizeof(x) + END PROGRAM + ])],[AC_MSG_RESULT([yes]) + HAVE_SIZEOF_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) +]) + +dnl See if the fortran compiler supports the intrinsic function "C_SIZEOF" + +AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[ + AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + USE ISO_C_BINDING + INTEGER(C_INT) :: a + INTEGER(C_SIZE_T) :: result + result = C_SIZEOF(a) + END PROGRAM + ])], [AC_MSG_RESULT([yes]) + HAVE_C_SIZEOF_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) +]) + +dnl See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + +AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ + AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + PROGRAM main + INTEGER :: a + INTEGER :: result + result = STORAGE_SIZE(a) + END PROGRAM + ])], [AC_MSG_RESULT([yes]) + HAVE_STORAGE_SIZE_FORTRAN="yes"], + [AC_MSG_RESULT([no])]) + +]) + +dnl Check to see if -r8 was specified to determine if we need to +dnl compile the DOUBLE PRECISION interfaces. + +AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[ + AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + MODULE type_mod + INTERFACE h5t + MODULE PROCEDURE h5t_real + MODULE PROCEDURE h5t_dble + END INTERFACE + CONTAINS + SUBROUTINE h5t_real(r) + REAL :: r + END SUBROUTINE h5t_real + SUBROUTINE h5t_dble(d) + DOUBLE PRECISION :: d + END SUBROUTINE h5t_dble + END MODULE type_mod + PROGRAM main + USE type_mod + REAL :: r + DOUBLE PRECISION :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + ])], [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + FORTRAN_DEFAULT_REALisDBLE="yes"]) +]) + +dnl Checking if the compiler supports the required Fortran 2003 features and +dnl disable Fortran 2003 if it does not. + +AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ + AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) + HAVE_FORTRAN_2003="no" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + ])],[AC_MSG_RESULT([yes]) + HAVE_F2003_REQUIREMENTS=[yes]], + [AC_MSG_RESULT([no])]) +]) + +dnl ------------------------------------------------------------------------- +dnl AC_F9X_MODS() +dnl +dnl Check how F9X handles modules. This macro also checks which +dnl command-line option to use to include the module once it's built. +dnl +AC_DEFUN([AC_F9X_MODS], +[AC_MSG_CHECKING(what $FC does with modules) +AC_LANG_PUSH(Fortran) + +test -d conftestdir || mkdir conftestdir +cd conftestdir +rm -rf * + +cat >conftest.$ac_ext <&1 +if test "$modfiles" = file.o; then + echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 + OLD_FCFLAGS=$FCFLAGS + FCFLAGS="$FCFLAGS -em" + eval $ac_compile + modfiles="" + for f in file.o module.mod MODULE.mod module.M MODULE.M; do + test -f $f && modfiles="$f" + done + if test "$modfiles" = "file.o"; then + FCFLAGS=$OLD_FCFLAGS + echo no 6>&1 + else + echo yes 6>&1 + fi +fi +cd .. + +AC_MSG_CHECKING(how $FC finds modules) + +for flag in "-I" "-M" "-p"; do + cat >conftest.$ac_ext <&6 + FCFLAGS="$F9XMODFLAG. $FCFLAGS" +else + echo unknown 1>&6 +fi +AC_SUBST(F9XMODFLAG) +AC_SUBST(F9XMODEXT) +rm -rf conftest* +AC_LANG_POP(Fortran) +]) + diff --git a/src/Makefile.in b/src/Makefile.in index 1933734..96883f6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -109,7 +109,8 @@ noinst_PROGRAMS = H5detect$(EXEEXT) H5make_libsettings$(EXEEXT) TESTS = subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/test/Makefile.in b/test/Makefile.in index 2a43aaf..ab8402b 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -115,7 +115,8 @@ check_PROGRAMS = $(am__EXEEXT_1) error_test$(EXEEXT) \ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 6814acb..bf135b5 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -103,7 +103,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = subdir = testpar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/Makefile.in b/tools/Makefile.in index c4bf941..82aabdf 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -101,7 +101,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ TESTS = subdir = tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 76573a0..06ed9de 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -105,7 +105,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5copy ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 6a8d2ac..230518f 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -105,7 +105,8 @@ check_PROGRAMS = $(am__EXEEXT_2) TESTS = $(am__EXEEXT_2) $(TEST_SCRIPT) subdir = tools/h5diff ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 8cb1661..f887f1a 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -106,7 +106,8 @@ bin_PROGRAMS = h5dump$(EXEEXT) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5dump ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index d3b0185..aac2308 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -105,7 +105,8 @@ bin_PROGRAMS = h5import$(EXEEXT) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5import ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index d0c8f16..b2ee809 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -105,7 +105,8 @@ check_PROGRAMS = tellub$(EXEEXT) h5jamgentest$(EXEEXT) getub$(EXEEXT) TESTS = $(TEST_SCRIPT) subdir = tools/h5jam ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 2c4fe10..4d96b19 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -104,7 +104,8 @@ bin_PROGRAMS = h5ls$(EXEEXT) TESTS = $(TEST_SCRIPT) subdir = tools/h5ls ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 50e7341..ad11b85 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -108,7 +108,8 @@ bin_PROGRAMS = h5repack$(EXEEXT) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5repack ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 32b6d4c..ff56c9b 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -106,7 +106,8 @@ bin_PROGRAMS = h5stat$(EXEEXT) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/h5stat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index b2afb07..d69d515 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -103,7 +103,8 @@ check_PROGRAMS = $(am__EXEEXT_1) TESTS = $(am__EXEEXT_1) subdir = tools/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 1160938..612e37e 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -107,7 +107,8 @@ bin_PROGRAMS = h5debug$(EXEEXT) h5repart$(EXEEXT) h5mkgrp$(EXEEXT) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) subdir = tools/misc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 24aa8be..69a5b5f 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -111,7 +111,8 @@ check_PROGRAMS = iopipe$(EXEEXT) chunk$(EXEEXT) overhead$(EXEEXT) \ TESTS = $(am__EXEEXT_3) subdir = tools/perform ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -- cgit v0.12 From d29c5a6e6ad8cb50a94e9215d2b2b8682e56818f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 15:16:07 -0500 Subject: [svn-r26052] Fixed false positive tests for intrensic functions. Tested: jam (mpi, gfortran, intel) --enable-fortran, and --enable-fortran --enable-fortran2003 --- configure | 241 ++++++++++++++++++++++++++++-------------------------- configure.ac | 11 ++- m4/aclocal_cxx.m4 | 12 +-- m4/aclocal_fc.m4 | 13 +-- 4 files changed, 144 insertions(+), 133 deletions(-) diff --git a/configure b/configure index 841ae4e..163c2b5 100755 --- a/configure +++ b/configure @@ -1888,6 +1888,52 @@ fi } # ac_fn_c_try_link +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_link + # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -1963,6 +2009,52 @@ fi } # ac_fn_cxx_try_cpp +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2148,98 +2240,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link - # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -5269,7 +5269,11 @@ if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" as_fn_error $? "--enable-fortran must be used with --enable-fortran2003" "$LINENO" 5 else - echo "yes" + if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" + else + echo "no" + fi fi HAVE_SIZEOF="no" @@ -5881,11 +5885,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## 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 - ## Change to the Fortran 90 language ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -6581,6 +6580,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ## -------------------------------------------------------------------- ## See if the fortran compiler supports the intrinsic function "SIZEOF" + HAVE_SIZEOF_FORTRAN="no" { $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; } cat > conftest.$ac_ext <<_ACEOF @@ -6590,7 +6590,7 @@ $as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } END PROGRAM _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_SIZEOF_FORTRAN="yes" @@ -6598,11 +6598,13 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + HAVE_C_SIZEOF_FORTRAN="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } cat > conftest.$ac_ext <<_ACEOF @@ -6615,7 +6617,7 @@ $as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } END PROGRAM _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_C_SIZEOF_FORTRAN="yes" @@ -6623,11 +6625,13 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + HAVE_STORAGE_SIZE_FORTRAN="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 $as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } cat > conftest.$ac_ext <<_ACEOF @@ -6639,7 +6643,7 @@ $as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >& END PROGRAM _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_STORAGE_SIZE_FORTRAN="yes" @@ -6647,13 +6651,15 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. + FORTRAN_DEFAULT_REALisDBLE="no" { $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; } @@ -6700,7 +6706,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $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; } HAVE_FORTRAN_2003="no" - cat > conftest.$ac_ext <<_ACEOF program main @@ -6716,7 +6721,7 @@ $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HD end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_F2003_REQUIREMENTS=yes @@ -6724,7 +6729,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then @@ -7377,7 +7383,7 @@ $as_echo_n "checking if $CXX needs old style header files in includes... " >&6; int main(void) { return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else @@ -7386,7 +7392,8 @@ $as_echo "yes" >&6; } CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # Checking if C++ can handle namespaces @@ -7407,7 +7414,7 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -7416,7 +7423,8 @@ $as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # Checking if C++ has offsetof extension @@ -7456,7 +7464,7 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -7466,7 +7474,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext # if C++ can handle static cast @@ -7485,7 +7494,7 @@ int main(void) { } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -7494,7 +7503,8 @@ $as_echo "no" >&6; } CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext else @@ -7561,7 +7571,6 @@ done fi - ## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before ## the AM_PROG_LIBTOOL macro. diff --git a/configure.ac b/configure.ac index 393b194..cd4fa9e 100644 --- a/configure.ac +++ b/configure.ac @@ -399,7 +399,11 @@ if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then echo "no" AC_MSG_ERROR([--enable-fortran must be used with --enable-fortran2003]) else - echo "yes" + if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" + else + echo "no" + fi fi HAVE_SIZEOF="no" @@ -446,11 +450,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_PROG_FC([PAC_FC_SEARCH_LIST],) AC_F9X_MODS - ## 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 - ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4 index 2068587..f373b51 100644 --- a/m4/aclocal_cxx.m4 +++ b/m4/aclocal_cxx.m4 @@ -25,12 +25,12 @@ dnl Checking if C++ needs old style header files in includes AC_DEFUN([PAC_PROG_CXX_HEADERS],[ AC_MSG_CHECKING([if $CXX needs old style header files in includes]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ #include int main(void) { return 0; } ])], - [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes]) CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"]) @@ -40,7 +40,7 @@ dnl Checking if ++ can handle namespaces AC_DEFUN([PAC_PROG_CXX_NAMESPACE],[ AC_MSG_CHECKING([if $CXX can handle namespaces]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ namespace H5 { int fnord; } @@ -60,7 +60,7 @@ dnl Checking if C++ supports std AC_DEFUN([PAC_PROG_CXX_STD],[ AC_MSG_CHECKING([if $CXX supports std]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ #include using namespace std; @@ -79,7 +79,7 @@ dnl Checking if C++ has offsetof extension AC_DEFUN([PAC_PROG_CXX_OFFSETOF],[ AC_MSG_CHECKING([if $CXX has offsetof extension]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ],[ @@ -102,7 +102,7 @@ dnl Checking if C++ can handle static cast AC_DEFUN([PAC_PROG_CXX_STAIC_CAST],[ AC_MSG_CHECKING([if $CXX can handle static cast]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ int main(void) { float test_float; int test_int; diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index ec638a3..72b0d64 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -60,8 +60,9 @@ dnl dnl See if the fortran compiler supports the intrinsic function "SIZEOF" AC_DEFUN([PAC_PROG_FC_SIZEOF],[ + HAVE_SIZEOF_FORTRAN="no" AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ PROGRAM main i = sizeof(x) END PROGRAM @@ -73,8 +74,9 @@ AC_DEFUN([PAC_PROG_FC_SIZEOF],[ dnl See if the fortran compiler supports the intrinsic function "C_SIZEOF" AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[ + HAVE_C_SIZEOF_FORTRAN="no" AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ PROGRAM main USE ISO_C_BINDING INTEGER(C_INT) :: a @@ -89,8 +91,9 @@ AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[ dnl See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[ + HAVE_STORAGE_SIZE_FORTRAN="no" AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AC_LINK_IFELSE([AC_LANG_SOURCE([ PROGRAM main INTEGER :: a INTEGER :: result @@ -106,6 +109,7 @@ dnl Check to see if -r8 was specified to determine if we need to dnl compile the DOUBLE PRECISION interfaces. AC_DEFUN([PAC_PROG_FC_DEFAULT_REALisDBLE],[ + FORTRAN_DEFAULT_REALisDBLE="no" AC_MSG_CHECKING([if Fortran default REAL is DOUBLE PRECISION]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -140,8 +144,7 @@ dnl disable Fortran 2003 if it does not. AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) HAVE_FORTRAN_2003="no" - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ USE iso_c_binding IMPLICIT NONE -- cgit v0.12 From f1da79edff7e770eb65a6d25560b7f4378a3e284 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 15:20:26 -0500 Subject: [svn-r26053] Added comments. --- m4/aclocal_cxx.m4 | 4 ++++ m4/aclocal_fc.m4 | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4 index f373b51..0ea10b6 100644 --- a/m4/aclocal_cxx.m4 +++ b/m4/aclocal_cxx.m4 @@ -20,6 +20,10 @@ dnl ********************************* dnl PURPOSE dnl Contains Macros for HDF5 C++ dnl ********************************* +dnl +dnl Special characteristics that have no autoconf counterpart but that +dnl we need as part of the C++ support. To distinquish these, they +dnl have a [PAC] prefix. dnl Checking if C++ needs old style header files in includes diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 72b0d64..7e909ba 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -21,6 +21,12 @@ dnl PURPOSE dnl Contains Macros for HDF5 Fortran dnl ********************************* dnl +dnl Special characteristics that have no autoconf counterpart but that +dnl we need as part of the C++ support. To distinquish these, they +dnl have a [PAC] prefix. +dnl +dnl ------------------------------------------------------------------------- +dnl dnl PAC_FC_SEARCH_LIST - expands to a whitespace separated list of modern dnl fortran compilers for use with AC_PROG_FC that is more suitable for HPC dnl software packages -- cgit v0.12 From b2516b909a2b3c425ce1f602bfe841ac0b8efccd Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 15:30:29 -0500 Subject: [svn-r26054] Fix for: HDFFV-9089 375::Compile the Fortran 77/90/95 interface -> remove 77 from comment Removed from comment. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cd4fa9e..d2d2b71 100644 --- a/configure.ac +++ b/configure.ac @@ -372,7 +372,7 @@ AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES="" AC_MSG_CHECKING([if Fortran interface enabled]) AC_ARG_ENABLE([fortran], [AS_HELP_STRING([--enable-fortran], - [Compile the Fortran 77/90/95 interface [default=no]])], + [Compile the Fortran 90/95 interface [default=no]])], [HDF_FORTRAN=$enableval]) if test "X$HDF_FORTRAN" = "Xyes"; then -- cgit v0.12 From 4a10dbe01136ec99ff776a3ba677db959a465924 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Tue, 27 Jan 2015 15:59:48 -0500 Subject: [svn-r26055] Updates for: Discuss and Remove Infering parallel compilers (C and Fortran) from configure.ac https://jira.hdfgroup.uiuc.edu/browse/HDFFV-9068 Remove restriction to build shared with parallel https://jira.hdfgroup.uiuc.edu/browse/HDFFV-9069 Cleanup parallel sections in configure.ac https://jira.hdfgroup.uiuc.edu/browse/HDFFV-9096 tested h5committest --- configure | 525 +++--------------------------------------------------- configure.ac | 216 ++-------------------- src/H5config.h.in | 9 - 3 files changed, 44 insertions(+), 706 deletions(-) diff --git a/configure b/configure index 163c2b5..fc945d0 100755 --- a/configure +++ b/configure @@ -1577,7 +1577,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-unsupported Allow unsupported combinations of configure options - --enable-fortran Compile the Fortran 77/90/95 interface [default=no] + --enable-fortran Compile the Fortran 90/95 interface [default=no] --enable-fortran2003 Compile the Fortran 2003 interface, must also specify --enable-fortran [default=no] --enable-cxx Compile the C++ interface [default=no] @@ -7744,16 +7744,14 @@ fi ## 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 +## 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. +## we're building a parallel version of the library. ## -## RUNSERIAL -- This is a command which will be prepended to +## 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 @@ -7779,146 +7777,6 @@ fi ## ---------------------------------------------------------------------- -## 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) - ## 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; } - - ## 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 - for path in `echo $PATH | ${TR} ":" " "`; do - if test -x $path/$cmd; then - break - fi - done - fi - - ## 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}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpiexec -n \$\${NPROCS:=6}" - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - fi - ;; - - mpcc|mpcc_r) - ## 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 - ## 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 - - - case "$FC" in - *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; } - - ## 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 - for path in `echo $PATH | ${TR} ":" " "`; do - if test -x $path/$cmd; then - break; - fi - done - fi - - ## 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}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpiexec -n \$\${NPROCS:=6}" - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - fi - ;; - - *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - ## 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 - - ## 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' -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' - enable_shared="no" -elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - echo ' shared libraries explicitly enabled by user' -elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then - echo ' shared libraries disabled when a parallel compiler is being used' - enable_shared="no" -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). ## @@ -28022,10 +27880,7 @@ 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. +## CPPFLAGS and LDFLAGS or are known to the compiler. ## # Check whether --enable-parallel was given. if test "${enable_parallel+set}" = set; then : @@ -28050,26 +27905,11 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then 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 - fi - if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then - as_fn_error $? "An MPI compiler is being used; --enable-threadsafe is not allowed. Use --enable-unsupported to override this error." "$LINENO" 5 - fi -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for parallel support files" >&5 $as_echo_n "checking for parallel support files... " >&6; } case "X-$enable_parallel" in X-|X-no|X-none) - ## 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). + ## We are not compiling for parallel. { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 $as_echo "skipped" >&6; } ;; @@ -28081,185 +27921,12 @@ $as_echo "skipped" >&6; } $as_echo "provided by compiler" >&6; } PARALLEL=yes - ## Try link a simple MPI program. If fail, try again with -lmpi and - ## -lmpich. + ## Try link a simple MPI program. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO C program can be linked" >&5 +$as_echo_n "checking whether a simple MPI-IO C program can be linked... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -MPI_Init() - ; - return 0; -} -_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_n "checking for MPI_Init in -lmpi... " >&6; } -if ${ac_cv_lib_mpi_MPI_Init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return MPI_Init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpi_MPI_Init=yes -else - ac_cv_lib_mpi_MPI_Init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPI 1 -_ACEOF - - LIBS="-lmpi $LIBS" - -else - { $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 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return MPI_Init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpich_MPI_Init=yes -else - ac_cv_lib_mpich_MPI_Init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPICH 1 -_ACEOF - - LIBS="-lmpich $LIBS" - -else - PARALLEL=no -fi - -fi - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - ## 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. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -MPI_File_open() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_File_open in -lmpio" >&5 -$as_echo_n "checking for MPI_File_open in -lmpio... " >&6; } -if ${ac_cv_lib_mpio_MPI_File_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpio $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_File_open (); +#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -28271,37 +27938,22 @@ char MPI_File_open (); int main () { -return MPI_File_open (); + MPI_Init(0, (void *)0); + MPI_File_open(0, (void *)0, 0, 0, (void *)0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpio_MPI_File_open=yes -else - ac_cv_lib_mpio_MPI_File_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpio_MPI_File_open" >&5 -$as_echo "$ac_cv_lib_mpio_MPI_File_open" >&6; } -if test "x$ac_cv_lib_mpio_MPI_File_open" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPIO 1 -_ACEOF - - LIBS="-lmpio $LIBS" - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - PARALLEL=no -fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi if test "X$HDF_FORTRAN" = "Xyes"; then ## Change to the Fortran 90 language @@ -28311,7 +27963,9 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ## Try link a simple MPI program. If fail, try again with -lmpi. + ## Try link a simple MPI program. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO Fortran program can be linked" >&5 +$as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main @@ -28321,98 +27975,15 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpi" >&5 -$as_echo_n "checking for mpi_file_open in -lmpi... " >&6; } -if ${ac_cv_lib_mpi_mpi_file_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" -cat > conftest.$ac_ext <<_ACEOF - program main - call mpi_file_open - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - ac_cv_lib_mpi_mpi_file_open=yes -else - ac_cv_lib_mpi_mpi_file_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_mpi_file_open" >&5 -$as_echo "$ac_cv_lib_mpi_mpi_file_open" >&6; } -if test "x$ac_cv_lib_mpi_mpi_file_open" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPI 1 -_ACEOF - - LIBS="-lmpi $LIBS" - -else - PARALLEL=no -fi - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - ## 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 - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpio" >&5 -$as_echo_n "checking for mpi_file_open in -lmpio... " >&6; } -if ${ac_cv_lib_mpio_mpi_file_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpio $LIBS" -cat > conftest.$ac_ext <<_ACEOF - program main - call mpi_file_open - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - ac_cv_lib_mpio_mpi_file_open=yes -else - ac_cv_lib_mpio_mpi_file_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpio_mpi_file_open" >&5 -$as_echo "$ac_cv_lib_mpio_mpi_file_open" >&6; } -if test "x$ac_cv_lib_mpio_mpi_file_open" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPIO 1 -_ACEOF - - LIBS="-lmpio $LIBS" - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - PARALLEL=no -fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "unable to link a simple MPI-IO Fortran program" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi ## Change to the C language ac_ext=c @@ -28424,19 +27995,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ## 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; - fi - done - fi - - ## Set RUNPARALLEL to mpiexec if not set yet. if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" fi @@ -28473,39 +28031,6 @@ $as_echo_n "checking prefix for running in parallel... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNPARALLEL" >&5 $as_echo "$RUNPARALLEL" >&6; } - ## 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. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -MPI_Init(); MPI_File_open(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $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 -$as_echo "no" >&6; } - as_fn_error $? "unable to link a simple MPI-IO application" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ## There *must* be some way to run in parallel even if it's just the ## word `none'. if test -z "$RUNPARALLEL"; then diff --git a/configure.ac b/configure.ac index d2d2b71..0bdeafd 100644 --- a/configure.ac +++ b/configure.ac @@ -608,16 +608,14 @@ fi ## 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 +## 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. +## we're building a parallel version of the library. ## -## RUNSERIAL -- This is a command which will be prepended to +## 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 @@ -643,131 +641,6 @@ AC_SUBST([RUNPARALLEL]) AC_SUBST([TESTPARALLEL]) ## ---------------------------------------------------------------------- -## 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) - ## The mpich compiler. Use mpiexec from the same directory if it - ## exists. - PARALLEL=mpicc - AC_MSG_CHECKING([for mpiexec]) - - ## 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 - for path in `echo $PATH | ${TR} ":" " "`; do - if test -x $path/$cmd; then - break - fi - done - fi - - ## Is there an mpiexec at that path? - if test -x $path/mpiexec; then - AC_MSG_RESULT([$path/mpiexec]) - RUNSERIAL="${RUNSERIAL:-none}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpiexec -n \$\${NPROCS:=6}" - fi - else - AC_MSG_RESULT([none]) - fi - ;; - - mpcc|mpcc_r) - ## 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 - ## Change to the Fortran 90 language - AC_LANG_PUSH(Fortran) - - case "$FC" in - *mpif90*) - ## The Fortran mpich compiler. Use mpiexec from the same directory - ## if it exists. - PARALLEL=mpif90 - AC_MSG_CHECKING([for mpiexec]) - - ## 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 - for path in `echo $PATH | ${TR} ":" " "`; do - if test -x $path/$cmd; then - break; - fi - done - fi - - ## Is there an mpiexec at that path? - if test -x $path/mpiexec; then - AC_MSG_RESULT([$path/mpiexec]) - RUNSERIAL="${RUNSERIAL:-none}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpiexec -n \$\${NPROCS:=6}" - fi - else - AC_MSG_RESULT([none]) - fi - ;; - - *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - ## 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 - - ## Change to the C language - AC_LANG_POP(Fortran) -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' - enable_shared="no" -elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - echo ' shared libraries explicitly enabled by user' -elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then - echo ' shared libraries disabled when a parallel compiler is being used' - enable_shared="no" -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). ## @@ -2471,10 +2344,7 @@ AC_CACHE_SAVE ## 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. +## CPPFLAGS and LDFLAGS or are known to the compiler. ## AC_ARG_ENABLE([parallel], [AS_HELP_STRING([--enable-parallel], @@ -2497,25 +2367,10 @@ if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then 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 - AC_MSG_ERROR([An MPI compiler is being used; --enable-cxx is not allowed. Use --enable-unsupported to override this error.]) - fi - if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then - AC_MSG_ERROR([An MPI compiler is being used; --enable-threadsafe is not allowed. Use --enable-unsupported to override this error.]) - fi -fi - AC_MSG_CHECKING([for parallel support files]) case "X-$enable_parallel" in X-|X-no|X-none) - ## 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). + ## We are not compiling for parallel. AC_MSG_RESULT([skipped]) ;; @@ -2525,62 +2380,36 @@ case "X-$enable_parallel" in AC_MSG_RESULT([provided by compiler]) PARALLEL=yes - ## 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])])]) - - ## 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 + ## Try link a simple MPI program. + AC_MSG_CHECKING([whether a simple MPI-IO C program can be linked]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[ MPI_Init(0, (void *)0); + MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) if test "X$HDF_FORTRAN" = "Xyes"; then ## Change to the Fortran 90 language AC_LANG_PUSH(Fortran) - ## Try link a simple MPI program. If fail, try again with -lmpi. + ## Try link a simple MPI program. + AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) AC_LINK_IFELSE([ program main include 'mpif.h' integer:: ierr call mpi_file_open( ierr ) - end],, - [AC_CHECK_LIB([mpi], [mpi_file_open],, [PARALLEL=no])]) - - ## 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 - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) - end],, - [AC_CHECK_LIB([mpio], [mpi_file_open],, [PARALLEL=no])]) - fi + end], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])]) ## Change to the C language AC_LANG_POP(Fortran) fi ## 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; - fi - done - fi - - ## Set RUNPARALLEL to mpiexec if not set yet. if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" fi @@ -2610,13 +2439,6 @@ if test -n "$PARALLEL"; then AC_MSG_CHECKING([prefix for running in parallel]) AC_MSG_RESULT([$RUNPARALLEL]) - ## 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])]) - ## There *must* be some way to run in parallel even if it's just the ## word `none'. if test -z "$RUNPARALLEL"; then diff --git a/src/H5config.h.in b/src/H5config.h.in index eca8583..ee798f1 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -205,15 +205,6 @@ /* Define to 1 if you have the `mpe' library (-lmpe). */ #undef HAVE_LIBMPE -/* Define to 1 if you have the `mpi' library (-lmpi). */ -#undef HAVE_LIBMPI - -/* Define to 1 if you have the `mpich' library (-lmpich). */ -#undef HAVE_LIBMPICH - -/* Define to 1 if you have the `mpio' library (-lmpio). */ -#undef HAVE_LIBMPIO - /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL -- cgit v0.12 From 06587c6e91e234229d2c00274aae9312df282d3f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 16:24:31 -0500 Subject: [svn-r26057] Fix for: HDFFV-9094 change include 'mpif.h' to module in tests Solution: changed to 'USE mpi' and moved the tests to m4/aclocal_fc.m4 Tested: jam (mpicc, mpif90) --- configure | 6 +++--- configure.ac | 18 +----------------- m4/aclocal_fc.m4 | 27 +++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/configure b/configure index fc945d0..5215dcf 100755 --- a/configure +++ b/configure @@ -27956,14 +27956,14 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "X$HDF_FORTRAN" = "Xyes"; then - ## 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 - ## Try link a simple MPI program. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO Fortran program can be linked" >&5 $as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " >&6; } cat > conftest.$ac_ext <<_ACEOF @@ -27985,13 +27985,13 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - ## 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' ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi ## Set RUNPARALLEL to mpiexec if not set yet. diff --git a/configure.ac b/configure.ac index 0bdeafd..088ced8 100644 --- a/configure.ac +++ b/configure.ac @@ -2390,23 +2390,7 @@ case "X-$enable_parallel" in AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) if test "X$HDF_FORTRAN" = "Xyes"; then - ## Change to the Fortran 90 language - AC_LANG_PUSH(Fortran) - - ## Try link a simple MPI program. - AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) - AC_LINK_IFELSE([ - program main - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) - end], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])]) - - ## Change to the C language - AC_LANG_POP(Fortran) + PAC_PROG_FC_MPI_CHECK fi ## Set RUNPARALLEL to mpiexec if not set yet. diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 7e909ba..04bcf5f 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -249,3 +249,30 @@ rm -rf conftest* AC_LANG_POP(Fortran) ]) +dnl ---------------------- +dnl Parallel Test Programs +dnl ---------------------- + +dnl Try link a simple MPI program. + +AC_DEFUN([PAC_PROG_FC_MPI_CHECK],[ + +dnl Change to the Fortran 90 language + AC_LANG_PUSH(Fortran) + +dnl Try link a simple MPI program. + AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) + AC_LINK_IFELSE([ + PROGRAM main + USE mpi + INTEGER :: ierr + call mpi_file_open( ierr ) + END], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])]) + +dnl Change to the C language + AC_LANG_POP(Fortran) +]) + -- cgit v0.12 From f142970ac2f2908408f2452eb067b6f3abc0d65a Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 16:35:30 -0500 Subject: [svn-r26059] Fix for: HDFFV-9095 4159:: Check if Fortran's default real is double precision. If it is and HL is being built then configure should fail due to bug HDFFV-889. Fix: This check should be located where HL is check for, and it is. Updated the comment to elimenate confusion. --- configure | 12 ++++++------ configure.ac | 2 +- m4/aclocal_fc.m4 | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 5215dcf..75e320a 100755 --- a/configure +++ b/configure @@ -27967,12 +27967,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO Fortran program can be linked" >&5 $as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " >&6; } cat > conftest.$ac_ext <<_ACEOF - - program main - include 'mpif.h' - integer:: ierr +make + PROGRAM main + USE mpi + INTEGER :: ierr call mpi_file_open( ierr ) - end + END _ACEOF if ac_fn_fc_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -30301,7 +30301,7 @@ if test "X$HDF5_HL" = "Xyes"; then $as_echo "#define INCLUDE_HL 1" >>confdefs.h -## Check if Fortran's default real is double precision. If it is and HL is being built then configure +## If Fortran's default real is double precision and HL is being built then configure ## should fail due to bug HDFFV-889. if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then as_fn_error $? "Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 088ced8..ce82c0f 100644 --- a/configure.ac +++ b/configure.ac @@ -3786,7 +3786,7 @@ if test "X$HDF5_HL" = "Xyes"; then AC_DEFINE([INCLUDE_HL], [1], [Define if HDF5's high-level library headers should be included in hdf5.h]) -## Check if Fortran's default real is double precision. If it is and HL is being built then configure +## If Fortran's default real is double precision and HL is being built then configure ## should fail due to bug HDFFV-889. if test "X$FORTRAN_DEFAULT_REALisDBLE" = "Xyes"; then AC_MSG_ERROR([Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use configure option --disable-hl.]) diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 04bcf5f..a8d839a 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -262,7 +262,7 @@ dnl Change to the Fortran 90 language dnl Try link a simple MPI program. AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) - AC_LINK_IFELSE([ + AC_LINK_IFELSE([make PROGRAM main USE mpi INTEGER :: ierr -- cgit v0.12 From 7046addd0b4099531dd7ea9eb756899a826e394d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 27 Jan 2015 16:52:53 -0500 Subject: [svn-r26060] Fix for HDFFV-9091 405-408::fortran vars should be scoped Scoped: HAVE_SIZEOF HAVE_C_SIZEOF HAVE_STORAGE_SIZE FORTRAN_DEFAULT_REALisDBLE to where the tests are (in m4/aclocal_fc.m4) Tested: jam (gnu) --- configure | 12 +----------- configure.ac | 11 ----------- m4/aclocal_fc.m4 | 4 ++++ 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/configure b/configure index 75e320a..eedab02 100755 --- a/configure +++ b/configure @@ -5276,11 +5276,6 @@ else fi fi -HAVE_SIZEOF="no" -HAVE_C_SIZEOF="no" -HAVE_STORAGE_SIZE="no" -FORTRAN_DEFAULT_REALisDBLE="no" - if test "X$HDF_FORTRAN" = "Xyes"; then HDF_FORTRAN=yes @@ -5289,12 +5284,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then HDF5_INTERFACES="$HDF5_INTERFACES fortran" ## -------------------------------------------------------------------- - ## Default for FORTRAN 2003 compliant compilers - ## - HAVE_FORTRAN_2003="no" - HAVE_F2003_REQUIREMENTS="no" - - ## -------------------------------------------------------------------- ## HDF5 integer variables for the H5fortran_types.f90 file. ## @@ -6706,6 +6695,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $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; } HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" cat > conftest.$ac_ext <<_ACEOF program main diff --git a/configure.ac b/configure.ac index ce82c0f..0e95920 100644 --- a/configure.ac +++ b/configure.ac @@ -406,11 +406,6 @@ else fi fi -HAVE_SIZEOF="no" -HAVE_C_SIZEOF="no" -HAVE_STORAGE_SIZE="no" -FORTRAN_DEFAULT_REALisDBLE="no" - if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([FC]) HDF_FORTRAN=yes @@ -419,12 +414,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then HDF5_INTERFACES="$HDF5_INTERFACES fortran" ## -------------------------------------------------------------------- - ## Default for FORTRAN 2003 compliant compilers - ## - HAVE_FORTRAN_2003="no" - HAVE_F2003_REQUIREMENTS="no" - - ## -------------------------------------------------------------------- ## HDF5 integer variables for the H5fortran_types.f90 file. ## AC_SUBST([R_LARGE]) diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index a8d839a..435aad5 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -149,7 +149,11 @@ dnl disable Fortran 2003 if it does not. AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[ AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF]) +dnl -------------------------------------------------------------------- +dnl Default for FORTRAN 2003 compliant compilers +dnl HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ USE iso_c_binding -- cgit v0.12 From bc0d6a1500b81d847ec2cc4d91b83b64063db221 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 28 Jan 2015 08:54:23 -0500 Subject: [svn-r26061] Fixed unintentional typo. --- configure | 4 ++-- m4/aclocal_fc.m4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index eedab02..f56da49 100755 --- a/configure +++ b/configure @@ -27957,11 +27957,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO Fortran program can be linked" >&5 $as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " >&6; } cat > conftest.$ac_ext <<_ACEOF -make + PROGRAM main USE mpi INTEGER :: ierr - call mpi_file_open( ierr ) + CALL mpi_file_open( ierr ) END _ACEOF if ac_fn_fc_try_link "$LINENO"; then : diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 435aad5..806d9c5 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -266,11 +266,11 @@ dnl Change to the Fortran 90 language dnl Try link a simple MPI program. AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) - AC_LINK_IFELSE([make + AC_LINK_IFELSE([ PROGRAM main USE mpi INTEGER :: ierr - call mpi_file_open( ierr ) + CALL mpi_file_open( ierr ) END], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) -- cgit v0.12 From 052638dbc8e010f500c83074b7237ea150ab8262 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 28 Jan 2015 10:01:23 -0500 Subject: [svn-r26062] Changed the fortran test back from "USE mpi" to "include "mpif.h"". Using the module causes problems on the Cray (hopper). --- configure | 2 +- m4/aclocal_fc.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f56da49..5fddb6f 100755 --- a/configure +++ b/configure @@ -27959,7 +27959,7 @@ $as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " cat > conftest.$ac_ext <<_ACEOF PROGRAM main - USE mpi + include "mpif.h" INTEGER :: ierr CALL mpi_file_open( ierr ) END diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 806d9c5..64c115a 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -268,7 +268,7 @@ dnl Try link a simple MPI program. AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) AC_LINK_IFELSE([ PROGRAM main - USE mpi + include "mpif.h" INTEGER :: ierr CALL mpi_file_open( ierr ) END], -- cgit v0.12 From cc7cdaac59364de441582ac2f208fa7bf4ecc198 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 28 Jan 2015 10:37:01 -0500 Subject: [svn-r26063] Fixed the wrong number of arguments being used for MPI_FILE_OPEN. Kept using include "mpif.h" since it is not going to be depriciated. But 'USE mpi' will work now that the API is correct. --- configure | 7 ++++--- m4/aclocal_fc.m4 | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 5fddb6f..a4952a2 100755 --- a/configure +++ b/configure @@ -27959,9 +27959,10 @@ $as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " cat > conftest.$ac_ext <<_ACEOF PROGRAM main - include "mpif.h" - INTEGER :: ierr - CALL mpi_file_open( ierr ) + include 'mpif.h' + INTEGER :: comm, amode, info, fh, ierror + CHARACTER(LEN=1) :: filename + CALL MPI_File_open( comm, filename, amode, info, fh, ierror) END _ACEOF if ac_fn_fc_try_link "$LINENO"; then : diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 64c115a..b5e5cfa 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -268,9 +268,10 @@ dnl Try link a simple MPI program. AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked]) AC_LINK_IFELSE([ PROGRAM main - include "mpif.h" - INTEGER :: ierr - CALL mpi_file_open( ierr ) + include 'mpif.h' + INTEGER :: comm, amode, info, fh, ierror + CHARACTER(LEN=1) :: filename + CALL MPI_File_open( comm, filename, amode, info, fh, ierror) END], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) -- cgit v0.12 From 45aece24343e9b254ffd7fe5c2e26acdfeecb000 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 08:19:22 -0500 Subject: [svn-r26069] Removed the option to selectively disable internal filters like n-bit at compile time. Fixes HDFFV-9086 Tested on: jam, both serial and parallel w/ fortran & C++ --- Makefile.in | 5 - c++/Makefile.in | 5 - c++/examples/Makefile.in | 5 - c++/src/Makefile.in | 5 - c++/test/Makefile.in | 5 - config/cmake/H5pubconf.h.in | 12 -- configure | 82 --------- configure.ac | 67 ------- examples/Makefile.in | 5 - fortran/Makefile.in | 5 - fortran/examples/Makefile.in | 5 - fortran/src/Makefile.in | 5 - fortran/test/Makefile.in | 5 - fortran/testpar/Makefile.in | 5 - hl/Makefile.in | 5 - hl/c++/Makefile.in | 5 - hl/c++/examples/Makefile.in | 5 - hl/c++/src/Makefile.in | 5 - hl/c++/test/Makefile.in | 5 - hl/examples/Makefile.in | 5 - hl/fortran/Makefile.in | 5 - hl/fortran/examples/Makefile.in | 5 - hl/fortran/src/Makefile.in | 5 - hl/fortran/test/Makefile.in | 5 - hl/src/Makefile.in | 5 - hl/test/Makefile.in | 5 - hl/tools/Makefile.in | 5 - hl/tools/gif2h5/Makefile.in | 5 - src/H5Z.c | 33 ++-- src/H5Zfletcher32.c | 3 - src/H5Znbit.c | 4 +- src/H5Zpkg.h | 55 +++--- src/H5Zscaleoffset.c | 3 - src/H5Zshuffle.c | 3 - src/H5config.h.in | 12 -- src/Makefile.in | 5 - test/Makefile.in | 5 - test/cross_read.c | 90 --------- test/dsets.c | 364 ++++--------------------------------- test/gen_cross.c | 84 +-------- test/gen_filters.c | 4 - testpar/Makefile.in | 5 - testpar/t_dset.c | 32 ++-- testpar/t_filter_read.c | 25 +-- tools/Makefile.in | 5 - tools/h5copy/Makefile.in | 5 - tools/h5diff/Makefile.in | 5 - tools/h5dump/Makefile.in | 5 - tools/h5dump/h5dumpgentest.c | 18 +- tools/h5dump/testh5dump.sh.in | 6 +- tools/h5dump/testh5dumppbits.sh.in | 4 - tools/h5import/Makefile.in | 5 - tools/h5jam/Makefile.in | 5 - tools/h5jam/testh5jam.sh.in | 2 - tools/h5ls/Makefile.in | 5 - tools/h5repack/Makefile.in | 5 - tools/h5repack/h5repack.sh.in | 94 ++-------- tools/h5repack/h5repacktst.c | 107 ++--------- tools/h5stat/Makefile.in | 5 - tools/h5stat/testh5stat.sh.in | 4 - tools/lib/Makefile.in | 5 - tools/lib/h5tools_filters.c | 32 ---- tools/misc/Makefile.in | 5 - tools/perform/Makefile.in | 5 - vms/src/h5pubconf.h | 12 -- 65 files changed, 132 insertions(+), 1220 deletions(-) diff --git a/Makefile.in b/Makefile.in index 31884e6..298add2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -296,7 +296,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -385,10 +384,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/c++/Makefile.in b/c++/Makefile.in index c409ef1..c1bb42e 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -456,7 +456,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -545,10 +544,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index a7b2a28..db0ea09 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -404,7 +404,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -493,10 +492,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 2532815..688c13f 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -470,7 +470,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -559,10 +558,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index ddbd8e0..837d727 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -461,7 +461,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -550,10 +549,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 05058d2..81b8c9a 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -148,18 +148,6 @@ /* Define if support for deflate (zlib) filter is enabled */ #cmakedefine H5_HAVE_FILTER_DEFLATE @H5_HAVE_FILTER_DEFLATE@ -/* Define if support for Fletcher32 checksum is enabled */ -#cmakedefine H5_HAVE_FILTER_FLETCHER32 @H5_HAVE_FILTER_FLETCHER32@ - -/* Define if support for nbit filter is enabled */ -#cmakedefine H5_HAVE_FILTER_NBIT @H5_HAVE_FILTER_NBIT@ - -/* Define if support for scaleoffset filter is enabled */ -#cmakedefine H5_HAVE_FILTER_SCALEOFFSET @H5_HAVE_FILTER_SCALEOFFSET@ - -/* Define if support for shuffle filter is enabled */ -#cmakedefine H5_HAVE_FILTER_SHUFFLE @H5_HAVE_FILTER_SHUFFLE@ - /* Define if support for szip filter is enabled */ #cmakedefine H5_HAVE_FILTER_SZIP @H5_HAVE_FILTER_SZIP@ diff --git a/configure b/configure index a4952a2..388b932 100755 --- a/configure +++ b/configure @@ -670,11 +670,6 @@ CONFIG_DATE H5_VERSION DIRECT_VFD_CONDITIONAL_FALSE DIRECT_VFD_CONDITIONAL_TRUE -USE_FILTER_SCALEOFFSET -USE_FILTER_NBIT -USE_FILTER_FLETCHER32 -USE_FILTER_SHUFFLE -FILTERS ADD_PARALLEL_FILES USINGMEMCHECKER CLEARFILEBUF @@ -921,7 +916,6 @@ enable_clear_file_buffers enable_using_memchecker enable_parallel with_mpe -enable_filters with_default_vfd enable_direct_vfd with_default_plugindir @@ -1616,9 +1610,6 @@ Optional Features: picky about it's memory operations and also disables the library's free space manager code. Default=no. --enable-parallel Search for MPI-IO and MPI support files - --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. --enable-direct-vfd Build the Direct I/O Virtual File Driver [default=yes] --enable-dconv-exception @@ -28558,79 +28549,6 @@ $as_echo "#define HAVE_MPE 1" >>confdefs.h fi 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" - USE_FILTER_NBIT="no" - USE_FILTER_SCALEOFFSET="no" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for I/O filters" >&5 -$as_echo_n "checking for I/O filters... " >&6; } -# Check whether --enable-filters was given. -if test "${enable_filters+set}" = set; then : - enableval=$enable_filters; FILTERS=$enableval -fi - - -## Eventually: all_filters="shuffle,foo,bar,baz" -all_filters="shuffle,fletcher32,nbit,scaleoffset" -case "X-$FILTERS" in - X-|X-all) - FILTERS=$all_filters - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($FILTERS)" >&5 -$as_echo "all ($FILTERS)" >&6; } - ;; - X-no|X-none) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - FILTERS="none" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILTERS" >&5 -$as_echo "$FILTERS" >&6; } - ;; -esac - -if test -n "$FILTERS"; then - for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do - ## ------------------------------------------------------------------ - ## 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 - - USE_FILTER_SHUFFLE="yes" - fi - if test $filter = "FLETCHER32"; then - -$as_echo "#define HAVE_FILTER_FLETCHER32 1" >>confdefs.h - - USE_FILTER_FLETCHER32="yes" - fi - if test $filter = "NBIT"; then - -$as_echo "#define HAVE_FILTER_NBIT 1" >>confdefs.h - - USE_FILTER_NBIT="yes" - fi - if test $filter = "SCALEOFFSET"; then - -$as_echo "#define HAVE_FILTER_SCALEOFFSET 1" >>confdefs.h - - USE_FILTER_SCALEOFFSET="yes" - fi - done -fi - ## -------------------------------------------------------------------------- ## Should the Default Virtual File Driver be compiled? ## diff --git a/configure.ac b/configure.ac index 0e95920..b45e9d1 100644 --- a/configure.ac +++ b/configure.ac @@ -2527,73 +2527,6 @@ if test -n "$PARALLEL"; then fi 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. -## -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_MSG_CHECKING([for I/O filters]) -AC_ARG_ENABLE([filters], - [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]) - -## Eventually: all_filters="shuffle,foo,bar,baz" -all_filters="shuffle,fletcher32,nbit,scaleoffset" -case "X-$FILTERS" in - X-|X-all) - FILTERS=$all_filters - AC_MSG_RESULT([all ($FILTERS)]) - ;; - X-no|X-none) - AC_MSG_RESULT([none]) - FILTERS="none" - ;; - *) - AC_MSG_RESULT([$FILTERS]) - ;; -esac - -if test -n "$FILTERS"; then - for filter in `echo $FILTERS | tr ${as_cr_letters}',' ${as_cr_LETTERS}' '`; do - ## ------------------------------------------------------------------ - ## 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]) - USE_FILTER_SHUFFLE="yes" - fi - if test $filter = "FLETCHER32"; then - AC_DEFINE([HAVE_FILTER_FLETCHER32], [1], - [Define if support for Fletcher32 checksum is enabled]) - USE_FILTER_FLETCHER32="yes" - fi - if test $filter = "NBIT"; then - AC_DEFINE([HAVE_FILTER_NBIT], [1], - [Define if support for nbit filter is enabled]) - USE_FILTER_NBIT="yes" - fi - if test $filter = "SCALEOFFSET"; then - AC_DEFINE([HAVE_FILTER_SCALEOFFSET], [1], - [Define if support for scaleoffset filter is enabled]) - USE_FILTER_SCALEOFFSET="yes" - fi - done -fi - ## -------------------------------------------------------------------------- ## Should the Default Virtual File Driver be compiled? ## diff --git a/examples/Makefile.in b/examples/Makefile.in index 1a53108..98f56b7 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -404,7 +404,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -493,10 +492,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 9dfbd0b..45933e9 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -460,7 +460,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -549,10 +548,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index a42e5d8..ac0af6b 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -412,7 +412,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -501,10 +500,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index bf56554..50134b7 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -521,7 +521,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -610,10 +609,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 936ac67..720c3ed 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -530,7 +530,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -619,10 +618,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 558bc00..1e0b3d9 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -456,7 +456,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -545,10 +544,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 8950717..4d3aa8b 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -460,7 +460,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -549,10 +548,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index f48852c..7904534 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -456,7 +456,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -545,10 +544,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index fbd94ae..d46512c 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -403,7 +403,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -492,10 +491,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index b5b49e8..76589e7 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -462,7 +462,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -551,10 +550,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index c410e07..7e1fcf8 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -459,7 +459,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -548,10 +547,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 8023d4f..1f0d7ef 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -403,7 +403,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -492,10 +491,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index d25ab46..1b4e2b1 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -460,7 +460,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -549,10 +548,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index afb0e1a..6b7e61d 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -403,7 +403,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -492,10 +491,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 134048b..686a405 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -477,7 +477,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -566,10 +565,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index f7d1f6f..56e8052 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -468,7 +468,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -557,10 +556,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 1a3e124..92c4f3b 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -458,7 +458,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -547,10 +546,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index a08c7c2..e738ff9 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -495,7 +495,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -584,10 +583,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index f2ea28d..590a05b 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -457,7 +457,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -546,10 +545,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 5ef6003..f78b9ea 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -471,7 +471,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -560,10 +559,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/src/H5Z.c b/src/H5Z.c index 8a3315e..5dca3b4 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -93,35 +93,28 @@ H5Z_init_interface (void) FUNC_ENTER_NOAPI_NOINIT + /* Internal filters */ + if (H5Z_register (H5Z_SHUFFLE)<0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter") + if (H5Z_register (H5Z_FLETCHER32)<0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter") + if (H5Z_register (H5Z_NBIT)<0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter") + if (H5Z_register (H5Z_SCALEOFFSET)<0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter") + + /* External filters */ #ifdef H5_HAVE_FILTER_DEFLATE if (H5Z_register (H5Z_DEFLATE)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter") + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter") #endif /* H5_HAVE_FILTER_DEFLATE */ -#ifdef H5_HAVE_FILTER_SHUFFLE - if (H5Z_register (H5Z_SHUFFLE)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter") -#endif /* H5_HAVE_FILTER_SHUFFLE */ -#ifdef H5_HAVE_FILTER_FLETCHER32 - if (H5Z_register (H5Z_FLETCHER32)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter") -#endif /* H5_HAVE_FILTER_FLETCHER32 */ #ifdef H5_HAVE_FILTER_SZIP H5Z_SZIP->encoder_present = SZ_encoder_enabled(); if (H5Z_register (H5Z_SZIP)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter") + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter") #endif /* H5_HAVE_FILTER_SZIP */ -#ifdef H5_HAVE_FILTER_NBIT - if (H5Z_register (H5Z_NBIT)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter") -#endif /* H5_HAVE_FILTER_NBIT */ -#ifdef H5_HAVE_FILTER_SCALEOFFSET - if (H5Z_register (H5Z_SCALEOFFSET)<0) - HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter") -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ -#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT | defined H5_HAVE_FILTER_SCALEOFFSET) done: -#endif /* (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT | defined H5_HAVE_FILTER_SCALEOFFSET) */ FUNC_LEAVE_NOAPI(ret_value) } diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c index 8d2643d..7f67015 100644 --- a/src/H5Zfletcher32.c +++ b/src/H5Zfletcher32.c @@ -27,8 +27,6 @@ #include "H5MMprivate.h" /* Memory management */ #include "H5Zpkg.h" /* Data filters */ -#ifdef H5_HAVE_FILTER_FLETCHER32 - /* Local function prototypes */ static size_t H5Z_filter_fletcher32 (unsigned flags, size_t cd_nelmts, const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf); @@ -164,5 +162,4 @@ done: H5MM_xfree(outbuf); FUNC_LEAVE_NOAPI(ret_value) } -#endif /* H5_HAVE_FILTER_FLETCHER32 */ diff --git a/src/H5Znbit.c b/src/H5Znbit.c index ebb534b..9506ace 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -25,8 +25,6 @@ #include "H5Tprivate.h" /* Datatypes */ #include "H5Zpkg.h" /* Data filters */ -#ifdef H5_HAVE_FILTER_NBIT - /* Struct of parameters needed for compressing/decompressing * one nbit atomic datatype: integer or floating-point */ @@ -1424,4 +1422,4 @@ static void H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned c * the last byte, increment the value by 1. */ *buffer_size = new_size + 1; } -#endif /* H5_HAVE_FILTER_NBIT */ + diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h index b0df856..e2cec89 100644 --- a/src/H5Zpkg.h +++ b/src/H5Zpkg.h @@ -23,48 +23,35 @@ /* Include private header file */ #include "H5Zprivate.h" /* Filter functions */ +/********************/ +/* Internal filters */ +/********************/ -#ifdef H5_HAVE_FILTER_DEFLATE -/* - * Deflate filter - */ -H5_DLLVAR const H5Z_class2_t H5Z_DEFLATE[1]; -#endif /* H5_HAVE_FILTER_DEFLATE */ - -#ifdef H5_HAVE_FILTER_SHUFFLE -/* - * Shuffle filter - */ +/* Shuffle filter */ H5_DLLVAR const H5Z_class2_t H5Z_SHUFFLE[1]; -#endif /* H5_HAVE_FILTER_SHUFFLE */ -#ifdef H5_HAVE_FILTER_FLETCHER32 -/* - * Fletcher32 filter - */ +/* Fletcher32 filter */ H5_DLLVAR const H5Z_class2_t H5Z_FLETCHER32[1]; -#endif /* H5_HAVE_FILTER_FLETCHER32 */ -#ifdef H5_HAVE_FILTER_SZIP -/* - * szip filter - */ -H5_DLLVAR H5Z_class2_t H5Z_SZIP[1]; -#endif /* H5_HAVE_FILTER_SZIP */ - -#ifdef H5_HAVE_FILTER_NBIT -/* - * nbit filter - */ +/* n-bit filter */ H5_DLLVAR H5Z_class2_t H5Z_NBIT[1]; -#endif /* H5_HAVE_FILTER_NBIT */ -#ifdef H5_HAVE_FILTER_SCALEOFFSET -/* - * scaleoffset filter - */ +/* Scale/offset filter */ H5_DLLVAR H5Z_class2_t H5Z_SCALEOFFSET[1]; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ + +/********************/ +/* External filters */ +/********************/ + +/* Deflate filter */ +#ifdef H5_HAVE_FILTER_DEFLATE +H5_DLLVAR const H5Z_class2_t H5Z_DEFLATE[1]; +#endif /* H5_HAVE_FILTER_DEFLATE */ + +/* szip filter */ +#ifdef H5_HAVE_FILTER_SZIP +H5_DLLVAR H5Z_class2_t H5Z_SZIP[1]; +#endif /* H5_HAVE_FILTER_SZIP */ #endif /* _H5Zpkg_H */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 83864b9..38e2986 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -26,8 +26,6 @@ #include "H5Tprivate.h" /* Datatypes */ #include "H5Zpkg.h" /* Data filters */ -#ifdef H5_HAVE_FILTER_SCALEOFFSET - /* Struct of parameters needed for compressing/decompressing one atomic datatype */ typedef struct { size_t size; /* datatype size */ @@ -1722,5 +1720,4 @@ H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts, for(i = 0; i < d_nelmts; i++) H5Z_scaleoffset_compress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p); } -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index 4a67839..4138bf1 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -24,8 +24,6 @@ #include "H5Tprivate.h" /* Datatypes */ #include "H5Zpkg.h" /* Data filters */ -#ifdef H5_HAVE_FILTER_SHUFFLE - /* Local function prototypes */ static herr_t H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id); static size_t H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, @@ -291,5 +289,4 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], done: FUNC_LEAVE_NOAPI(ret_value) } -#endif /*H5_HAVE_FILTER_SHUFFLE */ diff --git a/src/H5config.h.in b/src/H5config.h.in index ee798f1..06e58da 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -111,18 +111,6 @@ /* Define if support for deflate (zlib) filter is enabled */ #undef HAVE_FILTER_DEFLATE -/* Define if support for Fletcher32 checksum is enabled */ -#undef HAVE_FILTER_FLETCHER32 - -/* Define if support for nbit filter is enabled */ -#undef HAVE_FILTER_NBIT - -/* Define if support for scaleoffset filter is enabled */ -#undef HAVE_FILTER_SCALEOFFSET - -/* Define if support for shuffle filter is enabled */ -#undef HAVE_FILTER_SHUFFLE - /* Define if support for szip filter is enabled */ #undef HAVE_FILTER_SZIP diff --git a/src/Makefile.in b/src/Makefile.in index 96883f6..c5a1c27 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -520,7 +520,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -609,10 +608,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/test/Makefile.in b/test/Makefile.in index ab8402b..377b514 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -863,7 +863,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -952,10 +951,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/test/cross_read.c b/test/cross_read.c index ba99c9e..2d95d15 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -213,116 +213,46 @@ static int open_dataset(char *fname) nerrors += check_data(DATASETNAME1, file, TRUE); TESTING("dataset of LE FLOAT with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME2, file, TRUE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of BE FLOAT with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME3, file, TRUE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of LE DOUBLE with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME4, file, TRUE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of BE DOUBLE with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME5, file, TRUE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of LE CHAR with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME6, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of BE CHAR with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME7, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of LE SHORT with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME8, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of BE SHORT with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME9, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of LE INT with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME10, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of BE INT with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME11, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of LE LONG LONG with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME12, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of BE LONG LONG with scale-offset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET nerrors += check_data(DATASETNAME13, file, FALSE); -#else /*H5_HAVE_FILTER_SCALEOFFSET*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SCALEOFFSET*/ TESTING("dataset of LE FLOAT with Fletcher32 filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 nerrors += check_data(DATASETNAME14, file, TRUE); -#else /*H5_HAVE_FILTER_FLETCHER32*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_FLETCHER32*/ TESTING("dataset of BE FLOAT with Fletcher32 filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 nerrors += check_data(DATASETNAME15, file, TRUE); -#else /*H5_HAVE_FILTER_FLETCHER32*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_FLETCHER32*/ TESTING("dataset of LE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE @@ -357,36 +287,16 @@ static int open_dataset(char *fname) #endif /*H5_HAVE_FILTER_SZIP*/ TESTING("dataset of LE FLOAT with Shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE nerrors += check_data(DATASETNAME20, file, TRUE); -#else /*H5_HAVE_FILTER_SHUFFLE*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SHUFFLE*/ TESTING("dataset of BE FLOAT with Shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE nerrors += check_data(DATASETNAME21, file, TRUE); -#else /*H5_HAVE_FILTER_SHUFFLE*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_SHUFFLE*/ TESTING("dataset of LE FLOAT with Nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT nerrors += check_data(DATASETNAME22, file, TRUE); -#else /*H5_HAVE_FILTER_NBIT*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_NBIT*/ TESTING("dataset of BE FLOAT with Nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT nerrors += check_data(DATASETNAME23, file, TRUE); -#else /*H5_HAVE_FILTER_NBIT*/ - SKIPPED(); - puts(not_supported); -#endif /*H5_HAVE_FILTER_NBIT*/ if(H5Fclose(file)) TEST_ERROR diff --git a/test/dsets.c b/test/dsets.c index 3055943..c782e70 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -70,19 +70,17 @@ const char *FILENAME[] = { #define DSET_CONV_BUF_NAME "conv_buf" #define DSET_TCONV_NAME "tconv" #define DSET_DEFLATE_NAME "deflate" -#ifdef H5_HAVE_FILTER_SZIP -#define DSET_SZIP_NAME "szip" -#endif /* H5_HAVE_FILTER_SZIP */ #define DSET_SHUFFLE_NAME "shuffle" #define DSET_FLETCHER32_NAME "fletcher32" #define DSET_FLETCHER32_NAME_2 "fletcher32_2" #define DSET_FLETCHER32_NAME_3 "fletcher32_3" #define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32" #define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2" -#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 +#ifdef H5_HAVE_FILTER_SZIP +#define DSET_SZIP_NAME "szip" #define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32" #define DSET_SHUF_SZIP_FLET_NAME_2 "shuffle+szip+fletcher32_2" -#endif /* defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 */ +#endif /* H5_HAVE_FILTER_SZIP */ #define DSET_BOGUS_NAME "bogus" #define DSET_MISSING_NAME "missing" @@ -2006,21 +2004,17 @@ test_get_filter_info(void) /* Verify that each filter is reported as having the right combination * of encoder and decoder. */ -#ifdef H5_HAVE_FILTER_FLETCHER32 if(H5Zget_filter_info(H5Z_FILTER_FLETCHER32, &flags) < 0) TEST_ERROR if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) || ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) TEST_ERROR -#endif -#ifdef H5_HAVE_FILTER_SHUFFLE if(H5Zget_filter_info(H5Z_FILTER_SHUFFLE, &flags) < 0) TEST_ERROR if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) || ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) TEST_ERROR -#endif #ifdef H5_HAVE_FILTER_DEFLATE if(H5Zget_filter_info(H5Z_FILTER_DEFLATE, &flags) < 0) TEST_ERROR @@ -2083,10 +2077,8 @@ UNUSED const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */ hsize_t null_size; /* Size of dataset with null filter */ -#ifdef H5_HAVE_FILTER_FLETCHER32 hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ unsigned data_corrupt[3]; /* position and length of data to be corrupted */ -#endif /* H5_HAVE_FILTER_FLETCHER32 */ #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ @@ -2098,13 +2090,11 @@ UNUSED unsigned szip_pixels_per_block=4; #endif /* H5_HAVE_FILTER_SZIP */ -#ifdef H5_HAVE_FILTER_SHUFFLE hsize_t shuffle_size; /* Size of dataset with shuffle filter */ -#endif /* H5_HAVE_FILTER_SHUFFLE */ -#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 - hsize_t combo_size; /* Size of dataset with shuffle+deflate filter */ -#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ +#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) + hsize_t combo_size; /* Size of dataset with multiple filters */ +#endif /* defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP */ /* test the H5Zget_filter_info function */ if(test_get_filter_info() < 0) goto error; @@ -2128,7 +2118,6 @@ UNUSED * STEP 1: Test Fletcher32 Checksum by itself. *---------------------------------------------------------- */ -#ifdef H5_HAVE_FILTER_FLETCHER32 puts("Testing Fletcher32 checksum(enabled for read)"); if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error; @@ -2169,11 +2158,6 @@ UNUSED /* Clean up objects used for this test */ if(H5Pclose (dc) < 0) goto error; -#else /* H5_HAVE_FILTER_FLETCHER32 */ - TESTING("fletcher32 checksum"); - SKIPPED(); - puts(" Fletcher32 checksum not enabled"); -#endif /* H5_HAVE_FILTER_FLETCHER32 */ /*---------------------------------------------------------- * STEP 2: Test deflation by itself. @@ -2231,7 +2215,6 @@ UNUSED * STEP 4: Test shuffling by itself. *---------------------------------------------------------- */ -#ifdef H5_HAVE_FILTER_SHUFFLE puts("Testing shuffle filter"); if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error; @@ -2246,17 +2229,12 @@ UNUSED /* Clean up objects used for this test */ if(H5Pclose (dc) < 0) goto error; -#else /* H5_HAVE_FILTER_SHUFFLE */ - TESTING("shuffle filter"); - SKIPPED(); - puts(" Shuffle filter not enabled"); -#endif /* H5_HAVE_FILTER_SHUFFLE */ /*---------------------------------------------------------- * STEP 5: Test shuffle + deflate + checksum in any order. *---------------------------------------------------------- */ -#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 +#ifdef H5_HAVE_FILTER_DEFLATE puts("Testing shuffle+deflate+checksum filters(checksum first)"); if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error; @@ -2280,17 +2258,17 @@ UNUSED /* Clean up objects used for this test */ if(H5Pclose (dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("shuffle+deflate+fletcher32 filters"); SKIPPED(); - puts(" Deflate, shuffle, or fletcher32 checksum filter not enabled"); -#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ + puts(" Deflate filter not enabled"); +#endif /* H5_HAVE_FILTER_DEFLATE */ /*---------------------------------------------------------- * STEP 6: Test shuffle + szip + checksum in any order. *---------------------------------------------------------- */ -#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 +#ifdef H5_HAVE_FILTER_SZIP TESTING("shuffle+szip+checksum filters(checksum first, with encoder)"); if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; @@ -2339,11 +2317,11 @@ UNUSED SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("shuffle+szip+fletcher32 filters"); SKIPPED(); - puts(" Szip, shuffle, or fletcher32 checksum filter not enabled"); -#endif /* H5_HAVE_FILTER_SZIP && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ + puts(" szip filter not enabled"); +#endif /* H5_HAVE_FILTER_SZIP */ return 0; error: @@ -2610,20 +2588,15 @@ error: static herr_t test_onebyte_shuffle(hid_t file) { -#ifdef H5_HAVE_FILTER_SHUFFLE hid_t dataset, space,dc; const hsize_t size[2] = {10, 20}; const hsize_t chunk_size[2] = {10, 20}; unsigned char orig_data[10][20]; unsigned char new_data[10][20]; size_t i, j; -#else /* H5_HAVE_FILTER_SHUFFLE */ - const char *not_supported= " Data shuffling is not enabled."; -#endif /* H5_HAVE_FILTER_SHUFFLE */ TESTING("8-bit shuffling (setup)"); -#ifdef H5_HAVE_FILTER_SHUFFLE /* Create the data space */ if((space = H5Screate_simple(2, size, NULL)) < 0) goto error; @@ -2641,10 +2614,6 @@ test_onebyte_shuffle(hid_t file) orig_data[i][j] = (unsigned char)HDrandom(); PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test shuffling by setting up a chunked dataset and writing @@ -2653,16 +2622,11 @@ test_onebyte_shuffle(hid_t file) */ TESTING("8-bit shuffling (write)"); -#ifdef H5_HAVE_FILTER_SHUFFLE if(H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -2670,7 +2634,6 @@ test_onebyte_shuffle(hid_t file) */ TESTING("8-bit shuffling (read)"); -#ifdef H5_HAVE_FILTER_SHUFFLE /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -2697,10 +2660,6 @@ test_onebyte_shuffle(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif return 0; @@ -2726,7 +2685,6 @@ error: static herr_t test_nbit_int(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT hid_t dataset, datatype, mem_datatype, space, dc; hsize_t size[2] = {2, 5}; hsize_t chunk_size[2] = {2,5}; @@ -2735,13 +2693,10 @@ test_nbit_int(hid_t file) unsigned int mask; size_t precision, offset; size_t i, j; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ puts("Testing nbit filter"); TESTING(" nbit int (setup)"); -#ifdef H5_HAVE_FILTER_NBIT + /* Define dataset datatype (integer), and set precision, offset */ datatype = H5Tcopy(H5T_NATIVE_INT); precision = 17; /* precision includes sign bit */ @@ -2779,10 +2734,6 @@ test_nbit_int(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -2791,15 +2742,10 @@ test_nbit_int(hid_t file) */ TESTING(" nbit int (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -2807,7 +2753,6 @@ test_nbit_int(hid_t file) */ TESTING(" nbit int (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -2839,10 +2784,7 @@ test_nbit_int(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -2866,7 +2808,6 @@ error: static herr_t test_nbit_float(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT hid_t dataset, datatype, space, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2, 5}; @@ -2878,12 +2819,9 @@ test_nbit_float(hid_t file) float new_data[2][5]; size_t precision, offset; size_t i, j; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit float (setup)"); -#ifdef H5_HAVE_FILTER_NBIT + /* Define user-defined single-precision floating-point type for dataset */ datatype = H5Tcopy(H5T_IEEE_F32BE); if(H5Tset_fields(datatype, (size_t)26, (size_t)20, (size_t)6, (size_t)7, (size_t)13) < 0) goto error; @@ -2906,10 +2844,6 @@ test_nbit_float(hid_t file) if((dataset = H5Dcreate2(file, DSET_NBIT_FLOAT_NAME, datatype, space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -2918,16 +2852,11 @@ test_nbit_float(hid_t file) */ TESTING(" nbit float (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -2935,7 +2864,6 @@ test_nbit_float(hid_t file) */ TESTING(" nbit float (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -2966,10 +2894,6 @@ test_nbit_float(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif return 0; @@ -2996,7 +2920,6 @@ static herr_t test_nbit_double(hid_t file) { /* assume unsigned int and float has the same number of bytes */ -#ifdef H5_HAVE_FILTER_NBIT hid_t dataset, datatype, space, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2, 5}; @@ -3009,12 +2932,9 @@ test_nbit_double(hid_t file) double new_data[2][5]; size_t precision, offset; size_t i, j; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit double (setup)"); -#ifdef H5_HAVE_FILTER_NBIT + /* Define user-defined doule-precision floating-point type for dataset */ datatype = H5Tcopy(H5T_IEEE_F64BE); if(H5Tset_fields(datatype, (size_t)55, (size_t)46, (size_t)9, (size_t)5, (size_t)41) < 0) goto error; @@ -3038,10 +2958,6 @@ test_nbit_double(hid_t file) space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -3050,15 +2966,10 @@ test_nbit_double(hid_t file) */ TESTING(" nbit double (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -3066,7 +2977,6 @@ test_nbit_double(hid_t file) */ TESTING(" nbit double (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -3097,10 +3007,6 @@ test_nbit_double(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif return 0; @@ -3126,7 +3032,6 @@ error: static herr_t test_nbit_array(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT hid_t dataset, base_datatype, array_datatype, space, dc; hid_t mem_base_datatype, mem_array_datatype; const hsize_t size[2] = {2, 5}; @@ -3136,12 +3041,9 @@ test_nbit_array(hid_t file) unsigned int new_data[2][5][3][2]; size_t precision, offset; size_t i, j, m, n; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit array (setup)"); -#ifdef H5_HAVE_FILTER_NBIT + /* Define dataset array datatype's base datatype and set precision, offset */ base_datatype = H5Tcopy(H5T_NATIVE_UINT); precision = 22; @@ -3181,10 +3083,6 @@ test_nbit_array(hid_t file) orig_data[i][j][m][n] = (unsigned int)(((long long)HDrandom() % (long long)HDpow(2.0, (double)precision)) << offset); PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -3193,16 +3091,11 @@ test_nbit_array(hid_t file) */ TESTING(" nbit array (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, mem_array_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -3210,7 +3103,6 @@ test_nbit_array(hid_t file) */ TESTING(" nbit array (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, mem_array_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -3244,10 +3136,7 @@ test_nbit_array(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: @@ -3272,7 +3161,6 @@ error: static herr_t test_nbit_compound(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT typedef struct { /* Struct with atomic fields */ int i; char c; @@ -3294,12 +3182,9 @@ test_nbit_compound(hid_t file) unsigned int i_mask, s_mask, c_mask; size_t i, j; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit compound (setup)"); -#ifdef H5_HAVE_FILTER_NBIT + /* Define datatypes of members of compound datatype */ i_tid=H5Tcopy(H5T_NATIVE_INT); c_tid=H5Tcopy(H5T_NATIVE_CHAR); @@ -3370,10 +3255,6 @@ test_nbit_compound(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -3382,15 +3263,10 @@ test_nbit_compound(hid_t file) */ TESTING(" nbit compound (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, mem_cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -3398,7 +3274,6 @@ test_nbit_compound(hid_t file) */ TESTING(" nbit compound (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, mem_cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -3440,10 +3315,7 @@ test_nbit_compound(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: @@ -3468,7 +3340,6 @@ error: static herr_t test_nbit_compound_2(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT typedef struct { /* Struct with atomic fields */ int i; char c; @@ -3505,12 +3376,9 @@ test_nbit_compound_2(hid_t file) unsigned int i_mask, s_mask, c_mask, b_mask; size_t i, j, m, n, b_failed, d_failed; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit compound complex (setup)"); -#ifdef H5_HAVE_FILTER_NBIT + /* Define datatypes of members of compound datatype */ i_tid=H5Tcopy(H5T_NATIVE_INT); c_tid=H5Tcopy(H5T_NATIVE_CHAR); @@ -3626,10 +3494,6 @@ test_nbit_compound_2(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -3638,15 +3502,10 @@ test_nbit_compound_2(hid_t file) */ TESTING(" nbit compound complex (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, mem_cmpd_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -3654,7 +3513,6 @@ test_nbit_compound_2(hid_t file) */ TESTING(" nbit compound complex (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, mem_cmpd_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -3738,10 +3596,7 @@ test_nbit_compound_2(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: @@ -3766,7 +3621,6 @@ error: static herr_t test_nbit_compound_3(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT typedef struct { /* Struct with some no-op type fields */ int i; /* integer field, NOT a no-op type */ char str[30]; /* fixed-length string, no-op type */ @@ -3784,12 +3638,8 @@ test_nbit_compound_3(hid_t file) atomic new_data[5]; size_t i, k, j; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit compound with no-op type (setup)"); -#ifdef H5_HAVE_FILTER_NBIT /* Define datatypes of members of compound datatype */ i_tid=H5Tcopy(H5T_NATIVE_INT); @@ -3849,10 +3699,6 @@ test_nbit_compound_3(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test nbit by setting up a chunked dataset and writing @@ -3861,15 +3707,10 @@ test_nbit_compound_3(hid_t file) */ TESTING(" nbit compound with no-op type (write)"); -#ifdef H5_HAVE_FILTER_NBIT if(H5Dwrite(dataset, cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -3877,7 +3718,6 @@ test_nbit_compound_3(hid_t file) */ TESTING(" nbit compound with no-op type (read)"); -#ifdef H5_HAVE_FILTER_NBIT /* Read the dataset back */ if(H5Dread(dataset, cmpd_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) @@ -3934,10 +3774,7 @@ test_nbit_compound_3(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: @@ -3962,19 +3799,14 @@ error: static herr_t test_nbit_int_size(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT hid_t dataspace, dataset, datatype, mem_datatype, dset_create_props; hsize_t dims[2], chunk_size[2]; hsize_t dset_size = 0; int orig_data[DSET_DIM1][DSET_DIM2]; int i, j; size_t precision, offset; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit integer dataset size"); -#ifdef H5_HAVE_FILTER_NBIT /* Define dataset datatype (integer), and set precision, offset */ if((datatype = H5Tcopy(H5T_NATIVE_INT)) < 0) { @@ -4107,10 +3939,6 @@ test_nbit_int_size(hid_t file) H5Pclose (dset_create_props); PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif return 0; error: @@ -4136,7 +3964,6 @@ error: static herr_t test_nbit_flt_size(hid_t file) { -#ifdef H5_HAVE_FILTER_NBIT hid_t dataspace, dataset, datatype, dset_create_props; hsize_t dims[2], chunk_size[2]; hsize_t dset_size = 0; @@ -4144,12 +3971,8 @@ test_nbit_flt_size(hid_t file) int i, j; size_t precision, offset; size_t spos, epos, esize, mpos, msize; -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= " Nbit is not enabled."; -#endif /* H5_HAVE_FILTER_NBIT */ TESTING(" nbit floating-number dataset size"); -#ifdef H5_HAVE_FILTER_NBIT /* Define floating-point type for dataset *------------------------------------------------------------------- @@ -4313,10 +4136,6 @@ test_nbit_flt_size(hid_t file) H5Pclose (dset_create_props); PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif return 0; error: @@ -4341,20 +4160,16 @@ error: static herr_t test_scaleoffset_int(hid_t file) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset, datatype, space, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2,5}; int orig_data[2][5]; int new_data[2][5]; size_t i, j; -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= " Scaleoffset is not enabled."; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ puts("Testing scaleoffset filter"); TESTING(" scaleoffset int without fill value (setup)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET + datatype = H5Tcopy(H5T_NATIVE_INT); /* Set order of dataset datatype */ @@ -4388,10 +4203,6 @@ test_scaleoffset_int(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test scaleoffset by setting up a chunked dataset and writing @@ -4400,14 +4211,9 @@ test_scaleoffset_int(hid_t file) */ TESTING(" scaleoffset int without fill value (write)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -4415,7 +4221,6 @@ test_scaleoffset_int(hid_t file) */ TESTING(" scaleoffset int without fill value (read)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) goto error; @@ -4442,10 +4247,7 @@ test_scaleoffset_int(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -4470,7 +4272,6 @@ error: static herr_t test_scaleoffset_int_2(hid_t file) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset, datatype, space, mspace, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2,5}; @@ -4482,12 +4283,9 @@ test_scaleoffset_int_2(hid_t file) hsize_t block[2]; /* Block sizes */ int fillval; size_t j; -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= " Scaleoffset is not enabled."; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ TESTING(" scaleoffset int with fill value (setup)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET + datatype = H5Tcopy(H5T_NATIVE_INT); /* Set order of dataset datatype */ @@ -4534,10 +4332,6 @@ test_scaleoffset_int_2(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test scaleoffset by setting up a chunked dataset and writing @@ -4546,15 +4340,10 @@ test_scaleoffset_int_2(hid_t file) */ TESTING(" scaleoffset int with fill value (write)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* only data in the hyperslab will be written, other value should be fill value */ if(H5Dwrite(dataset, H5T_NATIVE_INT, mspace, mspace, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -4562,7 +4351,6 @@ test_scaleoffset_int_2(hid_t file) */ TESTING(" scaleoffset int with fill value (read)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_INT, mspace, mspace, H5P_DEFAULT, new_data) < 0) goto error; @@ -4587,10 +4375,7 @@ test_scaleoffset_int_2(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -4615,19 +4400,15 @@ error: static herr_t test_scaleoffset_float(hid_t file) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset, datatype, space, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2,5}; float orig_data[2][5]; float new_data[2][5]; size_t i, j; -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= " Scaleoffset is not enabled."; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ TESTING(" scaleoffset float without fill value, D-scaling (setup)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET + datatype = H5Tcopy(H5T_NATIVE_FLOAT); /* Set order of dataset datatype */ @@ -4663,10 +4444,6 @@ test_scaleoffset_float(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test scaleoffset by setting up a chunked dataset and writing @@ -4675,14 +4452,9 @@ test_scaleoffset_float(hid_t file) */ TESTING(" scaleoffset float without fill value, D-scaling (write)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -4690,7 +4462,6 @@ test_scaleoffset_float(hid_t file) */ TESTING(" scaleoffset float without fill value, D-scaling (read)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) goto error; @@ -4717,10 +4488,7 @@ test_scaleoffset_float(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -4745,7 +4513,6 @@ error: static herr_t test_scaleoffset_float_2(hid_t file) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset, datatype, space, mspace, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2,5}; @@ -4757,12 +4524,9 @@ test_scaleoffset_float_2(hid_t file) hsize_t count[2]; /* Block count */ hsize_t block[2]; /* Block sizes */ size_t j; -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= " Scaleoffset is not enabled."; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ TESTING(" scaleoffset float with fill value, D-scaling (setup)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET + datatype = H5Tcopy(H5T_NATIVE_FLOAT); /* Set order of dataset datatype */ @@ -4811,10 +4575,6 @@ test_scaleoffset_float_2(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test scaleoffset by setting up a chunked dataset and writing @@ -4823,15 +4583,10 @@ test_scaleoffset_float_2(hid_t file) */ TESTING(" scaleoffset float with fill value, D-scaling (write)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* only data in the hyperslab will be written, other value should be fill value */ if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, mspace, mspace, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -4839,7 +4594,6 @@ test_scaleoffset_float_2(hid_t file) */ TESTING(" scaleoffset float with fill value, D-scaling (read)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_FLOAT, mspace, mspace, H5P_DEFAULT, new_data) < 0) goto error; @@ -4863,10 +4617,7 @@ test_scaleoffset_float_2(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -4891,19 +4642,15 @@ error: static herr_t test_scaleoffset_double(hid_t file) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset, datatype, space, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2,5}; double orig_data[2][5]; double new_data[2][5]; size_t i, j; -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= " Scaleoffset is not enabled."; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ TESTING(" scaleoffset double without fill value, D-scaling (setup)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET + datatype = H5Tcopy(H5T_NATIVE_DOUBLE); /* Set order of dataset datatype */ @@ -4939,10 +4686,6 @@ test_scaleoffset_double(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test scaleoffset by setting up a chunked dataset and writing @@ -4951,14 +4694,9 @@ test_scaleoffset_double(hid_t file) */ TESTING(" scaleoffset double without fill value, D-scaling (write)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if(H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -4966,7 +4704,6 @@ test_scaleoffset_double(hid_t file) */ TESTING(" scaleoffset double without fill value, D-scaling (read)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0) goto error; @@ -4993,10 +4730,7 @@ test_scaleoffset_double(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -5021,7 +4755,6 @@ error: static herr_t test_scaleoffset_double_2(hid_t file) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset, datatype, space, mspace, dc; const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2,5}; @@ -5033,12 +4766,9 @@ test_scaleoffset_double_2(hid_t file) hsize_t count[2]; /* Block count */ hsize_t block[2]; /* Block sizes */ size_t j; -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= " Scaleoffset is not enabled."; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ TESTING(" scaleoffset double with fill value, D-scaling (setup)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET + datatype = H5Tcopy(H5T_NATIVE_DOUBLE); /* Set order of dataset datatype */ @@ -5087,10 +4817,6 @@ test_scaleoffset_double_2(hid_t file) } PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 1: Test scaleoffset by setting up a chunked dataset and writing @@ -5099,15 +4825,10 @@ test_scaleoffset_double_2(hid_t file) */ TESTING(" scaleoffset double with fill value, D-scaling (write)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* only data in the hyperslab will be written, other value should be fill value */ if(H5Dwrite(dataset, H5T_NATIVE_DOUBLE, mspace, mspace, H5P_DEFAULT, orig_data) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif /*---------------------------------------------------------------------- * STEP 2: Try to read the data we just wrote. @@ -5115,7 +4836,6 @@ test_scaleoffset_double_2(hid_t file) */ TESTING(" scaleoffset double with fill value, D-scaling (read)"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET /* Read the dataset back */ if(H5Dread(dataset, H5T_NATIVE_DOUBLE, mspace, mspace, H5P_DEFAULT, new_data) < 0) goto error; @@ -5140,10 +4860,7 @@ test_scaleoffset_double_2(hid_t file) if(H5Dclose(dataset) < 0) goto error; PASSED(); -#else - SKIPPED(); - puts(not_supported); -#endif + return 0; error: return -1; @@ -6371,7 +6088,7 @@ test_filter_delete(hid_t file) TESTING("filter deletion"); -#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 +#ifdef H5_HAVE_FILTER_DEFLATE /* create the data space */ if((sid = H5Screate_simple(2, dims, NULL)) < 0) goto error; @@ -6576,7 +6293,6 @@ test_filters_endianess(void) TESTING("filters with big-endian/little-endian data"); -#if defined H5_HAVE_FILTER_FLETCHER32 /*------------------------------------------------------------------------- * step 1: open a file written on a little-endian machine *------------------------------------------------------------------------- @@ -6609,9 +6325,7 @@ test_filters_endianess(void) if(H5Fclose(fid) < 0) FAIL_STACK_ERROR PASSED(); -#else - SKIPPED(); -#endif + return 0; error: diff --git a/test/gen_cross.c b/test/gen_cross.c index 3b0a56f..1c73016 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -175,7 +175,6 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid) return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -183,7 +182,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -205,7 +203,6 @@ error: int create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ @@ -267,15 +264,8 @@ create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ - return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -283,7 +273,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -305,7 +294,6 @@ error: int create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset; /* dataset handles */ hid_t dcpl; double data[NX][NY]; /* data to write */ @@ -367,15 +355,8 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ - return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -383,7 +364,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -405,7 +385,6 @@ error: int create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset; /* dataset handles */ hid_t dcpl; char data[NX][NY]; /* data to write */ @@ -475,15 +454,8 @@ create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ - return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -491,7 +463,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -513,7 +484,6 @@ error: int create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset; /* dataset handles */ hid_t dcpl; short data[NX][NY]; /* data to write */ @@ -583,15 +553,8 @@ create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ - return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -599,7 +562,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -621,7 +583,6 @@ error: int create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset; /* dataset handles */ hid_t dcpl; int data[NX][NY]; /* data to write */ @@ -691,15 +652,8 @@ create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ - return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -707,7 +661,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -730,7 +683,6 @@ error: int create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SCALEOFFSET hid_t dataset; /* dataset handles */ hid_t dcpl; long long data[NX][NY]; /* data to write */ @@ -800,15 +752,8 @@ create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SCALEOFFSET */ - const char *not_supported= "Scaleoffset filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ - return 0; -#ifdef H5_HAVE_FILTER_SCALEOFFSET error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -816,7 +761,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SCALEOFFSET */ } @@ -838,7 +782,6 @@ error: int create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_FLETCHER32 hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ @@ -900,15 +843,8 @@ create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_FLETCHER32 */ - const char *not_supported= "Fletcher filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_FLETCHER32 */ - return 0; -#ifdef H5_HAVE_FILTER_FLETCHER32 error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -916,7 +852,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_FLETCHER32 */ } @@ -1131,7 +1066,6 @@ error: int create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_SHUFFLE hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ @@ -1193,15 +1127,8 @@ create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_SHUFFLE */ - const char *not_supported= "Shuffle filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_SHUFFLE */ - return 0; -#ifdef H5_HAVE_FILTER_SHUFFLE error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -1209,7 +1136,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_SHUFFLE */ } @@ -1231,7 +1157,6 @@ error: int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { -#ifdef H5_HAVE_FILTER_NBIT hid_t dataset; /* dataset handles */ hid_t datatype; hid_t dcpl; @@ -1314,15 +1239,8 @@ create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if(H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_NBIT */ - const char *not_supported= "Nbit filter is not enabled. Can't create the dataset."; - - puts(not_supported); -#endif /* H5_HAVE_FILTER_NBIT */ - return 0; -#ifdef H5_HAVE_FILTER_NBIT error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -1330,7 +1248,6 @@ error: } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_NBIT */ } @@ -1451,3 +1368,4 @@ main (void) return 0; } + diff --git a/test/gen_filters.c b/test/gen_filters.c index 58400d5..b44339d 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -48,7 +48,6 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, static herr_t test_filters_endianess(void) { -#if defined H5_HAVE_FILTER_FLETCHER32 hid_t fid = -1; /* file ID */ hid_t dsid = -1; /* dataset ID */ hid_t sid = -1; /* dataspace ID */ @@ -85,10 +84,8 @@ test_filters_endianess(void) if(H5Sclose(sid) < 0) goto error; if(H5Fclose(fid) < 0) goto error; -#endif /* H5_HAVE_FILTER_FLETCHER32 */ return 0; -#if defined H5_HAVE_FILTER_FLETCHER32 error: H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -97,7 +94,6 @@ error: H5Fclose(fid); } H5E_END_TRY; return -1; -#endif /* H5_HAVE_FILTER_FLETCHER32 */ } /* end test_filters_endianess() */ /* This message derives from H5Z */ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index bf135b5..f585002 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -477,7 +477,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -566,10 +565,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/testpar/t_dset.c b/testpar/t_dset.c index e27cddc..c8e8532 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -2502,8 +2502,6 @@ extend_readAll(void) * Example of using the parallel HDF5 library to read a compressed * dataset in an HDF5 file with collective parallel access support. */ - -#ifdef H5_HAVE_FILTER_DEFLATE void compress_readAll(void) { @@ -2657,7 +2655,6 @@ compress_readAll(void) if(data_read) HDfree(data_read); if(data_orig) HDfree(data_orig); } -#endif /* H5_HAVE_FILTER_DEFLATE */ /* * Part 4--Non-selection for chunked dataset @@ -3451,7 +3448,6 @@ actual_io_mode_tests(void) { #define DSET_NOCOLCAUSE "nocolcause" #define NELM 2 #define FILE_EXTERNAL "nocolcause_extern.data" -#undef H5_HAVE_FILTER_FLETCHER32 static void test_no_collective_cause_mode(int selection_mode) { @@ -3487,9 +3483,9 @@ test_no_collective_cause_mode(int selection_mode) hid_t file_space = -1; hsize_t chunk_dims[RANK]; herr_t ret; -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ H5Z_filter_t filter_info; -#endif +#endif /* LATER */ /* set to global value as default */ int l_facc_type = facc_type; char message[256]; @@ -3521,7 +3517,7 @@ test_no_collective_cause_mode(int selection_mode) is_chunked = 0; } -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ if (selection_mode & TEST_FILTERS) { ret = H5Zfilter_avail(H5Z_FILTER_FLETCHER32); VRFY ((ret >=0 ), "Fletcher32 filter is available.\n"); @@ -3532,7 +3528,7 @@ test_no_collective_cause_mode(int selection_mode) ret = H5Pset_fletcher32(dcpl); VRFY((ret >= 0),"set filter (flecher32) succeeded"); } -#endif /* H5_HAVE_FILTER_FLETCHER32 */ +#endif /* LATER */ if (selection_mode & TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES) { sid = H5Screate(H5S_NULL); @@ -3613,13 +3609,13 @@ test_no_collective_cause_mode(int selection_mode) no_collective_cause_global_expected |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET; } -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ if (selection_mode & TEST_FILTERS) { test_name = "Broken Collective I/O - Filter is required"; no_collective_cause_local_expected |= H5D_MPIO_FILTERS; no_collective_cause_global_expected |= H5D_MPIO_FILTERS; } -#endif /* H5_HAVE_FILTER_FLETCHER32 */ +#endif /* LATER */ if (selection_mode & TEST_COLLECTIVE) { test_name = "Broken Collective I/O - Not Broken"; @@ -3808,9 +3804,9 @@ test_no_collective_cause_mode_filter(int selection_mode) hid_t file_space = -1; hsize_t chunk_dims[RANK]; herr_t ret; -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ H5Z_filter_t filter_info; -#endif +#endif /* LATER */ char message[256]; /* Set up MPI parameters */ @@ -3829,7 +3825,7 @@ test_no_collective_cause_mode_filter(int selection_mode) VRFY((dcpl >= 0), "dataset creation plist created successfully"); if (selection_mode == TEST_FILTERS_READ ) { -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ ret = H5Zfilter_avail(H5Z_FILTER_FLETCHER32); VRFY ((ret >=0 ), "Fletcher32 filter is available.\n"); @@ -3838,7 +3834,7 @@ test_no_collective_cause_mode_filter(int selection_mode) ret = H5Pset_fletcher32(dcpl); VRFY((ret >= 0),"set filter (flecher32) succeeded"); -#endif /* H5_HAVE_FILTER_FLETCHER32 */ +#endif /* LATER */ } else { VRFY(0, "Unexpected mode, only test for TEST_FILTERS_READ."); @@ -3876,12 +3872,12 @@ test_no_collective_cause_mode_filter(int selection_mode) dcpl, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dcreate2() dataset succeeded"); -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ /* Set expected cause */ test_name = "Broken Collective I/O - Filter is required"; no_collective_cause_local_expected = H5D_MPIO_FILTERS; no_collective_cause_global_expected = H5D_MPIO_FILTERS; -#endif +#endif /* LATER */ /* Get the file dataspace */ file_space = H5Dget_space(dataset); @@ -4010,13 +4006,13 @@ no_collective_cause_tests(void) test_no_collective_cause_mode (TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES); test_no_collective_cause_mode (TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT); test_no_collective_cause_mode (TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL); -#ifdef H5_HAVE_FILTER_FLETCHER32 +#ifdef LATER /* fletcher32 */ /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and * H5Dwrite is ready for mpio + filter feature. */ /* test_no_collective_cause_mode (TEST_FILTERS); */ test_no_collective_cause_mode_filter (TEST_FILTERS_READ); -#endif +#endif /* LATER */ /* * Test combined causes diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 7e782ce..5e1cd04 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -215,9 +215,7 @@ test_filter_read(void) hsize_t null_size; /* Size of dataset without filters */ herr_t hrc; const char *filename; -#ifdef H5_HAVE_FILTER_FLETCHER32 hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ -#endif /* H5_HAVE_FILTER_FLETCHER32 */ #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ @@ -229,13 +227,11 @@ test_filter_read(void) unsigned szip_pixels_per_block=4; #endif /* H5_HAVE_FILTER_SZIP */ -#ifdef H5_HAVE_FILTER_SHUFFLE hsize_t shuffle_size; /* Size of dataset with shuffle filter */ -#endif /* H5_HAVE_FILTER_SHUFFLE */ -#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 - hsize_t combo_size; /* Size of dataset with shuffle+deflate filter */ -#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ +#if(defined H5_HAVE_FILTER_DEFLATE || defined H5_HAVE_FILTER_SZIP) + hsize_t combo_size; /* Size of dataset with multiple filters */ +#endif /* H5_HAVE_FILTER_DEFLATE || H5_HAVE_FILTER_SZIP */ filename = GetTestParameters(); @@ -262,7 +258,6 @@ test_filter_read(void) * STEP 1: Test Fletcher32 Checksum by itself. *---------------------------------------------------------- */ -#ifdef H5_HAVE_FILTER_FLETCHER32 dc = H5Pcreate(H5P_DATASET_CREATE); VRFY(dc>=0,"H5Pset_filter"); @@ -280,7 +275,6 @@ test_filter_read(void) hrc = H5Pclose (dc); VRFY(hrc>=0, "H5Pclose"); -#endif /* H5_HAVE_FILTER_FLETCHER32 */ /*---------------------------------------------------------- * STEP 2: Test deflation by itself. @@ -305,6 +299,7 @@ test_filter_read(void) #endif /* H5_HAVE_FILTER_DEFLATE */ + /*---------------------------------------------------------- * STEP 3: Test szip compression by itself. *---------------------------------------------------------- @@ -328,11 +323,12 @@ test_filter_read(void) } #endif /* H5_HAVE_FILTER_SZIP */ + /*---------------------------------------------------------- * STEP 4: Test shuffling by itself. *---------------------------------------------------------- */ -#ifdef H5_HAVE_FILTER_SHUFFLE + dc = H5Pcreate(H5P_DATASET_CREATE); VRFY(dc>=0, "H5Pcreate"); @@ -349,13 +345,12 @@ test_filter_read(void) hrc = H5Pclose (dc); VRFY(hrc>=0, "H5Pclose"); -#endif /* H5_HAVE_FILTER_SHUFFLE */ /*---------------------------------------------------------- * STEP 5: Test shuffle + deflate + checksum in any order. *---------------------------------------------------------- */ -#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 +#ifdef H5_HAVE_FILTER_DEFLATE /* Testing shuffle+deflate+checksum filters (checksum first) */ dc = H5Pcreate(H5P_DATASET_CREATE); VRFY(dc>=0, "H5Pcreate"); @@ -400,13 +395,13 @@ test_filter_read(void) hrc = H5Pclose (dc); VRFY(hrc>=0, "H5Pclose"); -#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ +#endif /* H5_HAVE_FILTER_DEFLATE */ /*---------------------------------------------------------- * STEP 6: Test shuffle + szip + checksum in any order. *---------------------------------------------------------- */ -#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 +#ifdef H5_HAVE_FILTER_SZIP /* Testing shuffle+szip(with encoder)+checksum filters(checksum first) */ dc = H5Pcreate(H5P_DATASET_CREATE); @@ -458,6 +453,6 @@ test_filter_read(void) VRFY(hrc>=0, "H5Pclose"); } -#endif /* H5_HAVE_FILTER_SZIP && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */ +#endif /* H5_HAVE_FILTER_SZIP */ } diff --git a/tools/Makefile.in b/tools/Makefile.in index 82aabdf..84fdd0e 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -457,7 +457,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -546,10 +545,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 06ed9de..12ff6fa 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -465,7 +465,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -554,10 +553,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 230518f..453703c 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -472,7 +472,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -561,10 +560,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index f887f1a..a8be644 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -471,7 +471,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -560,10 +559,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 82273a3..36c9642 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -5433,7 +5433,7 @@ static void gent_filters(void) * shuffle *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_SHUFFLE) + /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); HDassert(ret >= 0); @@ -5444,14 +5444,13 @@ static void gent_filters(void) ret=make_dset(fid,"shuffle",sid,H5T_NATIVE_INT,dcpl,buf1); HDassert(ret >= 0); -#endif /*------------------------------------------------------------------------- * checksum *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_FLETCHER32) + /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); HDassert(ret >= 0); @@ -5462,13 +5461,12 @@ static void gent_filters(void) ret=make_dset(fid,"fletcher32",sid,H5T_NATIVE_INT,dcpl,buf1); HDassert(ret >= 0); -#endif /*------------------------------------------------------------------------- * nbit *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_NBIT) + /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); HDassert(ret >= 0); @@ -5481,13 +5479,12 @@ static void gent_filters(void) H5Tset_precision(tid,H5Tget_size(tid)-1); ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1); HDassert(ret >= 0); -#endif /*------------------------------------------------------------------------- * scaleoffset *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_SCALEOFFSET) + /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); HDassert(ret >= 0); @@ -5498,7 +5495,6 @@ static void gent_filters(void) ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1); HDassert(ret >= 0); -#endif /*------------------------------------------------------------------------- * all filters @@ -5508,11 +5504,9 @@ static void gent_filters(void) ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL); HDassert(ret >= 0); -#if defined (H5_HAVE_FILTER_SHUFFLE) /* set the shuffle filter */ ret = H5Pset_shuffle(dcpl); HDassert(ret >= 0); -#endif #ifdef H5_HAVE_FILTER_SZIP if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { @@ -5529,17 +5523,13 @@ static void gent_filters(void) HDassert(ret >= 0); #endif -#if defined (H5_HAVE_FILTER_FLETCHER32) /* set the checksum filter */ ret = H5Pset_fletcher32(dcpl); HDassert(ret >= 0); -#endif -#if defined (H5_HAVE_FILTER_NBIT) /* set the nbit filter */ ret = H5Pset_nbit(dcpl); HDassert(ret >= 0); -#endif ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1); HDassert(ret >= 0); diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 0c72a8d..36f12a0 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -19,10 +19,6 @@ srcdir=@srcdir@ USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" -USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" -USE_FILTER_NBIT="@USE_FILTER_NBIT@" -USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" TESTNAME=h5dump EXIT_SUCCESS=0 @@ -1184,7 +1180,7 @@ TOOLTEST tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5 # user defined TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5 -if test $USE_FILTER_DEFLATE = "yes" -a $USE_FILTER_SHUFFLE = "yes" -a $USE_FILTER_FLETCHER32 = "yes" -a $USE_FILTER_NBIT = "yes" -a $USE_FILTER_SCALEOFFSET = "yes" ; then +if test $USE_FILTER_DEFLATE = "yes" ; then # data read internal filters TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5 if test $USE_FILTER_SZIP = "yes"; then diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in index 0f6503d..6556ff5 100644 --- a/tools/h5dump/testh5dumppbits.sh.in +++ b/tools/h5dump/testh5dumppbits.sh.in @@ -20,10 +20,6 @@ srcdir=@srcdir@ # Determine which filters are available USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" -USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" -USE_FILTER_NBIT="@USE_FILTER_NBIT@" -USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" TESTNAME=h5dump EXIT_SUCCESS=0 diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index aac2308..7189e2e 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -465,7 +465,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -554,10 +553,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index b2ee809..4497f6b 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -477,7 +477,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -566,10 +565,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in index 36f0657..1664d6b 100644 --- a/tools/h5jam/testh5jam.sh.in +++ b/tools/h5jam/testh5jam.sh.in @@ -20,8 +20,6 @@ srcdir=@srcdir@ # Determine which filters are available USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" -USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" TESTNAME=h5jam/h5unjam EXIT_SUCCESS=0 diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 4d96b19..1ea0295c 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -457,7 +457,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -546,10 +545,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index ad11b85..e6fba6e 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -489,7 +489,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -578,10 +577,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index a4d12bd..e3bb939 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -24,10 +24,6 @@ srcdir=@srcdir@ USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" -USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" -USE_FILTER_NBIT="@USE_FILTER_NBIT@" -USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" TESTNAME=h5repack EXIT_SUCCESS=0 @@ -742,40 +738,24 @@ fi # shuffle with individual object arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10" -if test $USE_FILTER_SHUFFLE != "yes" ; then - SKIP $arg -else - TOOLTEST shuffle_individual $arg -fi +TOOLTEST shuffle_individual $arg # shuffle for all arg="h5repack_layout.h5 -f SHUF" -if test $USE_FILTER_SHUFFLE != "yes" ; then - SKIP $arg -else - TOOLTEST shuffle_all $arg -fi +TOOLTEST shuffle_all $arg # fletcher32 with individual object arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10" -if test $USE_FILTER_FLETCHER32 != "yes" ; then - SKIP $arg -else - TOOLTEST fletcher_individual $arg -fi +TOOLTEST fletcher_individual $arg # fletcher32 for all arg="h5repack_layout.h5 -f FLET" -if test $USE_FILTER_FLETCHER32 != "yes" ; then - SKIP $arg -else - TOOLTEST fletcher_all $arg -fi +TOOLTEST fletcher_all $arg # all filters arg="h5repack_layout.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10" -if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then +if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else TOOLTEST all_filters $arg @@ -828,87 +808,47 @@ fi # shuffle copy arg="h5repack_shuffle.h5" -if test $USE_FILTER_SHUFFLE != "yes" ; then - SKIP $arg -else - TOOLTEST shuffle_copy $arg -fi +TOOLTEST shuffle_copy $arg # shuffle remove arg="h5repack_shuffle.h5 -f dset_shuffle:NONE" -if test $USE_FILTER_SHUFFLE != "yes" ; then - SKIP $arg -else - TOOLTEST shuffle_remove $arg -fi +TOOLTEST shuffle_remove $arg # fletcher32 copy arg="h5repack_fletcher.h5" -if test $USE_FILTER_FLETCHER32 != "yes" ; then - SKIP $arg -else - TOOLTEST fletcher_copy $arg -fi +TOOLTEST fletcher_copy $arg # fletcher32 remove arg="h5repack_fletcher.h5 -f dset_fletcher32:NONE" -if test $USE_FILTER_FLETCHER32 != "yes" ; then - SKIP $arg -else - TOOLTEST fletcher_remove $arg -fi +TOOLTEST fletcher_remove $arg # nbit copy arg="h5repack_nbit.h5" -if test $USE_FILTER_NBIT != "yes" ; then - SKIP $arg -else - TOOLTEST nbit_copy $arg -fi +TOOLTEST nbit_copy $arg # nbit remove arg="h5repack_nbit.h5 -f dset_nbit:NONE" -if test $USE_FILTER_NBIT != "yes" ; then - SKIP $arg -else - TOOLTEST nbit_remove $arg -fi +TOOLTEST nbit_remove $arg # nbit add arg="h5repack_nbit.h5 -f dset_int31:NBIT" -if test $USE_FILTER_NBIT != "yes" ; then - SKIP $arg -else - TOOLTEST nbit_add $arg -fi +TOOLTEST nbit_add $arg # scaleoffset copy arg="h5repack_soffset.h5" -if test $USE_FILTER_SCALEOFFSET != "yes" ; then - SKIP $arg -else - TOOLTEST scale_copy $arg -fi +TOOLTEST scale_copy $arg # scaleoffset add arg="h5repack_soffset.h5 -f dset_none:SOFF=31,IN" -if test $USE_FILTER_SCALEOFFSET != "yes" ; then - SKIP $arg -else - TOOLTEST scale_add $arg -fi +TOOLTEST scale_add $arg # scaleoffset remove arg="h5repack_soffset.h5 -f dset_scaleoffset:NONE" -if test $USE_FILTER_SCALEOFFSET != "yes" ; then - SKIP $arg -else - TOOLTEST scale_remove $arg -fi +TOOLTEST scale_remove $arg # remove all filters arg="h5repack_filters.h5 -f NONE" -if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes" ; then +if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" ; then SKIP $arg else TOOLTEST remove_all $arg @@ -1061,7 +1001,7 @@ fi # several global filters arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF" -if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then +if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else TOOLTEST global_filters $arg diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 5ec9a8d..0353955 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -445,8 +445,6 @@ int main (void) TESTING(" addding shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE - /*------------------------------------------------------------------------- * test an individual object option *------------------------------------------------------------------------- @@ -468,9 +466,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif /*------------------------------------------------------------------------- * test all objects option @@ -479,8 +474,6 @@ int main (void) TESTING(" addding shuffle filter to all"); -#ifdef H5_HAVE_FILTER_SHUFFLE - /* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0) GOERROR; @@ -498,13 +491,9 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif - TESTING(" adding checksum filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 + TESTING(" adding checksum filter"); /*------------------------------------------------------------------------- * test an individual object option @@ -527,9 +516,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif /*------------------------------------------------------------------------- * test all objects option @@ -539,8 +525,6 @@ int main (void) TESTING(" adding checksum filter to all"); -#ifdef H5_HAVE_FILTER_FLETCHER32 - if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("FLET",&pack_options) < 0) @@ -557,9 +541,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" filter queue fletcher, shuffle, deflate, szip"); @@ -573,16 +554,10 @@ int main (void) GOERROR; if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0) GOERROR; - -#if defined (H5_HAVE_FILTER_FLETCHER32) if (h5repack_addfilter("dset1:FLET",&pack_options) < 0) GOERROR; -#endif - -#ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0) GOERROR; -#endif #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { @@ -1039,7 +1014,6 @@ int main (void) TESTING(" copy of shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0) @@ -1052,13 +1026,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0) @@ -1073,13 +1044,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" copy of fletcher filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0) @@ -1092,13 +1060,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing fletcher filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0) @@ -1113,14 +1078,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" copy of nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) @@ -1133,13 +1094,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0) @@ -1154,14 +1112,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" adding nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0) @@ -1176,14 +1130,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" copy of scaleoffset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) @@ -1196,13 +1146,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing scaleoffset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0) @@ -1217,14 +1164,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" adding scaleoffset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0) @@ -1239,10 +1182,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif - /*------------------------------------------------------------------------- @@ -1258,9 +1197,7 @@ int main (void) TESTING(" filter conversion from deflate to szip"); -#if defined (H5_HAVE_FILTER_SZIP) \ - && defined (H5_HAVE_FILTER_DEFLATE) \ - && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (szip_can_encode) { /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */ @@ -1287,9 +1224,7 @@ int main (void) TESTING(" filter conversion from szip to deflate"); -#if defined (H5_HAVE_FILTER_SZIP) \ - && defined (H5_HAVE_FILTER_DEFLATE) \ - && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (szip_can_encode) { if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) @@ -1321,8 +1256,7 @@ int main (void) TESTING(" removing all filters"); -#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \ - && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; @@ -2347,13 +2281,12 @@ int make_shuffle(hid_t loc_id) * shuffle *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_SHUFFLE) + /* set the shuffle filter */ if (H5Pset_shuffle(dcpl) < 0) goto out; if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0) goto out; -#endif /*------------------------------------------------------------------------- @@ -2414,7 +2347,7 @@ int make_fletcher32(hid_t loc_id) * fletcher32 *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_FLETCHER32) + /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) goto out; @@ -2423,7 +2356,6 @@ int make_fletcher32(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0) goto out; -#endif /*------------------------------------------------------------------------- * close space and dcpl @@ -2488,7 +2420,6 @@ int make_nbit(hid_t loc_id) goto out; } -#if defined H5_HAVE_FILTER_NBIT /* remove the filters from the dcpl */ if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) { @@ -2522,7 +2453,6 @@ int make_nbit(hid_t loc_id) goto out; } H5Dclose(dsid); -#endif /*------------------------------------------------------------------------- * close @@ -2584,7 +2514,6 @@ int make_scaleoffset(hid_t loc_id) dtid = H5Tcopy(H5T_NATIVE_INT); -#if defined (H5_HAVE_FILTER_SCALEOFFSET) /* remove the filters from the dcpl */ if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) { H5Tclose(dtid); @@ -2613,7 +2542,6 @@ int make_scaleoffset(hid_t loc_id) } H5Tclose(dtid); H5Dclose(dsid); -#endif /*------------------------------------------------------------------------- * close space and dcpl @@ -2647,10 +2575,8 @@ int make_all_filters(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ hid_t sid; /* dataspace ID */ -#if defined (H5_HAVE_FILTER_NBIT) hid_t dtid; hid_t dsid; -#endif /* H5_HAVE_FILTER_NBIT */ #if defined (H5_HAVE_FILTER_SZIP) unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK; unsigned szip_pixels_per_block=8; @@ -2680,17 +2606,13 @@ int make_all_filters(hid_t loc_id) if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0) goto out; -#if defined (H5_HAVE_FILTER_SHUFFLE) /* set the shuffle filter */ if (H5Pset_shuffle(dcpl) < 0) goto out; -#endif -#if defined (H5_HAVE_FILTER_FLETCHER32) /* set the checksum filter */ if (H5Pset_fletcher32(dcpl) < 0) goto out; -#endif #if defined (H5_HAVE_FILTER_SZIP) if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) @@ -2716,7 +2638,6 @@ int make_all_filters(hid_t loc_id) if (make_dset(loc_id,"dset_all",sid,dcpl,buf) < 0) goto out; -#if defined (H5_HAVE_FILTER_FLETCHER32) /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) goto out; @@ -2725,7 +2646,6 @@ int make_all_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0) goto out; -#endif /* Make sure encoding is enabled */ @@ -2747,7 +2667,6 @@ int make_all_filters(hid_t loc_id) #endif -#if defined (H5_HAVE_FILTER_SHUFFLE) /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) goto out; @@ -2756,7 +2675,6 @@ int make_all_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0) goto out; -#endif #if defined (H5_HAVE_FILTER_DEFLATE) @@ -2772,7 +2690,6 @@ int make_all_filters(hid_t loc_id) -#if defined (H5_HAVE_FILTER_NBIT) /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) goto out; @@ -2793,8 +2710,6 @@ int make_all_filters(hid_t loc_id) return -1; if(H5Dclose(dsid) < 0) return -1; -#endif - if(H5Sclose(sid) < 0) goto out; diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index ff56c9b..c992f5c 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -467,7 +467,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -556,10 +555,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index cb0446b..4d698da 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -25,10 +25,6 @@ srcdir=@srcdir@ # Determine which filters are available USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" -USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" -USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" -USE_FILTER_NBIT="@USE_FILTER_NBIT@" -USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" TESTNAME=h5stat EXIT_SUCCESS=0 diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index d69d515..53d437b 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -454,7 +454,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -543,10 +542,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 79cf253..ccdba26 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -107,44 +107,24 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr *------------------------------------------------------------------------- */ case H5Z_FILTER_SHUFFLE: -#ifndef H5_HAVE_FILTER_SHUFFLE - if (name) - print_warning(name,"shuffle"); - return 0; -#endif break; /*------------------------------------------------------------------------- * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC *------------------------------------------------------------------------- */ case H5Z_FILTER_FLETCHER32: -#ifndef H5_HAVE_FILTER_FLETCHER32 - if (name) - print_warning(name,"fletcher32"); - return 0; -#endif break; /*------------------------------------------------------------------------- * H5Z_FILTER_NBIT *------------------------------------------------------------------------- */ case H5Z_FILTER_NBIT: -#ifndef H5_HAVE_FILTER_NBIT - if (name) - print_warning(name,"nbit"); - return 0; -#endif break; /*------------------------------------------------------------------------- * H5Z_FILTER_SCALEOFFSET *------------------------------------------------------------------------- */ case H5Z_FILTER_SCALEOFFSET: -#ifndef H5_HAVE_FILTER_SCALEOFFSET - if (name) - print_warning(name,"scaleoffset"); - return 0; -#endif break; }/*switch*/ }/*for*/ @@ -211,24 +191,12 @@ int h5tools_can_encode(H5Z_filter_t filtn) { #endif break; case H5Z_FILTER_SHUFFLE: -#ifndef H5_HAVE_FILTER_SHUFFLE - return 0; -#endif break; case H5Z_FILTER_FLETCHER32: -#ifndef H5_HAVE_FILTER_FLETCHER32 - return 0; -#endif break; case H5Z_FILTER_NBIT: -#ifndef H5_HAVE_FILTER_NBIT - return 0; -#endif break; case H5Z_FILTER_SCALEOFFSET: -#ifndef H5_HAVE_FILTER_SCALEOFFSET - return 0; -#endif break; }/*switch*/ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 612e37e..774f2c9 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -492,7 +492,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -581,10 +580,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 69a5b5f..ed8a4ad 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -496,7 +496,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ -FILTERS = @FILTERS@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ H5_CFLAGS = @H5_CFLAGS@ @@ -585,10 +584,6 @@ TR = @TR@ TRACE_API = @TRACE_API@ UNAME_INFO = @UNAME_INFO@ USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@ -USE_FILTER_NBIT = @USE_FILTER_NBIT@ -USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@ -USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 66785ce..77f2819 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -117,18 +117,6 @@ /* Define if support for deflate (zlib) filter is enabled */ #define H5_HAVE_FILTER_DEFLATE 1 -/* Define if support for Fletcher32 checksum is enabled */ -#define H5_HAVE_FILTER_FLETCHER32 1 - -/* Define if support for nbit filter is enabled */ -#define H5_HAVE_FILTER_NBIT 1 - -/* Define if support for scaleoffset filter is enabled */ -#define H5_HAVE_FILTER_SCALEOFFSET 1 - -/* Define if support for shuffle filter is enabled */ -#define H5_HAVE_FILTER_SHUFFLE 1 - /* Define if support for szip filter is enabled */ /* #undef H5_HAVE_FILTER_SZIP */ -- cgit v0.12 From fec3d82085dfe7fc5b36ee00389c642d5ec36d72 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 08:22:11 -0500 Subject: [svn-r26070] Removed internal filter configuration from CMake Part of HDFFV-9086 --- CMakeFilters.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index f52b99b..cdf751f 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -11,11 +11,6 @@ MACRO (HDF5_SETUP_FILTERS FILTER) # message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}") ENDMACRO (HDF5_SETUP_FILTERS) -HDF5_SETUP_FILTERS (SHUFFLE) -HDF5_SETUP_FILTERS (FLETCHER32) -HDF5_SETUP_FILTERS (NBIT) -HDF5_SETUP_FILTERS (SCALEOFFSET) - include (ExternalProject) #option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO") set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)") -- cgit v0.12 From aea0b5b46e8a017de05ce2bcc3983a38444f6b51 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 09:15:48 -0500 Subject: [svn-r26071] Moved setting H5_DEFAULT_VFD from configure to src/H5private.h. Fixes HDFFV-9081 Tested on: jam --- config/cmake/H5pubconf.h.in | 3 --- configure | 41 ----------------------------------------- configure.ac | 28 ---------------------------- src/H5config.h.in | 3 --- src/H5private.h | 4 ++++ vms/src/h5pubconf.h | 3 --- 6 files changed, 4 insertions(+), 78 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 81b8c9a..7551df6 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -57,9 +57,6 @@ /* Define the default plugins path to compile */ #cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@" -/* Define the default virtual file driver to compile */ -#cmakedefine H5_DEFAULT_VFD @H5_DEFAULT_VFD@ - /* Define if `dev_t' is a scalar */ #cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@ diff --git a/configure b/configure index 388b932..fec11c5 100755 --- a/configure +++ b/configure @@ -916,7 +916,6 @@ enable_clear_file_buffers enable_using_memchecker enable_parallel with_mpe -with_default_vfd enable_direct_vfd with_default_plugindir enable_dconv_exception @@ -1653,8 +1652,6 @@ Optional Packages: --with-pthread=DIR Specify alternative path to Pthreads library when thread-safe capability is built --with-mpe=DIR Use MPE instrumentation [default=no] - --with-default-vfd=driver - Specify default file driver [default=sec2] --with-default-plugindir=location Specify default location for plugins [default="/usr/local/hdf5/lib/plugin"] @@ -28549,44 +28546,6 @@ $as_echo "#define HAVE_MPE 1" >>confdefs.h fi 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; } - -# Check whether --with-default-vfd was given. -if test "${with_default_vfd+set}" = set; then : - withval=$with_default_vfd; -else - withval=sec2 -fi - - -if test "X$withval" = "Xsec2"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - default_vfd=yes - vfd_define=H5FD_SEC2 -elif test "X$withval" = "Xstdio"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - default_vfd=yes - vfd_define=H5FD_STDIO -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - default_vfd=no -fi - -if test "X$default_vfd" = "Xyes"; then - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_VFD $vfd_define -_ACEOF - -fi ## ---------------------------------------------------------------------- ## Check if Direct I/O driver is enabled by --enable-direct-vfd diff --git a/configure.ac b/configure.ac index b45e9d1..10a6bb6 100644 --- a/configure.ac +++ b/configure.ac @@ -2527,34 +2527,6 @@ if test -n "$PARALLEL"; then fi fi -## -------------------------------------------------------------------------- -## Should the Default Virtual File Driver be compiled? -## - -AC_MSG_CHECKING([for Default Virtual File Driver definition]) -AC_ARG_WITH([default-vfd], - [AS_HELP_STRING([--with-default-vfd=driver], - [Specify default file driver - [default=sec2]])],, - withval=sec2) - -if test "X$withval" = "Xsec2"; then - AC_MSG_RESULT([yes]) - default_vfd=yes - vfd_define=H5FD_SEC2 -elif test "X$withval" = "Xstdio"; then - AC_MSG_RESULT([yes]) - default_vfd=yes - vfd_define=H5FD_STDIO -else - AC_MSG_RESULT([no]) - default_vfd=no -fi - -if test "X$default_vfd" = "Xyes"; then - AC_DEFINE_UNQUOTED([DEFAULT_VFD], [$vfd_define], - [Define the default virtual file driver to compile]) -fi ## ---------------------------------------------------------------------- ## Check if Direct I/O driver is enabled by --enable-direct-vfd diff --git a/src/H5config.h.in b/src/H5config.h.in index 06e58da..29656b4 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -20,9 +20,6 @@ /* Define the default plugins path to compile */ #undef DEFAULT_PLUGINDIR -/* Define the default virtual file driver to compile */ -#undef DEFAULT_VFD - /* Define if `dev_t' is a scalar */ #undef DEV_T_IS_SCALAR diff --git a/src/H5private.h b/src/H5private.h index f971504..e7de94b 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -160,6 +160,10 @@ #include #endif +/* Define the default VFD for this platform. + * Since the removal of the Windows VFD, this is sec2 for all platforms. + */ +#define H5_DEFAULT_VFD H5FD_SEC2 #ifdef H5_HAVE_WIN32_API /* The following two defines must be before any windows headers are included */ diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 77f2819..21986b3 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -32,9 +32,6 @@ /* Define if C++ compiler recognizes offsetof */ #define H5_CXX_HAVE_OFFSETOF 1 -/* Define the default virtual file driver to compile */ -#define H5_DEFAULT_VFD H5FD_SEC2 - /* Define if `dev_t' is a scalar */ #define H5_DEV_T_IS_SCALAR 1 -- cgit v0.12 From 682dcf403acdac33dd0aa059f24436212f428d0d Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 09:26:46 -0500 Subject: [svn-r26072] Updated libhdf5.settings.in so that it no longer lists internal filters. Part of HDFFV-9086 Tested on: jam (configure only) --- src/libhdf5.settings.in | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 27df560..0550652 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -62,7 +62,6 @@ Features: Default API Mapping: @DEFAULT_API_VERSION@ With Deprecated Public Symbols: @DEPRECATED_SYMBOLS@ I/O filters (external): @EXTERNAL_FILTERS@ - I/O filters (internal): @FILTERS@ MPE: @MPE@ Direct VFD: @DIRECT_VFD@ dmalloc: @HAVE_DMALLOC@ -- cgit v0.12 From a3eb3ac3332c24f9af2d4c9ce9ab88aa958d35f9 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 15:28:13 -0500 Subject: [svn-r26075] Removed (HD)BSDtimeofday and H5_HAVE_BSDGETTIMEOFDAY. This is an obsolete system call from Irix 5.3. Part of HDFFV-9085 Tested on: jam --- config/cmake/H5pubconf.h.in | 3 --- src/H5Omtime.c | 19 ++++--------------- src/H5private.h | 3 --- tools/perform/sio_standalone.h | 1 - vms/src/h5pubconf.h | 3 --- 5 files changed, 4 insertions(+), 25 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 7551df6..0455724 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -98,9 +98,6 @@ /* Define if the __attribute__(()) extension is present */ #cmakedefine H5_HAVE_ATTRIBUTE @H5_HAVE_ATTRIBUTE@ -/* Define to 1 if you have the `BSDgettimeofday' function. */ -#cmakedefine H5_HAVE_BSDGETTIMEOFDAY @H5_HAVE_BSDGETTIMEOFDAY@ - /* Define if the compiler understands C99 designated initialization of structs and unions */ #cmakedefine H5_HAVE_C99_DESIGNATED_INITIALIZER @H5_HAVE_C99_DESIGNATED_INITIALIZER@ diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 612d656..cdaad8a 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -200,8 +200,8 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, /* decode */ for(i = 0; i < 14; i++) - if(!HDisdigit(p[i])) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") + if(!HDisdigit(p[i])) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") /* * Convert YYYYMMDDhhmmss UTC to a time_t. This is a little problematic @@ -219,7 +219,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, tm.tm_sec = (p[12]-'0')*10 + (p[13]-'0'); tm.tm_isdst = -1; /*figure it out*/ if((time_t)-1 == (the_time = HDmktime(&tm))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") #if defined(H5_HAVE_TM_GMTOFF) /* FreeBSD, OSF 4.0 */ @@ -230,15 +230,6 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, #elif defined(H5_HAVE_TIMEZONE) /* Linux libc-5 */ the_time -= timezone - (tm.tm_isdst?3600:0); -#elif defined(H5_HAVE_BSDGETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE) - /* Irix5.3 */ - { - struct timezone tz; - - if(HDBSDgettimeofday(NULL, &tz) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to obtain local timezone information") - the_time -= tz.tz_minuteswest * 60 - (tm.tm_isdst ? 3600 : 0); - } #elif defined(H5_HAVE_GETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE) && defined(H5_GETTIMEOFDAY_GIVES_TZ) { struct timezone tz; @@ -257,14 +248,12 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, * only way a user can get the modification time is from our internal * query routines, which can gracefully recover. */ - - /* Irix64 */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to obtain local timezone information") #endif /* The return value */ if(NULL == (mesg = H5FL_MALLOC(time_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") *mesg = the_time; /* Set return value */ diff --git a/src/H5private.h b/src/H5private.h index e7de94b..445e919 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -570,9 +570,6 @@ typedef struct { #ifndef HDatol #define HDatol(S) atol(S) #endif /* HDatol */ -#ifndef HDBSDgettimeofday - #define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P) -#endif /* HDBSDgettimeofday */ #ifndef HDbsearch #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F) #endif /* HDbsearch */ diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h index b2f8220..4eb1ded 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -87,7 +87,6 @@ #define HDatof(S) atof(S) #define HDatoi(S) atoi(S) #define HDatol(S) atol(S) -#define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P) #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F) #define HDcalloc(N,Z) calloc(N,Z) #define HDceil(X) ceil(X) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 21986b3..634ee66 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -70,9 +70,6 @@ /* Define if the __attribute__(()) extension is present */ /* #undef H5_HAVE_ATTRIBUTE */ -/* Define to 1 if you have the `BSDgettimeofday' function. */ -/* #undef H5_HAVE_BSDGETTIMEOFDAY */ - /* Define if the compiler understands C99 designated initialization of structs and unions */ #define H5_HAVE_C99_DESIGNATED_INITIALIZER 1 -- cgit v0.12 From f44d493a4b9769b105024e2a06e0cc7ba2fe83b6 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 16:02:19 -0500 Subject: [svn-r26076] Removed gettimeofday() time zone struct functionality. Part of HDFFV-9085 Tested on: jam --- config/cmake/H5pubconf.h.in | 6 - configure | 284 -------------------------------------------- configure.ac | 44 ------- src/H5Omtime.c | 10 -- src/H5config.h.in | 24 ---- vms/src/h5pubconf.h | 6 - 6 files changed, 374 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 0455724..44cca9d 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -86,9 +86,6 @@ long long values. */ #cmakedefine H5_FP_TO_ULLONG_RIGHT_MAXIMUM @H5_FP_TO_ULLONG_RIGHT_MAXIMUM@ -/* Define if gettimeofday() populates the tz pointer passed in */ -#cmakedefine H5_GETTIMEOFDAY_GIVES_TZ @H5_GETTIMEOFDAY_GIVES_TZ@ - /* Define to 1 if you have the `alarm' function. */ #cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@ @@ -359,9 +356,6 @@ /* Define if `struct text_info' is defined */ #cmakedefine H5_HAVE_STRUCT_TEXT_INFO @H5_HAVE_STRUCT_TEXT_INFO@ -/* Define if `struct timezone' is defined */ -#cmakedefine H5_HAVE_STRUCT_TIMEZONE @H5_HAVE_STRUCT_TIMEZONE@ - /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #cmakedefine H5_HAVE_STRUCT_TM_TM_ZONE @H5_HAVE_STRUCT_TM_TM_ZONE@ diff --git a/configure b/configure index fec11c5..8b46307 100755 --- a/configure +++ b/configure @@ -2673,79 +2673,6 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -26524,217 +26451,6 @@ 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 : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - -ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include -#include <$ac_cv_struct_tm> - -" -if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF - - -fi - -if test "$ac_cv_member_struct_tm_tm_zone" = yes; then - -$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h - -else - ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include -" -if test "x$ac_cv_have_decl_tzname" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME $ac_have_decl -_ACEOF - - { $as_echo "$as_me:${as_lineno