1 dnl Copyright (C) 2009-2013 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.
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
19 # Check availability of HEXABLOCK module binary distribution
21 # Author : Marc Tajchman (CEA, 2002)
22 #------------------------------------------------------------
24 AC_DEFUN([CHECK_HEXABLOCK],[
26 AC_CHECKING(for HEXABLOCK)
33 AC_ARG_WITH(hexablock,
34 --with-hexablock=DIR root directory path of HEXABLOCK installation,
35 HEXABLOCK_DIR="$withval",HEXABLOCK_DIR="")
37 if test "x$HEXABLOCK_DIR" = "x" ; then
39 # no --with-gui-dir option used
41 if test "x$HEXABLOCK_ROOT_DIR" != "x" ; then
43 # HEXABLOCK_ROOT_DIR environment variable defined
44 HEXABLOCK_DIR=$HEXABLOCK_ROOT_DIR
48 # search hexablock binaries in PATH variable
49 AC_PATH_PROG(TEMP, libHEXABLOCK.so)
50 if test "x$TEMP" != "x" ; then
51 HEXABLOCK_BIN_DIR=`dirname $TEMP`
52 HEXABLOCK_DIR=`dirname $HEXABLOCK_BIN_DIR`
59 if test -f ${HEXABLOCK_DIR}/lib/salome/libHEXABLOCK.so ; then
61 AC_MSG_RESULT(Using HEXABLOCK distribution in ${HEXABLOCK_DIR})
63 if test "x$HEXABLOCK_ROOT_DIR" == "x" ; then
64 HEXABLOCK_ROOT_DIR=${HEXABLOCK_DIR}
66 AC_SUBST(HEXABLOCK_ROOT_DIR)
68 HEXABLOCK_LDFLAGS=-L${HEXABLOCK_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
69 HEXABLOCK_CXXFLAGS=-I${HEXABLOCK_DIR}/include/salome
71 AC_SUBST(HEXABLOCK_LDFLAGS)
72 AC_SUBST(HEXABLOCK_CXXFLAGS)
75 AC_MSG_WARN("Cannot find compiled HEXABLOCK distribution")
78 AC_MSG_RESULT(for HEXABLOCK: $HEXABLOCK_ok)