1 dnl Copyright (C) 2009-2015 CEA/DEN, EDF R&D
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, or (at your option) any later version.
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Check availability of HEXABLOCKPLUGIN binary distribution
22 # Author : Lioka RAZAFINDRAZAKA (CEA)
23 #------------------------------------------------------------
25 AC_DEFUN([CHECK_HEXABLOCKPLUGIN],[
27 HEXABLOCKPLUGIN_LDFLAGS=""
28 HEXABLOCKPLUGIN_CXXFLAGS=""
30 AC_CHECKING(for GHS3dPlugin)
35 --with-HEXABLOCKPlugin=DIR root directory path of HEXABLOCKPLUGIN build or installation,
36 HEXABLOCKPLUGIN_DIR="$withval",HEXABLOCKPLUGIN_DIR="")
38 if test "x$HEXABLOCKPLUGIN_DIR" = "x" ; then
40 # no --with-gui-dir option used
42 if test "x$HEXABLOCKPLUGIN_ROOT_DIR" != "x" ; then
44 # SALOME_ROOT_DIR environment variable defined
45 HEXABLOCKPLUGIN_DIR=$HEXABLOCKPLUGIN_ROOT_DIR
49 # search Salome binaries in PATH variable
50 AC_PATH_PROG(TEMP, libHexaBlockPluginEngine.so)
51 if test "x$TEMP" != "x" ; then
52 HEXABLOCKPLUGIN_DIR=`dirname $TEMP`
59 if test -f ${HEXABLOCKPLUGIN_DIR}/lib/salome/libHexaBlockPluginEngine.so ; then
60 HEXABLOCKPLUGIN_ok=yes
61 AC_MSG_RESULT(Using HEXABLOCKPLUGIN module distribution in ${HEXABLOCKPLUGIN_DIR})
63 if test "x$HEXABLOCKPLUGIN_ROOT_DIR" == "x" ; then
64 HEXABLOCKPLUGIN_ROOT_DIR=${HEXABLOCKPLUGIN_DIR}
66 HEXABLOCKPLUGIN_CXXFLAGS+=-I${HEXABLOCKPLUGIN_ROOT_DIR}/include/salome
67 HEXABLOCKPLUGIN_LDFLAGS+=-L${HEXABLOCKPLUGIN_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
68 AC_SUBST(HEXABLOCKPLUGIN_ROOT_DIR)
69 AC_SUBST(HEXABLOCKPLUGIN_LDFLAGS)
70 AC_SUBST(HEXABLOCKPLUGIN_CXXFLAGS)
72 AC_MSG_WARN("Cannot find compiled HEXABLOCKPLUGIN module distribution")
75 AC_MSG_RESULT(for HEXABLOCKPLUGIN: $HEXABLOCKPLUGIN_ok)