aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-01-04 20:47:43 +0000
committerGuy Harris <guy@alum.mit.edu>2007-01-04 20:47:43 +0000
commit405b7189a4587fdf8485eb971f6b738f4fc6cc7b (patch)
treea8ca17cdf9f246ffb3769fa63006df977791889e /configure.in
parentb556ad58bb5d94c1191142f2134d488e66f6b17a (diff)
On Darwin, build shared libraries with -Wl,-single_module to the LDFLAGS
used with shared libraries, to fix some error that shows up in some cases; some Apple documentation recommends it for most shared libraries. svn path=/trunk/; revision=20312
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index e13c94d6c9..cdcc48d1fc 100644
--- a/configure.in
+++ b/configure.in
@@ -236,6 +236,13 @@ AC_MSG_CHECKING(for platform-specific linker flags)
case "$host_os" in
darwin*)
#
+ # Add -Wl,-single_module to the LDFLAGS used with shared
+ # libraries, to fix some error that show up in some cases;
+ # some Apple documentation recommends it for most shared
+ # libraries.
+ #
+ SHAREDLIB_LDFLAGS="-Wl,-single_module"
+ #
# Add -Wl,-search_paths_first to make sure that if we search
# directories A and B, in that order, for a given library, a
# non-shared version in directory A, rather than a shared
@@ -245,7 +252,7 @@ darwin*)
# the system version in /usr/lib).
#
LDFLAGS="-Wl,-search_paths_first $LDFLAGS"
- AC_MSG_RESULT(Apple linker - added -Wl,-search_paths_first)
+ AC_MSG_RESULT(Apple linker - added -Wl,-single_module and -Wl,-search_paths_first)
;;
cygwin*)
#
@@ -259,6 +266,7 @@ cygwin*)
AC_MSG_RESULT(none needed)
;;
esac
+AC_SUBST(SHAREDLIB_LDFLAGS)
#
# On OS X, if we find the headers for Core Foundation and Launch Services,