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_FVM],[
24 AC_CHECKING(for FVM Library)
34 AC_CHECKING(for FVM location)
36 [ --with-fvm=DIR root directory path to FVM library installation ],
38 AC_MSG_RESULT("select $withval as path to FVM library")])
40 AC_MSG_RESULT(\$FVMDIR = ${FVMDIR})
42 CPPFLAGS_old="${CPPFLAGS}"
45 if test "x${FVMDIR}" != "x" ; then
52 if test "x${bft_ok}" = "xyes"; then
55 FVM_INCLUDES="-I${FVMDIR}/include"
56 FVM_LIBS="-L${FVMDIR}/lib -lfvm ${BFT_LIBS} ${MPI_LIBS}"
60 AC_CHECKING(for FVM headers)
61 CPPFLAGS="${CPPFLAGS_old} ${FVM_INCLUDES} ${MPI_CPPFLAGS} ${MED_CPPFLAGS}"
63 fvm_include_dir_ok=yes
64 if test "x${FVMDIR}" != "x" ; then
65 AC_CHECK_FILE(${FVMDIR}/include/fvm_nodal.h,
66 fvm_include_dir_ok=yes,
67 fvm_include_dir_ok=no)
70 if test "x${fvm_include_dir_ok}" = "xyes" ; then
71 AC_TRY_COMPILE([#include <iostream>
72 #include "fvm_nodal.h"],
73 [fvm_nodal_create("",2)],
78 if test "x${fvm_headers_ok}" = "xno" ; then
79 FVM_INCLUDES="FVM_INCLUDES_NOT_DEFINED"
81 AC_MSG_RESULT(\$FVM_INCLUDES = ${FVM_INCLUDES})
83 AC_MSG_RESULT(for fvm headers: $fvm_headers_ok)
85 if test "x${fvm_headers_ok}" = "xyes" ; then
87 AC_CHECKING(for FVM binaries)
89 if test "x${FVMDIR}" != "x" ; then
90 AC_CHECK_FILE(${FVMDIR}/lib/libfvm.so,
97 CPPFLAGS="${CPPFLAGS_old}"
100 if test "x${fvm_headers_ok}" = "xyes" ; then
101 if test "x${fvm_lib_dir_ok}" = "xyes" ; then
108 AC_SUBST(FVM_INCLUDES)
109 AC_SUBST(FVM_LIBSUFFIX)
113 AC_MSG_RESULT(for fvm: $fvm_ok)