Commit 203a013d13a90f29b46252aa234f3af31828257d
1 parent
99d95816
Correct test if library can be dlopen()ed.
The test for dlopen()ing libgomp.so.1 failed because for some reason the test code did not find the GammaLib shared library. I'm not sure why this happened. To make the test work, the LIBS variable is now set explicitely to the library we need for the test (-ldl), excluding the GammaLib shared library. This allows the test to suceed.
Showing
1 changed file
with
4 additions
and
4 deletions
configure.ac
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 29 | ############################################################################# |
| 30 | 30 | # Initialisation # |
| 31 | 31 | ############################################################################# |
| 32 | -AC_INIT([ctools], [0.5.1], [jurgen.knodlseder@irap.omp.eu], [ctools]) | |
| 32 | +AC_INIT([ctools], [0.5.2], [jurgen.knodlseder@irap.omp.eu], [ctools]) | |
| 33 | 33 | AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) |
| 34 | 34 | AC_CONFIG_MACRO_DIR([m4]) |
| 35 | 35 | AM_INIT_AUTOMAKE([gnu no-dependencies]) |
| ... | ... | @@ -763,8 +763,8 @@ if test "x$openmp_ok" = "xyes"; then |
| 763 | 763 | # dynamically |
| 764 | 764 | if test "$OPENMP_CXXFLAGS" = "-fopenmp" -a "$ac_sys_system" = "Linux"; then |
| 765 | 765 | AC_MSG_CHECKING(whether we can dynamically load libgomp) |
| 766 | - SAVED_LDFLAGS=$LDFLAGS | |
| 767 | - LDFLAGS="$LDFLAGS -ldl" | |
| 766 | + SAVED_LIBS=$LIBS | |
| 767 | + LIBS="-ldl" | |
| 768 | 768 | AC_TRY_RUN(AC_LANG_PROGRAM([#include <dlfcn.h>], |
| 769 | 769 | [if (dlopen("libgomp.so.1", RTLD_NOW) == 0) return 1;]), |
| 770 | 770 | [AC_MSG_RESULT(yes)], |
| ... | ... | @@ -772,7 +772,7 @@ if test "x$openmp_ok" = "xyes"; then |
| 772 | 772 | AC_MSG_RESULT(no) |
| 773 | 773 | AC_MSG_WARN([OpenMP detected but shared libgomp.so.1 library cannot be dlopen()ed.]) |
| 774 | 774 | AC_MSG_WARN([If you use a gcc 4.2.x compiler, this is a known feature. Try to use gcc >= 4.3.])]) |
| 775 | - LDFLAGS=$SAVED_LDFLAGS | |
| 775 | + LIBS=$SAVED_LIBS | |
| 776 | 776 | fi |
| 777 | 777 | |
| 778 | 778 | # Special Darwin test to see whether OpenMP compiles without adding the | ... | ... |