1 dnl Copyright (C) 2006-2022 CEA/DEN, EDF R&D
3 dnl This library is free software; you can redistribute it and/or
4 dnl modify it under the terms of the GNU Lesser General Public
5 dnl License as published by the Free Software Foundation; either
6 dnl version 2.1 of the License, or (at your option) any later version.
8 dnl This library is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 dnl Lesser General Public License for more details.
13 dnl You should have received a copy of the GNU Lesser General Public
14 dnl License along with this library; if not, write to the Free Software
15 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 AC_DEFUN([CHECK_HDF5],[
21 AC_REQUIRE([AC_PROG_CC])dnl
22 AC_REQUIRE([AC_PROG_CPP])dnl
27 [ --with-hdf5=DIR root directory path to hdf5 installation ],
29 AC_MSG_RESULT("select $withval as path to hdf5")
32 AC_SUBST(HDF5_INCLUDES)
34 AC_SUBST(HDF5_MT_LIBS)
47 AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory)
49 LOCAL_INCLUDES="-I$HDF5HOME/include"
50 LOCAL_LIBS="-L$HDF5HOME/lib"
55 CPPFLAGS_old="$CPPFLAGS"
56 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
57 AC_CHECK_HEADER(hdf5.h,hdf5_ok=yes ,hdf5_ok=no)
58 CPPFLAGS="$CPPFLAGS_old"
61 if test "x$hdf5_ok" = "xyes"
67 LIBS="$LIBS $LOCAL_LIBS"
68 AC_CHECK_LIB(hdf5,H5open,hdf5_ok=yes,hdf5_ok=no)
73 if test "x$hdf5_ok" = "xyes"
75 HDF5_INCLUDES="$LOCAL_INCLUDES"
76 HDF5_LIBS="$LOCAL_LIBS -lhdf5"
77 HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5"
80 AC_MSG_RESULT(for hdf5: $hdf5_ok)