1 dnl Copyright (C) 2012-2013 ALNEOS
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.alneos.com/ or email : contact@alneos.fr
20 #------------------------------------------------------------
21 # Check availability of Salome GMSH mesh plugin module
23 #------------------------------------------------------------
25 AC_DEFUN([CHECK_GMSHPLUGIN],[
27 AC_CHECKING(for GMSH mesh plugin)
32 GMSHPLUGIN_CXXFLAGS=""
34 AC_ARG_WITH(gmshplugin,
35 [ --with-gmshplugin=DIR root directory path of GMSH mesh plugin installation ],
36 GMSHPLUGIN_DIR="$withval",GMSHPLUGIN_DIR="")
38 if test "x$GMSHPLUGIN_DIR" == "x" ; then
40 # no --with-gmshplugin-dir option used
42 if test "x$GMSHPLUGIN_ROOT_DIR" != "x" ; then
44 # GMSHPLUGIN_ROOT_DIR environment variable defined
45 GMSHPLUGIN_DIR=$GMSHPLUGIN_ROOT_DIR
51 if test -f ${GMSHPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libGMSHEngine.so ; then
53 AC_MSG_RESULT(Using GMSH mesh plugin distribution in ${GMSHPLUGIN_DIR})
55 if test "x$GMSHPLUGIN_ROOT_DIR" == "x" ; then
56 GMSHPLUGIN_ROOT_DIR=${GMSHPLUGIN_DIR}
58 AC_SUBST(GMSHPLUGIN_ROOT_DIR)
60 GMSHPLUGIN_LDFLAGS=-L${GMSHPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
61 GMSHPLUGIN_CXXFLAGS=-I${GMSHPLUGIN_DIR}/include/salome
63 AC_SUBST(GMSHPLUGIN_LDFLAGS)
64 AC_SUBST(GMSHPLUGIN_CXXFLAGS)
67 AC_MSG_WARN("Cannot find compiled GMSH mesh plugin distribution")
70 AC_MSG_RESULT(for GMSH mesh plugin: $NGplugin_ok)