From 012ea7fa628fe97e72469af6b6703515eee24d3a Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Thu, 23 Feb 2012 15:16:55 +0200 Subject: [PATCH 1/1] configure: correctly set rpath for linking with CLN ... ... as to not break tests for libreadline and dlopen(). Problem: When using GCC 4.6 the configure script fails to find libreadline and libdl, although both libraries are definitely installed. See http://www.ginac.de/pipermail/ginac-list/2012-January/001868.html for more details. Reason: Apparently GCC 4.6 dislikes the -R/the/path switch (libtool way to say -Wl,-rpath,/the/path in a cross platform manner). Previous versions of GCC used to ignore the -R switch, however, GCC 4.6 errors out instead. Thus the configure script fails to detect readline and dlopen. Solution: Set the rpath (for linking with CLN) using the compiler friendly syntax (i.e. -Wl,-rpath -Wl,/the/path instead of -R/the/path). --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d5b3af59..fc64c215 100644 --- a/configure.ac +++ b/configure.ac @@ -84,7 +84,7 @@ GINAC_STD_CXX_HEADERS dnl We need to have CLN installed. PKG_CHECK_MODULES(CLN, cln >= 1.2.2) -AC_LIB_LINKFLAGS_FROM_LIBS([CLN_RPATH], [$CLN_LIBS], [1]) +AC_LIB_LINKFLAGS_FROM_LIBS([CLN_RPATH], [$CLN_LIBS]) LIBS="$LIBS $CLN_LIBS $CLN_RPATH" CPPFLAGS="$CPPFLAGS $CLN_CFLAGS" dnl Include proper rpath into pkg-config meta data, so -- 2.44.0