Commit 0d0dff7d4c30c1f73e61eadb14a817e463b04e7e

Authored by Jürgen Knödlseder
1 parent 1e930108

Use LIBS instead of LD_FLAGS for dlopen() test.

On Ubuntu, the dlopen() test did not suceed, probably due to a wrong ordering of the compile flags (see Bug #548). Correctly, the LIBS environment variable should be used to specify the -ldl library (as in ctools). This has been corrected.
Showing 1 changed file with 3 additions and 3 deletions
configure.ac
... ... @@ -659,8 +659,8 @@ if test "x$openmp_ok" = "xyes" ; then
659 659 # dynamically
660 660 if test "$OPENMP_CXXFLAGS" = "-fopenmp" -a "$ac_sys_system" = "Linux"; then
661 661 AC_MSG_CHECKING(whether we can dynamically load libgomp)
662   - SAVED_LDFLAGS=$LDFLAGS
663   - LDFLAGS="$LDFLAGS -ldl"
  662 + SAVED_LIBS=$LIBS
  663 + LIBS="-ldl"
664 664 AC_TRY_RUN(AC_LANG_PROGRAM([#include <dlfcn.h>],
665 665 [if (dlopen("libgomp.so.1", RTLD_NOW) == 0) return 1;]),
666 666 [AC_MSG_RESULT(yes)],
... ... @@ -668,7 +668,7 @@ if test &quot;x$openmp_ok&quot; = &quot;xyes&quot; ; then
668 668 AC_MSG_RESULT(no)
669 669 AC_MSG_WARN([OpenMP detected but shared libgomp.so.1 library cannot be dlopen()ed.])
670 670 AC_MSG_WARN([If you use a gcc 4.2.x compiler, this is a known feature. Try to use gcc >= 4.3.])])
671   - LDFLAGS=$SAVED_LDFLAGS
  671 + LIBS=$SAVED_LIBS
672 672 fi
673 673  
674 674 # Special Darwin test to see whether OpenMP compiles without adding the
... ...