1 dnl Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
3 dnl This library is free software; you can redistribute it and/or
4 dnl modify it under the terms of the GNU Lesser General Public
5 dnl License as published by the Free Software Foundation; either
6 dnl version 2.1 of the License, or (at your option) any later version.
8 dnl This library is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 dnl Lesser General Public License for more details.
13 dnl You should have received a copy of the GNU Lesser General Public
14 dnl License along with this library; if not, write to the Free Software
15 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 AC_DEFUN([CHECK_FVM],[
22 AC_CHECKING(for FVM Library)
32 AC_CHECKING(for FVM location)
34 [ --with-fvm=DIR root directory path to FVM library installation ],
36 AC_MSG_RESULT("select $withval as path to FVM library")])
38 AC_MSG_RESULT(\$FVMDIR = ${FVMDIR})
40 CPPFLAGS_old="${CPPFLAGS}"
43 if test "x${FVMDIR}" != "x" ; then
50 if test "x${bft_ok}" = "xyes"; then
53 FVM_INCLUDES="-I${FVMDIR}/include"
54 FVM_LIBS="-L${FVMDIR}/lib -lfvm ${BFT_LIBS} ${MPI_LIBS}"
58 AC_CHECKING(for FVM headers)
59 CPPFLAGS="${CPPFLAGS_old} ${FVM_INCLUDES} ${MPI_CPPFLAGS} ${MED_CPPFLAGS}"
61 fvm_include_dir_ok=yes
62 if test "x${FVMDIR}" != "x" ; then
63 AC_CHECK_FILE(${FVMDIR}/include/fvm_nodal.h,
64 fvm_include_dir_ok=yes,
65 fvm_include_dir_ok=no)
68 if test "x${fvm_include_dir_ok}" = "xyes" ; then
69 AC_TRY_COMPILE([#include <iostream>
70 #include "fvm_nodal.h"],
71 [fvm_nodal_create("",2)],
76 if test "x${fvm_headers_ok}" = "xno" ; then
77 FVM_INCLUDES="FVM_INCLUDES_NOT_DEFINED"
79 AC_MSG_RESULT(\$FVM_INCLUDES = ${FVM_INCLUDES})
81 AC_MSG_RESULT(for fvm headers: $fvm_headers_ok)
83 if test "x${fvm_headers_ok}" = "xyes" ; then
85 AC_CHECKING(for FVM binaries)
87 if test "x${FVMDIR}" != "x" ; then
88 AC_CHECK_FILE(${FVMDIR}/lib/libfvm.so,
95 CPPFLAGS="${CPPFLAGS_old}"
98 if test "x${fvm_headers_ok}" = "xyes" ; then
99 if test "x${fvm_lib_dir_ok}" = "xyes" ; then
106 AC_SUBST(FVM_INCLUDES)
107 AC_SUBST(FVM_LIBSUFFIX)
111 AC_MSG_RESULT(for fvm: $fvm_ok)