From: gdd Date: Fri, 9 Sep 2011 08:27:53 +0000 (+0000) Subject: Update m4 macro X-Git-Tag: V6_4_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f9b75ae3bd01fa93983ac5f49bf010c855b8402;p=plugins%2Fblsurfplugin.git Update m4 macro --- diff --git a/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 b/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 index c1f42b4..70e1d0d 100644 --- a/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 +++ b/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 @@ -30,36 +30,46 @@ BLSURFPLUGIN_LDFLAGS="" BLSURFPLUGIN_CXXFLAGS="" AC_ARG_WITH(BLSURFplugin, - [ --with-BLSURFplugin=DIR root directory path of BLSURF mesh plugin installation ]) + --with-BLSURFplugin=DIR root directory path of BLSURF mesh plugin installation, + BLSURFPLUGIN_DIR="$withval",BLSURFPLUGIN_DIR="") -if test "$with_BLSURFplugin" != "no" ; then - if test "$with_BLSURFplugin" == "yes" || test "$with_BLSURFplugin" == "auto"; then - if test "x$BLSURFPLUGIN_ROOT_DIR" != "x" ; then - BLSURFPLUGIN_DIR=$BLSURFPLUGIN_ROOT_DIR - fi - else - BLSURFPLUGIN_DIR="$with_BLSURFplugin" - fi +if test "x$BLSURFPLUGIN_DIR" = "x" ; then + +# no --with-BLSURFplugin option used + + if test "x$BLSURFPLUGIN_ROOT_DIR" != "x" ; then + + # SALOME_ROOT_DIR environment variable defined + BLSURFPLUGIN_DIR=$BLSURFPLUGIN_ROOT_DIR + + else - if test "x$BLSURFPLUGIN_DIR" != "x" ; then - if test -f ${BLSURFPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libBLSURFEngine.so ; then - BLSURFplugin_ok=yes - AC_MSG_RESULT(Using BLSURF mesh plugin distribution in ${BLSURFPLUGIN_DIR}) - BLSURFPLUGIN_ROOT_DIR=${BLSURFPLUGIN_DIR} - BLSURFPLUGIN_LDFLAGS=-L${BLSURFPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome - BLSURFPLUGIN_CXXFLAGS=-I${BLSURFPLUGIN_DIR}/include/salome - else - AC_MSG_WARN("Cannot find compiled BLSURF mesh plugin distribution") - fi - else - AC_MSG_WARN("Cannot find compiled BLSURF mesh plugin distribution") + # search Salome binaries in PATH variable + AC_PATH_PROG(TEMP, libBLSURFEngine.so) + if test "x$TEMP" != "x" ; then + BLSURFPLUGIN_DIR=`dirname $TEMP` fi + + fi + fi -AC_MSG_RESULT(for BLSURF mesh plugin: $BLSURFplugin_ok) +if test -f ${BLSURFPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libBLSURFEngine.so ; then + BLSURFplugin_ok=yes + AC_MSG_RESULT(Using BLSURF mesh plugin distribution in ${BLSURFPLUGIN_DIR}) -AC_SUBST(BLSURFPLUGIN_ROOT_DIR) -AC_SUBST(BLSURFPLUGIN_LDFLAGS) -AC_SUBST(BLSURFPLUGIN_CXXFLAGS) + if test "x$BLSURFPLUGIN_ROOT_DIR" == "x" ; then + BLSURFPLUGIN_ROOT_DIR=${BLSURFPLUGIN_DIR} + fi + BLSURFPLUGIN_CXXFLAGS+=-I${BLSURFPLUGIN_ROOT_DIR}/include/salome + BLSURFPLUGIN_LDFLAGS+=-L${BLSURFPLUGIN_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome + AC_SUBST(BLSURFPLUGIN_ROOT_DIR) + AC_SUBST(BLSURFPLUGIN_LDFLAGS) + AC_SUBST(BLSURFPLUGIN_CXXFLAGS) +else + AC_MSG_WARN("Cannot find compiled BLSURF mesh plugin distribution") +fi + +AC_MSG_RESULT(for BLSURF mesh plugin: $BLSURFplugin_ok) ])dnl