Bug in m4/ax_lib_hdf5.m4, AX_LIB_HDF5
Harald Anlauf <[email protected]> Thu, 4 May 2023 21:01:39 +0200
| Newsgroups | gmane.comp.sysutils.autoconf.archive-maintainers |
|---|---|
| Message-ID | <trinity-111a8938-9631-4098-8711-a90a7b94bfb5-1683226899215@3c-app-gmx-bap61> |
--kenitram-1fc92e81-463a-4f43-9982-c3f9025b5a5a Content-Type: text/plain; charset=UTF-8 Hello, I thought I submitted this patch before, but never received a reply. When analyzing the output from `h5fc -show', which e.g. on my Linux system is gfortran -I/usr/include -L/usr/lib64 -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 one would like to put all options of type -Ldirectory into variable HDF5_FLIBS (for the linking flags) instead of HDF5_FFLAGS (for the compilation flags). The cause of the issue seems to be a copy&paste error. The attached trivial & obvious patch fixes this. Feel free to use it. Thanks, Harald --kenitram-1fc92e81-463a-4f43-9982-c3f9025b5a5a Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-AX_LIB_HDF5-fix-derivation-of-compile-and-link-flags.patch Content-Transfer-Encoding: quoted-printable =46rom 9bb09588d99d119ca0b9adbf7e69f370daf1b9f5 Mon Sep 17 00:00:00 2001 From: Harald Anlauf <[email protected]> Date: Tue, 22 Feb 2022 16:25:27 +0100 Subject: [PATCH] AX_LIB_HDF5: fix derivation of compile and link flags for Fortran When analyzing the output from `h5fc -show`, add options of type -Ldir to HDF5_FLIBS, not to HDF5_FFLAGS. =2D-- m4/ax_lib_hdf5.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/ax_lib_hdf5.m4 b/m4/ax_lib_hdf5.m4 index 074c2a8..6b913d7 100644 =2D-- 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 an= y # warranty. -#serial 20 +#serial 21 AC_DEFUN([AX_LIB_HDF5], [ @@ -280,8 +280,8 @@ HDF5 support is being disabled (equivalent to --with-h= df5=3Dno). -I*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \ || HDF5_FFLAGS=3D"$HDF5_FFLAGS $arg" ;;#( - -L*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \ - || HDF5_FFLAGS=3D"$HDF5_FFLAGS $arg" + -L*) echo $HDF5_FLIBS | $GREP -e "$arg" >/dev/null \ + || HDF5_FLIBS=3D"$HDF5_FLIBS $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/nul= l \ =2D- 2.35.3 --kenitram-1fc92e81-463a-4f43-9982-c3f9025b5a5a--