From 2fbfdd5dbb08724e29e3331b846a30785542c7d1 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Wed, 21 Nov 2012 14:04:29 +0800 Subject: 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 file changed, 7 insertions(+), 4 deletions(-) (limited to 'configure.in') 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 -- cgit v1.2.3