]> www.ginac.de Git - ginac.git/commitdiff
configure: correctly set rpath for linking with CLN ...
authorAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Thu, 23 Feb 2012 13:16:55 +0000 (15:16 +0200)
committerAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Thu, 23 Feb 2012 13:16:55 +0000 (15:16 +0200)
... 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

index d5b3af5991326861b84bd1b35d50ca7008d90dae..fc64c215b5cd7a38779a5d53a64ce41543edf76c 100644 (file)
@@ -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