From 9be0db743a6cf13713f7ff7c4560117a63de771d Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 19 Dec 2008 05:29:05 +0000 Subject: [PATCH] Issue 20080: replace error by warning message if the distene/blsurf mesher is not found. --- adm_local/unix/config_files/check_BLSURF.m4 | 68 ++++++++++----------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/adm_local/unix/config_files/check_BLSURF.m4 b/adm_local/unix/config_files/check_BLSURF.m4 index 264bfd2..cfe354a 100644 --- a/adm_local/unix/config_files/check_BLSURF.m4 +++ b/adm_local/unix/config_files/check_BLSURF.m4 @@ -37,69 +37,67 @@ AC_ARG_WITH(blsurf, BLSURF_ok=no -if test "$with_blsurf" == "no" ; then - AC_MSG_FAILURE(Cannot build without BLSURF) -elif test "$with_blsurf" == "yes" || test "$with_blsurf" == "auto"; then +if test "$with_blsurf" != "no" ; then + if test "$with_blsurf" == "yes" || test "$with_blsurf" == "auto"; then BLSURF_HOME="" -else + else BLSURF_HOME="$with_blsurf" -fi + fi -if test "$BLSURF_HOME" == "" ; then + if test "$BLSURF_HOME" == "" ; then if test "x$BLSURFHOME" != "x" ; then - BLSURF_HOME=$BLSURFHOME - else - AC_MSG_FAILURE(Cannot build without BLSURF. Use --with-blsurf option to define BLSURF installation.) + BLSURF_HOME=$BLSURFHOME fi -fi + fi -if test "x$BLSURF_HOME" != "x"; then + if test "x$BLSURF_HOME" != "x"; then - echo - echo ------------------------------------------------- - echo You are about to choose to use somehow the - echo BLSURF commercial product to generate 2D mesh. - echo + echo + echo ------------------------------------------------- + echo You are about to choose to use somehow the + echo BLSURF commercial product to generate 2D mesh. + echo - BLSURF_INCLUDES="-I$BLSURF_HOME/include" - BLSURF_LIBS="-L$BLSURF_HOME/lib -lBLSurf" + BLSURF_INCLUDES="-I$BLSURF_HOME/include" + BLSURF_LIBS="-L$BLSURF_HOME/lib -lBLSurf" - CPPFLAGS_old="$CPPFLAGS" - CXXFLAGS_old="$CXXFLAGS" - CPPFLAGS="$BLSURF_INCLUDES $CPPFLAGS" - CXXFLAGS="$BLSURF_INCLUDES $CXXFLAGS" + CPPFLAGS_old="$CPPFLAGS" + CXXFLAGS_old="$CXXFLAGS" + CPPFLAGS="$BLSURF_INCLUDES $CPPFLAGS" + CXXFLAGS="$BLSURF_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 + 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_old="$LDFLAGS" + LDFLAGS="-L. -$BLSURF_LIBS $LDFLAGS" - AC_TRY_LINK( + AC_TRY_LINK( #include "distene/api.h", BLSURF_init();, BLSURF_ok=yes,BLSURF_ok=no ) - LDFLAGS="$LDFLAGS_old" + LDFLAGS="$LDFLAGS_old" - AC_MSG_RESULT($BLSURF_ok) - fi + AC_MSG_RESULT($BLSURF_ok) + fi - CPPFLAGS="$CPPFLAGS_old" - CXXFLAGS="$CXXFLAGS_old" + CPPFLAGS="$CPPFLAGS_old" + CXXFLAGS="$CXXFLAGS_old" + fi 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_FAILURE(Cannot build without BLSURF. Use --with-blsurf option to define BLSURF installation.) + AC_MSG_WARN(Cannot build without BLSURF. Use --with-blsurf option to define BLSURF installation.) else AC_MSG_RESULT(for BLSURF: yes) fi -- 2.39.2