aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2011-05-19 02:50:54 +0000
committerRob Austein <sra@hactrn.net>2011-05-19 02:50:54 +0000
commit4fed8aad3862d0d64066fe9a0dbee96c1d03f098 (patch)
tree5be7b0c6b8e88cdc0e1e229e8142a810fafbd44b /configure.ac
parent46cf2621a1311730d9b4501a4219456942224175 (diff)
Turn on -Bsymbolic where supported, per suggestion from Andy Polyakov.
svn path=/configure; revision=3820
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e88ef987..2158c102 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,9 +74,25 @@ case $host_os in
freebsd*) LD_STATIC_FLAG='-static';;
*) LD_STATIC_FLAG='';;
esac
-
AC_SUBST(LD_STATIC_FLAG)
+AC_MSG_CHECKING([whether compiler and linker support -Wl,-Bsymbolic])
+old_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+AC_LINK_IFELSE([AC_LANG_SOURCE([[int main (int argc, char *argv[]) { return 0; }]])],
+ [linker_supports_Bsymbolic=yes],
+ [linker_supports_Bsymbolic=no])
+AC_MSG_RESULT([$linker_supports_Bsymbolic])
+LDFLAGS="$old_LDFLAGS"
+unset old_LDFLAGS
+if test $linker_supports_Bsymbolic = yes
+then
+ POW_LDFLAGS='-Wl,-Bsymbolic'
+else
+ POW_LDFLAGS=''
+fi
+AC_SUBST(POW_LDFLAGS)
+
AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_PATH_PROG([AWK], [awk])
AC_PATH_PROG([SORT], [sort])