1 dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D
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.
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 dnl File : check_BLSURFPLUGIN.m4
21 dnl Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
23 AC_DEFUN([CHECK_BLSURFPLUGIN],[
25 AC_CHECKING(for BLSURF mesh plugin)
29 BLSURFPLUGIN_LDFLAGS=""
30 BLSURFPLUGIN_CXXFLAGS=""
32 AC_ARG_WITH(BLSURFplugin,
33 --with-BLSURFplugin=DIR root directory path of BLSURF mesh plugin installation,
34 BLSURFPLUGIN_DIR="$withval",BLSURFPLUGIN_DIR="")
36 if test "x$BLSURFPLUGIN_DIR" = "x" ; then
38 # no --with-BLSURFplugin option used
40 if test "x$BLSURFPLUGIN_ROOT_DIR" != "x" ; then
42 # SALOME_ROOT_DIR environment variable defined
43 BLSURFPLUGIN_DIR=$BLSURFPLUGIN_ROOT_DIR
47 # search Salome binaries in PATH variable
48 AC_PATH_PROG(TEMP, libBLSURFEngine.so)
49 if test "x$TEMP" != "x" ; then
50 BLSURFPLUGIN_DIR=`dirname $TEMP`
57 if test -f ${BLSURFPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libBLSURFEngine.so ; then
59 AC_MSG_RESULT(Using BLSURF mesh plugin distribution in ${BLSURFPLUGIN_DIR})
61 if test "x$BLSURFPLUGIN_ROOT_DIR" == "x" ; then
62 BLSURFPLUGIN_ROOT_DIR=${BLSURFPLUGIN_DIR}
64 BLSURFPLUGIN_CXXFLAGS=-I${BLSURFPLUGIN_ROOT_DIR}/include/salome
65 BLSURFPLUGIN_LDFLAGS="-L${BLSURFPLUGIN_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome -lBLSURFEngine"
67 AC_MSG_WARN("Cannot find compiled BLSURF mesh plugin distribution")
70 AC_MSG_RESULT(for BLSURF mesh plugin: $BLSURFplugin_ok)
72 AC_SUBST(BLSURFPLUGIN_ROOT_DIR)
73 AC_SUBST(BLSURFPLUGIN_LDFLAGS)
74 AC_SUBST(BLSURFPLUGIN_CXXFLAGS)