]> SALOME platform Git repositories - plugins/gmshplugin.git/blob - adm_local/unix/config_files/check_GMSHPLUGIN.m4
Salome HOME
portage V7_7_0
[plugins/gmshplugin.git] / adm_local / unix / config_files / check_GMSHPLUGIN.m4
1 dnl Copyright (C) 2012-2013  ALNEOS
2 dnl
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.
7 dnl
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.
12 dnl
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
16 dnl
17 dnl See http://www.alneos.com/ or email : contact@alneos.fr
18 dnl
19
20 #------------------------------------------------------------
21 #  Check availability of Salome GMSH mesh plugin module
22 #   distribution
23 #------------------------------------------------------------
24
25 AC_DEFUN([CHECK_GMSHPLUGIN],[
26
27 AC_CHECKING(for GMSH mesh plugin)
28
29 NGplugin_ok=no
30
31 GMSHPLUGIN_LDLAGS=""
32 GMSHPLUGIN_CXXFLAGS=""
33
34 AC_ARG_WITH(gmshplugin,
35             [  --with-gmshplugin=DIR root directory path of GMSH mesh plugin installation ],
36             GMSHPLUGIN_DIR="$withval",GMSHPLUGIN_DIR="")
37
38 if test "x$GMSHPLUGIN_DIR" == "x" ; then
39
40 # no --with-gmshplugin-dir option used
41
42    if test "x$GMSHPLUGIN_ROOT_DIR" != "x" ; then
43
44     # GMSHPLUGIN_ROOT_DIR environment variable defined
45       GMSHPLUGIN_DIR=$GMSHPLUGIN_ROOT_DIR
46
47    fi
48
49 fi
50
51 if test -f ${GMSHPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libGMSHEngine.so ; then
52    NGplugin_ok=yes
53    AC_MSG_RESULT(Using GMSH mesh plugin distribution in ${GMSHPLUGIN_DIR})
54
55    if test "x$GMSHPLUGIN_ROOT_DIR" == "x" ; then
56       GMSHPLUGIN_ROOT_DIR=${GMSHPLUGIN_DIR}
57    fi
58    AC_SUBST(GMSHPLUGIN_ROOT_DIR)
59
60    GMSHPLUGIN_LDFLAGS=-L${GMSHPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
61    GMSHPLUGIN_CXXFLAGS=-I${GMSHPLUGIN_DIR}/include/salome
62
63    AC_SUBST(GMSHPLUGIN_LDFLAGS)
64    AC_SUBST(GMSHPLUGIN_CXXFLAGS)
65
66 else
67    AC_MSG_WARN("Cannot find compiled GMSH mesh plugin distribution")
68 fi
69
70 AC_MSG_RESULT(for GMSH mesh plugin: $NGplugin_ok)
71  
72 ])dnl