]> SALOME platform Git repositories - plugins/hybridplugin.git/blob - adm_local/unix/config_files/check_GHS3DPLUGIN.m4
Salome HOME
Merge from BR_V5_DEV 16Feb09
[plugins/hybridplugin.git] / adm_local / unix / config_files / check_GHS3DPLUGIN.m4
1 dnl  Copyright (C) 2004-2008  CEA/DEN, EDF R&D
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 dnl
19 #  Check availability of GHS3DPLUGIN binary distribution
20 #
21 #  Author : Marc Tajchman (CEA, 2002)
22 #------------------------------------------------------------
23
24 AC_DEFUN([CHECK_GHS3DPLUGIN],[
25
26 GHS3DPLUGIN_LDFLAGS=""
27 GHS3DPLUGIN_CXXFLAGS=""
28
29 AC_CHECKING(for GHS3dPlugin)
30
31 GHS3dPlugin_ok=no
32
33 AC_ARG_WITH(ghs,
34             --with-ghs3dPlugin=DIR  root directory path of GHS3DPLUGIN build or installation,
35             GHS3DPLUGIN_DIR="$withval",GHS3DPLUGIN_DIR="")
36
37 if test "x$GHS3DPLUGIN_DIR" = "x" ; then
38
39 # no --with-gui-dir option used
40
41   if test "x$GHS3DPLUGIN_ROOT_DIR" != "x" ; then
42
43     # SALOME_ROOT_DIR environment variable defined
44     GHS3DPLUGIN_DIR=$GHS3DPLUGIN_ROOT_DIR
45
46   else
47
48     # search Salome binaries in PATH variable
49     AC_PATH_PROG(TEMP, libGHS3DEngine.so)
50     if test "x$TEMP" != "x" ; then
51       GHS3DPLUGIN_DIR=`dirname $TEMP`
52     fi
53
54   fi
55
56 fi
57
58 if test -f ${GHS3DPLUGIN_DIR}/lib/salome/libGHS3DEngine.so  ; then
59   GHS3dPlugin_ok=yes
60   AC_MSG_RESULT(Using GHS3DPLUGIN module distribution in ${GHS3DPLUGIN_DIR})
61
62   if test "x$GHS3DPLUGIN_ROOT_DIR" == "x" ; then
63     GHS3DPLUGIN_ROOT_DIR=${GHS3DPLUGIN_DIR}
64   fi
65   GHS3DPLUGIN_CXXFLAGS+=-I${GHS3DPLUGIN_ROOT_DIR}/include/salome
66   GHS3DPLUGIN_LDFLAGS+=-L${GHS3DPLUGIN_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
67   AC_SUBST(GHS3DPLUGIN_ROOT_DIR)
68   AC_SUBST(GHS3DPLUGIN_LDFLAGS)
69   AC_SUBST(GHS3DPLUGIN_CXXFLAGS)
70 else
71   AC_MSG_WARN("Cannot find compiled GHS3DPLUGIN module distribution")
72 fi
73   
74 AC_MSG_RESULT(for GHS3DPLUGIN: $GHS3dPlugin_ok)
75  
76 ])dnl
77