Salome HOME
To see which hdf5 we're using in configure log
[modules/kernel.git] / salome_adm / unix / config_files / check_hdf5.m4
index 4d200e8f3a5e0d57da012842fc6b7514d9c3c56a..966a4709848644990f3bfd0f3b80d2dc6244f256 100644 (file)
@@ -1,23 +1,24 @@
-#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-# 
-#  This library is free software; you can redistribute it and/or 
-#  modify it under the terms of the GNU Lesser General Public 
-#  License as published by the Free Software Foundation; either 
-#  version 2.1 of the License. 
-# 
-#  This library is distributed in the hope that it will be useful, 
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-#  Lesser General Public License for more details. 
-# 
-#  You should have received a copy of the GNU Lesser General Public 
-#  License along with this library; if not, write to the Free Software 
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-# 
-#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-#
-#
+dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
 AC_DEFUN([CHECK_HDF5],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
@@ -42,17 +43,22 @@ hdf5_ok=no
 
 LOCAL_INCLUDES=""
 LOCAL_LIBS=""
+LOCAL_RLIBS=""
 
 if test -z $HDF5HOME
 then
    AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory)
+   AC_MSG_NOTICE(Trying native Hdf5...)
 else
    LOCAL_INCLUDES="-I$HDF5HOME/include"
    if test "x$HDF5HOME" = "x/usr"
    then
+      AC_MSG_NOTICE(Trying native Hdf5...)
       LOCAL_LIBS=""
    else
+      AC_MSG_NOTICE(Trying Hdf5 from $HDF5HOME ...)
       LOCAL_LIBS="-L$HDF5HOME/lib"
+      LOCAL_RLIBS="-R$HDF5HOME/lib"
    fi
 fi
 
@@ -79,8 +85,13 @@ fi
 if  test "x$hdf5_ok" = "xyes"
 then
   HDF5_INCLUDES="$LOCAL_INCLUDES"
-  HDF5_LIBS="$LOCAL_LIBS -lhdf5"
-  HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5"
+  HDF5_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS"
+  HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS"
+fi
+
+if  test "x$hdf5_ok" = "xyes"
+then
+  HDF5_INCLUDES="$HDF5_INCLUDES -DH5_USE_16_API"
 fi
 
 AC_MSG_RESULT(for hdf5: $hdf5_ok)