From: vsr Date: Wed, 23 Mar 2011 12:32:53 +0000 (+0000) Subject: Fix bugs of CHECK_BLSURF procedure X-Git-Tag: Start_BR_19998_21191~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e22d038f6ed687a6ab8c3c27986967b4e34dfde4;p=plugins%2Fblsurfplugin.git Fix bugs of CHECK_BLSURF procedure --- diff --git a/adm_local/unix/config_files/check_BLSURF.m4 b/adm_local/unix/config_files/check_BLSURF.m4 index 42dbe79..4a35122 100644 --- a/adm_local/unix/config_files/check_BLSURF.m4 +++ b/adm_local/unix/config_files/check_BLSURF.m4 @@ -25,15 +25,15 @@ AC_DEFUN([CHECK_BLSURF],[ AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_PROG_CXXCPP])dnl -AC_CHECKING(for BLSURF commercial product) +AC_CHECKING([for BLSURF commercial product]) AC_LANG_SAVE -AC_LANG_CPLUSPLUS +AC_LANG_C BLSURF_INCLUDES="" BLSURF_LIBS="" -AC_ARG_WITH(blsurf, +AC_ARG_WITH([blsurf], [ --with-blsurf=DIR root directory path of BLSURF installation]) BLSURF_ok=no @@ -59,39 +59,39 @@ if test "$with_blsurf" != "no" ; then echo BLSURF commercial product to generate 2D mesh. echo - BLSURF_INCLUDES="-I$BLSURF_HOME/include" - BLSURF_LIBS="-L$BLSURF_HOME/lib -lBLSurf" + LOCAL_INCLUDES="-I$BLSURF_HOME/include" + LOCAL_LIBS="-L$BLSURF_HOME/lib -lBLSurf" if test $(/bin/arch) = x86_64 ; then if test -f $BLSURF_HOME/lib/Linux_64/libBLSurf.so ; then - BLSURF_LIBS="-L$BLSURF_HOME/lib/Linux_64 -lBLSurf" + LOCAL_LIBS="-L$BLSURF_HOME/lib/Linux_64 -lBLSurf" fi fi CPPFLAGS_old="$CPPFLAGS" CXXFLAGS_old="$CXXFLAGS" - CPPFLAGS="$BLSURF_INCLUDES $CPPFLAGS" - CXXFLAGS="$BLSURF_INCLUDES $CXXFLAGS" + CPPFLAGS="$LOCAL_INCLUDES $CPPFLAGS" + CXXFLAGS="$LOCAL_INCLUDES $CXXFLAGS" - AC_MSG_CHECKING(for BLSURF header file) + AC_MSG_CHECKING([for BLSURF header file]) - AC_CHECK_HEADER(distene/api.h,BLSURF_ok=yes,BLSURF_ok=no) + AC_CHECK_HEADER([distene/api.h],[BLSURF_ok=yes],[BLSURF_ok=no]) if test "x$BLSURF_ok" == "xyes"; then - AC_MSG_CHECKING(for BLSURF library) + AC_MSG_CHECKING([for BLSURF library]) LDFLAGS_old="$LDFLAGS" - LDFLAGS="-L. -$BLSURF_LIBS $LDFLAGS" + LDFLAGS="-L. $LOCAL_LIBS $LDFLAGS" AC_TRY_LINK( - #include "distene/api.h", - BLSURF_init();, - BLSURF_ok=yes,BLSURF_ok=no + [#include "distene/api.h"], + [distene_context_new()], + [BLSURF_ok=yes],[BLSURF_ok=no] ) LDFLAGS="$LDFLAGS_old" - AC_MSG_RESULT($BLSURF_ok) + AC_MSG_RESULT([$BLSURF_ok]) fi CPPFLAGS="$CPPFLAGS_old" @@ -101,11 +101,13 @@ if test "$with_blsurf" != "no" ; then fi if test "x$BLSURF_ok" == xno ; then - AC_MSG_RESULT(for BLSURF: no) - AC_MSG_WARN(BLSURF includes or libraries are not found or are not properly installed) - AC_MSG_WARN(Cannot build without BLSURF. Use --with-blsurf option to define BLSURF installation.) + AC_MSG_RESULT([for BLSURF: no]) + AC_MSG_WARN([BLSURF includes or libraries are not found or are not properly installed]) + AC_MSG_WARN([Cannot build without BLSURF. Use --with-blsurf option to define BLSURF installation.]) else - AC_MSG_RESULT(for BLSURF: yes) + BLSURF_INCLUDES=$LOCAL_INCLUDES + BLSURF_LIBS=$LOCAL_LIBS + AC_MSG_RESULT([for BLSURF: yes]) fi AC_SUBST(BLSURF_INCLUDES)