summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-11-21 14:04:29 +0800
committerDaniel Veillard <veillard@redhat.com>2012-11-21 14:04:29 +0800
commit2fbfdd5dbb08724e29e3331b846a30785542c7d1 (patch)
tree3f034827de3711a59ceaa365073051243e25944d
parentfcd73e8e48c0c48f7aa2a2c9ea374e9cc6423fd0 (diff)
downloadlibxslt-2fbfdd5dbb08724e29e3331b846a30785542c7d1.tar.gz
libxslt-2fbfdd5dbb08724e29e3331b846a30785542c7d1.tar.bz2
libxslt-2fbfdd5dbb08724e29e3331b846a30785542c7d1.zip
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.
-rw-r--r--configure.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 0d7ba866..db48224c 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