1 dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 dnl This library is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Lesser General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2.1 of the License.
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl Lesser General Public License for more details.
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this library; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 AC_DEFUN([CHECK_BFT],[
24 AC_CHECKING(for BFT Library)
33 AC_CHECKING(for BFT location)
35 [ --with-bft=DIR root directory path to BFT library installation ],
37 AC_MSG_RESULT("select $withval as path to BFT library")])
39 AC_MSG_RESULT(\$BFTDIR = ${BFTDIR})
41 CPPFLAGS_old="${CPPFLAGS}"
44 if test "x${BFTDIR}" != "x" ; then
45 BFT_INCLUDES="-I${BFTDIR}/include"
46 BFT_LIBS="-L${BFTDIR}/lib -lbft"
54 AC_CHECKING(for BFT headers)
55 CPPFLAGS="${CPPFLAGS_old} ${BFT_INCLUDES} ${MPI_CPPFLAGS} ${MED_CPPFLAGS}"
57 bft_include_dir_ok=yes
58 if test "x${BFTDIR}" != "x" ; then
59 AC_CHECK_FILE(${BFTDIR}/include/bft_mem.h,
60 bft_include_dir_ok=yes,
61 bft_include_dir_ok=no)
64 if test "x${bft_include_dir_ok}" = "xyes" ; then
65 AC_TRY_COMPILE([ #include "bft_mem.h"],
71 if test "x${bft_headers_ok}" = "xno" ; then
72 BFT_INCLUDES="BFT_INCLUDES_NOT_DEFINED"
74 AC_MSG_RESULT(\$BFT_INCLUDES = ${BFT_INCLUDES})
76 AC_MSG_RESULT(for bft headers: $bft_headers_ok)
78 if test "x${bft_headers_ok}" = "xyes" ; then
80 AC_CHECKING(for BFT binaries)
82 if test "x${BFTDIR}" != "x" ; then
83 AC_CHECK_FILE(${BFTDIR}/lib/libbft.so,
90 CPPFLAGS="${CPPFLAGS_old}"
93 if test "x${bft_headers_ok}" = "xyes" ; then
94 if test "x${bft_lib_dir_ok}" = "xyes" ; then
99 AC_MSG_RESULT(for bft: $bft_ok)
101 AC_SUBST(BFT_INCLUDES)
102 AC_SUBST(BFT_LIBSUFFIX)