1 dnl Copyright (C) 2006-2008 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.
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
19 AC_DEFUN([CHECK_HDF5],[
20 AC_REQUIRE([AC_PROG_CC])dnl
21 AC_REQUIRE([AC_PROG_CPP])dnl
26 [ --with-hdf5=DIR root directory path to hdf5 installation ],
28 AC_MSG_RESULT("select $withval as path to hdf5")
31 AC_SUBST(HDF5_INCLUDES)
33 AC_SUBST(HDF5_MT_LIBS)
46 AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory)
48 LOCAL_INCLUDES="-I$HDF5HOME/include"
49 if test "x$HDF5HOME" = "x/usr"
53 LOCAL_LIBS="-L$HDF5HOME/lib"
59 CPPFLAGS_old="$CPPFLAGS"
60 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
61 AC_CHECK_HEADER(hdf5.h,hdf5_ok=yes ,hdf5_ok=no)
62 CPPFLAGS="$CPPFLAGS_old"
65 if test "x$hdf5_ok" = "xyes"
71 LIBS="$LIBS $LOCAL_LIBS"
72 AC_CHECK_LIB(hdf5,H5open,hdf5_ok=yes,hdf5_ok=no)
77 if test "x$hdf5_ok" = "xyes"
79 HDF5_INCLUDES="$LOCAL_INCLUDES"
80 HDF5_LIBS="$LOCAL_LIBS -lhdf5"
81 HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5"
84 AC_MSG_RESULT(for hdf5: $hdf5_ok)