Salome HOME
Copyright update: 2016
[plugins/ghs3dprlplugin.git] / adm_local / unix / config_files / check_GHS3DPRLPLUGIN.m4
1 # Copyright (C) 2007-2016  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_GHS3DPRLPLUGIN.m4
23 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
24 #
25 # ---
26
27 AC_DEFUN([CHECK_GHS3DPRLPLUGIN],[
28
29 AC_CHECKING(for GHS3DPRL mesh plugin)
30
31 GHS3DPRLplugin_ok=no
32
33 GHS3DPRLPLUGIN_LDFLAGS=""
34 GHS3DPRLPLUGIN_CXXFLAGS=""
35
36 AC_ARG_WITH(GHS3DPRLplugin,
37             [  --with-GHS3DPRLplugin=DIR root directory path of GHS3DPRL mesh plugin installation ])
38
39 if test "$with_GHS3DPRLplugin" != "no" ; then
40     if test "$with_GHS3DPRLplugin" == "yes" || test "$with_GHS3DPRLplugin" == "auto"; then
41         if test "x$GHS3DPRLPLUGIN_ROOT_DIR" != "x" ; then
42             GHS3DPRLPLUGIN_DIR=$GHS3DPRLPLUGIN_ROOT_DIR
43         fi
44     else
45         GHS3DPRLPLUGIN_DIR="$with_GHS3DPRLplugin"
46     fi
47
48     if test "x$GHS3DPRLPLUGIN_DIR" != "x" ; then
49         if test -f ${GHS3DPRLPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libGHS3DPRLEngine.so ; then
50             GHS3DPRLplugin_ok=yes
51             AC_MSG_RESULT(Using GHS3DPRL mesh plugin distribution in ${GHS3DPRLPLUGIN_DIR})
52             GHS3DPRLPLUGIN_ROOT_DIR=${GHS3DPRLPLUGIN_DIR}
53             GHS3DPRLPLUGIN_LDFLAGS=-L${GHS3DPRLPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
54             GHS3DPRLPLUGIN_CXXFLAGS=-I${GHS3DPRLPLUGIN_DIR}/include/salome
55         else
56             AC_MSG_WARN("Cannot find compiled GHS3DPRL mesh plugin distribution")
57         fi
58     else
59         AC_MSG_WARN("Cannot find compiled GHS3DPRL mesh plugin distribution")
60     fi
61 fi
62
63 AC_MSG_RESULT(for GHS3DPRL mesh plugin: $GHS3DPRLplugin_ok)
64
65 AC_SUBST(GHS3DPRLPLUGIN_ROOT_DIR)
66 AC_SUBST(GHS3DPRLPLUGIN_LDFLAGS)
67 AC_SUBST(GHS3DPRLPLUGIN_CXXFLAGS)
68  
69 ])dnl