diff options
author | Peter Simons <simons@cryp.to> | 2018-03-23 12:24:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 12:24:36 +0100 |
commit | 7e0e688b0ae30e26faf9e793049cb44d613f4d1e (patch) | |
tree | 50d84295efd289949ad7413ffe0ecda22118f06b | |
parent | 60326e10acb41eb7c2b4ee7ad97226a71ac52cc8 (diff) | |
parent | 83423732f611a3c78cdc616e64e9ccb75ee6e7fe (diff) | |
download | autoconf-archive-7e0e688b0ae30e26faf9e793049cb44d613f4d1e.tar.gz |
Merge pull request #151 from ZedThree/fix-hdf5-lib-order
AX_LIB_HDF5: fix order of flags
-rw-r--r-- | m4/ax_lib_hdf5.m4 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/m4/ax_lib_hdf5.m4 b/m4/ax_lib_hdf5.m4 index a3a8974..5a50442 100644 --- a/m4/ax_lib_hdf5.m4 +++ b/m4/ax_lib_hdf5.m4 @@ -88,7 +88,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 18 +#serial 19 AC_DEFUN([AX_LIB_HDF5], [ @@ -226,18 +226,18 @@ HDF5 support is being disabled (equivalent to --with-hdf5=no). for arg in $HDF5_SHOW $HDF5_tmp_flags ; do case "$arg" in -I*) echo $HDF5_CPPFLAGS | $GREP -e "$arg" 2>&1 >/dev/null \ - || HDF5_CPPFLAGS="$arg $HDF5_CPPFLAGS" + || HDF5_CPPFLAGS="$HDF5_CPPFLAGS $arg" ;; -L*) echo $HDF5_LDFLAGS | $GREP -e "$arg" 2>&1 >/dev/null \ - || HDF5_LDFLAGS="$arg $HDF5_LDFLAGS" + || HDF5_LDFLAGS="$HDF5_LDFLAGS $arg" ;; -l*) echo $HDF5_LIBS | $GREP -e "$arg" 2>&1 >/dev/null \ - || HDF5_LIBS="$arg $HDF5_LIBS" + || HDF5_LIBS="$HDF5_LIBS $arg" ;; esac done - HDF5_LIBS="$HDF5_LIBS -lhdf5" + HDF5_LIBS="-lhdf5 $HDF5_LIBS" AC_MSG_RESULT([yes (version $[HDF5_VERSION])]) dnl See if we can compile @@ -257,7 +257,7 @@ HDF5 support is being disabled (equivalent to --with-hdf5=no). AC_MSG_WARN([Unable to compile HDF5 test program]) fi dnl Look for HDF5's high level library - AC_HAVE_LIBRARY([hdf5_hl], [HDF5_LIBS="$HDF5_LIBS -lhdf5_hl"], [], []) + AC_HAVE_LIBRARY([hdf5_hl], [HDF5_LIBS="-lhdf5_hl $HDF5_LIBS"], [], []) CC=$ax_lib_hdf5_save_CC CPPFLAGS=$ax_lib_hdf5_save_CPPFLAGS @@ -278,14 +278,14 @@ HDF5 support is being disabled (equivalent to --with-hdf5=no). do case "$arg" in #( -I*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \ - || HDF5_FFLAGS="$arg $HDF5_FFLAGS" + || HDF5_FFLAGS="$HDF5_FFLAGS $arg" ;;#( -L*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \ - || HDF5_FFLAGS="$arg $HDF5_FFLAGS" + || HDF5_FFLAGS="$HDF5_FFLAGS $arg" dnl HDF5 installs .mod files in with libraries, dnl but some compilers need to find them with -I echo $HDF5_FFLAGS | $GREP -e "-I${arg#-L}" >/dev/null \ - || HDF5_FFLAGS="-I${arg#-L} $HDF5_FFLAGS" + || HDF5_FFLAGS="$HDF5_FFLAGS -I${arg#-L}" ;; esac done |