From 563a08c635e0ad6afc53978e6029e4c77f9021e7 Mon Sep 17 00:00:00 2001 From: gdd Date: Wed, 26 Oct 2011 13:29:51 +0000 Subject: [PATCH] Fix detection of BLSURF libraries in m4 macro (didn't work on Ubuntu 11.10) --- adm_local/unix/config_files/check_BLSURF.m4 | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/adm_local/unix/config_files/check_BLSURF.m4 b/adm_local/unix/config_files/check_BLSURF.m4 index cab4337..91c1a05 100644 --- a/adm_local/unix/config_files/check_BLSURF.m4 +++ b/adm_local/unix/config_files/check_BLSURF.m4 @@ -28,7 +28,7 @@ AC_REQUIRE([AC_PROG_CXXCPP])dnl AC_CHECKING([for BLSURF commercial product]) AC_LANG_SAVE -AC_LANG_C +AC_LANG_CPLUSPLUS BLSURF_INCLUDES="" BLSURF_LIBS="" @@ -60,14 +60,13 @@ if test "$with_blsurf" != "no" ; then echo LOCAL_INCLUDES="-I$BLSURF_HOME/include" - LOCAL_LIBS="-L$BLSURF_HOME/lib -lBLSurf -lPreCAD" + LOCAL_LIBS="-L$BLSURF_HOME/lib/Linux" if test $(`which arch`) = x86_64 ; then - if test -f $BLSURF_HOME/lib/Linux_64/libBLSurf.so ; then - LOCAL_LIBS="-L$BLSURF_HOME/lib/Linux_64 -lBLSurf -ldistene" - if test -f $BLSURF_HOME/lib/Linux_64/libPreCAD.so ; then - LOCAL_LIBS="${LOCAL_LIBS} -lPreCAD" - fi - fi + LOCAL_LIBS="-L$BLSURF_HOME/lib/Linux_64" + fi + LOCAL_LIBS="${LOCAL_LIBS} -lBLSurf -ldistene" + if test -f ${LOCAL_LIBS}/libPreCAD.so ; then + LOCAL_LIBS="${LOCAL_LIBS} -lPreCAD" fi CPPFLAGS_old="$CPPFLAGS" @@ -83,16 +82,17 @@ if test "$with_blsurf" != "no" ; then AC_MSG_CHECKING([for BLSURF library]) - LDFLAGS_old="$LDFLAGS" - LDFLAGS="-L. $LOCAL_LIBS $LDFLAGS" + LIBS_old="$LIBS" + LIBS="-L. $LOCAL_LIBS $LIBS" AC_TRY_LINK( - [#include "distene/api.h"], - [distene_context_new()], - [BLSURF_ok=yes],[BLSURF_ok=no] +extern "C" { +#include "distene/api.h" +}, distene_context_new(), + BLSURF_ok=yes,BLSURF_ok=no ) - LDFLAGS="$LDFLAGS_old" + LIBS="$LIBS_old" AC_MSG_RESULT([$BLSURF_ok]) fi -- 2.39.2