1 # Check availability of SMesh binary distribution
3 # Author : Nicolas REJNERI (OPEN CASCADE, 2003)
6 AC_DEFUN([CHECK_SMESH],[
16 [ --with-smesh=DIR root directory path of SMESH installation ],
17 SMESH_DIR="$withval",SMESH_DIR="")
19 if test "x$SMESH_DIR" == "x" ; then
21 # no --with-smesh option used
23 if test "x$SMESH_ROOT_DIR" != "x" ; then
25 # SMESH_ROOT_DIR environment variable defined
26 SMESH_DIR=$SMESH_ROOT_DIR
30 # search SMESH binaries in PATH variable
31 AC_PATH_PROG(TEMP, libSMESH_Swig.py)
32 if test "x$TEMP" != "x" ; then
33 SMESH_BIN_DIR=`dirname $TEMP`
34 SMESH_DIR=`dirname $SMESH_BIN_DIR`
41 if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then
43 AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR})
45 if test "x$SMESH_ROOT_DIR" == "x" ; then
46 SMESH_ROOT_DIR=${SMESH_DIR}
48 AC_SUBST(SMESH_ROOT_DIR)
50 SMESH_LDFLAGS=-L${SMESH_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
51 SMESH_CXXFLAGS=-I${SMESH_DIR}/include/salome
53 AC_SUBST(SMESH_LDFLAGS)
54 AC_SUBST(SMESH_CXXFLAGS)
57 AC_MSG_WARN("Cannot find compiled SMesh module distribution")
60 AC_MSG_RESULT(for SMesh: $SMesh_ok)