summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-07-17 14:18:07 +0200
committerDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-07-17 14:18:07 +0200
commit673112b192a9494ea96f7daca061b080db5d3977 (patch)
tree02c53b22e1810a8f36e591f5af8c04f37f9ced2f /configure.ac
parent7e4509f9e5a1add8bd7efaf69cefd35a291b6253 (diff)
Check for support of -z nodelete LD flag, don't use it unconditionally.
On non-GNU, non-Sun linkers, the -z option is often not understood; make sure that the -z nodelete option is usable before making use of it. Unbreaks build on Mac OS X.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cc7f674a..112a1a8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,15 @@ dnl other linkes might be added later
CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"])
AC_SUBST([IMMEDIATE_LDFLAGS])
+dnl On ELF systems we don't want the libraries to be unloaded since we
+dnl don't clean them up properly, so we request the nodelete flag to be
+dnl enabled.
+dnl
+dnl On other systems, we don't really know how to do that, but it's
+dnl welcome if somebody can tell.
+CC_CHECK_LDFLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS="-Wl,-z,nodelete"])
+AC_SUBST([NODELETE_LDFLAGS])
+
dnl Check for the proper way to build libraries that have no undefined
dnl symbols; on some hosts this needs to be avoided but the macro
dnl takes care of it.