[libxslt] configure should be more careful with linker script



commit 2fbfdd5dbb08724e29e3331b846a30785542c7d1
Author: Igor Pashev <pashev igor gmail com>
Date:   Wed Nov 21 14:04:29 2012 +0800

    configure should be more careful with linker script
    
    For https://bugzilla.gnome.org/show_bug.cgi?id=685626
    
    it would assume the system linker for extracting the linker
    script options, even if GNU ld is in use. Which breaks on Solaris.

 configure.in |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0d7ba86..db48224 100644
--- a/configure.in
+++ b/configure.in
@@ -130,13 +130,16 @@ dnl
 dnl if the system support linker version scripts for symbol versioning
 dnl then add it
 dnl
-VERSION_SCRIPT_FLAGS=
-$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \
+AC_MSG_CHECKING([how to pass version script to the linker ($LD)])
+VERSION_SCRIPT_FLAGS=none
+if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then
     VERSION_SCRIPT_FLAGS=-Wl,--version-script=
-test "`uname`" = "SunOS" && \
+elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then
     VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
+fi
+AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
 AC_SUBST(VERSION_SCRIPT_FLAGS)
-AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
+AM_CONDITIONAL([USE_VERSION_SCRIPT], [test "$VERSION_SCRIPT_FLAGS" != none])
 
 dnl Look for pthread.h, needed for testThreads
 case $host in



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]