1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2025-01-03 10:06:01 +01:00

Fixing HDF5 detection

This commit is contained in:
Anthony Scemama 2023-01-19 00:14:01 +01:00
parent 22c438dbc5
commit fc7ddaddc0

View File

@ -135,12 +135,13 @@ AS_IF([test "x$with_hdf5" == "xno"], [
HDF5_CFLAGS="-I$HDF5_PATH/include"
AC_DEFINE([HAVE_HDF5], 1, [Define to 1 if HDF5 is available]) ],
[
PKG_CHECK_EXISTS([hdf5], [
PKG_CHECK_MODULES([HDF5], [hdf5 >= 1.8])
])
AC_CHECK_LIB([hdf5], [H5Fcreate], [ HDF5_LIBS="-lhdf5" ], [
PKG_CHECK_MODULES([HDF5], [hdf5 >= 1.8])
])
AC_MSG_ERROR([-lhdf5 fails, use ./configure --with-hdf5=...]) ])
AC_CHECK_HEADER([hdf5.h], [HDF5_CFLAGS=""], [
PKG_CHECK_MODULES([HDF5], [hdf5 >= 1.8])
])
AC_MSG_ERROR([hdf5.h not found, use ./configure --with-hdf5=...]) ])
AC_DEFINE([HAVE_HDF5], 1, [Define to 1 if HDF5 is available])
])