Salome HOME
Copyright update 2022
[plugins/hybridplugin.git] / adm_local / unix / config_files / check_HYBRIDPLUGIN.m4
1 # Copyright (C) 2007-2022  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # ---
21 #
22 # File   : check_HYBRIDPLUGIN.m4
23 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
24 #
25 # ---
26
27 AC_DEFUN([CHECK_HYBRIDPLUGIN],[
28
29 AC_CHECKING(for HYBRID mesh plugin)
30
31 HYBRIDplugin_ok=no
32
33 HYBRIDPLUGIN_LDFLAGS=""
34 HYBRIDPLUGIN_CXXFLAGS=""
35
36 AC_ARG_WITH(HYBRIDplugin,
37             [  --with-HYBRIDplugin=DIR root directory path of HYBRID mesh plugin installation ])
38
39 if test "$with_HYBRIDplugin" != "no" ; then
40     if test "$with_HYBRIDplugin" == "yes" || test "$with_HYBRIDplugin" == "auto"; then
41         if test "x$HYBRIDPLUGIN_ROOT_DIR" != "x" ; then
42             HYBRIDPLUGIN_DIR=$HYBRIDPLUGIN_ROOT_DIR
43         fi
44     else
45         HYBRIDPLUGIN_DIR="$with_HYBRIDplugin"
46     fi
47
48     if test "x$HYBRIDPLUGIN_DIR" != "x" ; then
49         if test -f ${HYBRIDPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libHYBRIDEngine.so ; then
50             HYBRIDplugin_ok=yes
51             AC_MSG_RESULT(Using HYBRID mesh plugin distribution in ${HYBRIDPLUGIN_DIR})
52             HYBRIDPLUGIN_ROOT_DIR=${HYBRIDPLUGIN_DIR}
53             HYBRIDPLUGIN_LDFLAGS=-L${HYBRIDPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
54             HYBRIDPLUGIN_CXXFLAGS=-I${HYBRIDPLUGIN_DIR}/include/salome
55         else
56             AC_MSG_WARN("Cannot find compiled HYBRID mesh plugin distribution")
57         fi
58     else
59         AC_MSG_WARN("Cannot find compiled HYBRID mesh plugin distribution")
60     fi
61 fi
62
63 AC_MSG_RESULT(for HYBRID mesh plugin: $HYBRIDplugin_ok)
64
65 AC_SUBST(HYBRIDPLUGIN_ROOT_DIR)
66 AC_SUBST(HYBRIDPLUGIN_LDFLAGS)
67 AC_SUBST(HYBRIDPLUGIN_CXXFLAGS)
68  
69 ])dnl
70