Salome HOME
To see which hdf5 we're using in configure log
[modules/kernel.git] / salome_adm / unix / config_files / check_boost.m4
index 0298be6ee3d09a9ffc5cfead4d902c52a9ae3804..49642a24ec9b32042761a7bd86a1c6b464d017e7 100644 (file)
@@ -1,23 +1,23 @@
-dnl  Copyright (C) 2003  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.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_BOOST],[
 
@@ -53,6 +53,11 @@ if test "x${BOOSTDIR}" != "x" ; then
   BOOST_LIBS="-L${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}"
 fi
 
+if test "x${BOOSTDIR}" = "x/usr" ; then
+  BOOST_CPPFLAGS=""
+  BOOST_LIBS=""
+fi
+
 boost_ok=no
 boost_headers_ok=no
 boost_binaries_ok=no
@@ -68,6 +73,14 @@ if test "x${BOOSTDIR}" != "x" ; then
                 boost_include_dir_ok=no)
 fi
 
+BOOST_PROGRAM_OPTIONS_LIB=no
+if test "x${boost_include_dir_ok}" = "xyes" ; then
+  AC_CHECK_FILE(${BOOSTDIR}/include/boost/program_options.hpp,
+                BOOST_PROGRAM_OPTIONS_LIB=yes,
+                BOOST_PROGRAM_OPTIONS_LIB=no)
+fi
+AC_MSG_RESULT(for boost program_options tool: $BOOST_PROGRAM_OPTIONS_LIB)
+
 if test "x${boost_include_dir_ok}" = "xyes" ; then
   AC_TRY_COMPILE([#include <boost/shared_ptr.hpp>],
                  [boost::shared_ptr<int>(new int)],
@@ -120,6 +133,15 @@ if test "x${boost_binaries_ok}" = "xno" ; then
 else
   AC_MSG_RESULT(\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX})
   AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS})
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}",
+                BOOST_LIB_THREAD="")
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_SIGNALS="${BOOST_LIBS} -lboost_signals${BOOST_LIBSUFFIX}",
+                BOOST_LIB_SIGNALS="")
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_SYSTEM="${BOOST_LIBS} -lboost_system${BOOST_LIBSUFFIX}",
+                BOOST_LIB_SYSTEM="")
 fi
 AC_MSG_RESULT(for boost binaries: $boost_binaries_ok)
 
@@ -137,6 +159,10 @@ AC_MSG_RESULT(for boost: $boost_ok)
 AC_SUBST(BOOST_CPPFLAGS)
 AC_SUBST(BOOST_LIBSUFFIX)
 AC_SUBST(BOOST_LIBS)
+AC_SUBST(BOOST_LIB_THREAD)
+AC_SUBST(BOOST_LIB_SIGNALS)
+AC_SUBST(BOOST_LIB_SYSTEM)
+AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
 
 AC_LANG_RESTORE