1 # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
21 AC_DEFUN([CHECK_HDF5],[
22 AC_REQUIRE([AC_PROG_CC])dnl
23 AC_REQUIRE([AC_PROG_CPP])dnl
28 [ --with-hdf5=DIR root directory path to hdf5 installation ],
30 AC_MSG_RESULT("select $withval as path to hdf5")
33 AC_SUBST(HDF5_INCLUDES)
35 AC_SUBST(HDF5_MT_LIBS)
48 AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory)
50 LOCAL_INCLUDES="-I$HDF5HOME/include"
51 LOCAL_LIBS="-L$HDF5HOME/lib"
56 CPPFLAGS_old="$CPPFLAGS"
57 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
58 AC_CHECK_HEADER(hdf5.h,hdf5_ok=yes ,hdf5_ok=no)
59 CPPFLAGS="$CPPFLAGS_old"
62 if test "x$hdf5_ok" = "xyes"
68 LIBS="$LIBS $LOCAL_LIBS"
69 AC_CHECK_LIB(hdf5,H5open,hdf5_ok=yes,hdf5_ok=no)
74 if test "x$hdf5_ok" = "xyes"
76 HDF5_INCLUDES="$LOCAL_INCLUDES"
77 HDF5_LIBS="$LOCAL_LIBS -lhdf5"
78 HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5"
81 AC_MSG_RESULT(for hdf5: $hdf5_ok)