summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Macks <dmacks@netspace.org>2008-08-13 11:32:41 -0400
committerLennart Poettering <lennart@poettering.net>2008-08-13 19:11:30 +0200
commit0f3825b0c40ca379e6b5d2e3e862130c8ccb65f5 (patch)
tree1de296ab8d4cf8d5ce9c51f3c8cfaa9d3a7121ec
parent72466d3b81203e4b87870943dcd84f7736db4cc0 (diff)
Non-portable linker flag
-version-script is an ELF/GNU-ld feature, not available with other linkers & platforms. Libtool already knows when to use it, so attached path just piggy-backs on their main test for this feature. I think they also exclude some other platforms, but this appears to work on linux (passes the flag, tested with libtool-1.5.22) with and OS X (doesn't pass it, tested with libtool-2.2.4). dan -- Daniel Macks dmacks@netspace.org http://www.netspace.org/~dmacks Signed-off-by: Lennart Poettering <lennart@poettering.net>
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am7
2 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6bdf009..decd2c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,6 +106,8 @@ esac
AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
+AM_CONDITIONAL(USE_VERSION_SCRIPT, test "x$supports_anon_versioning" = "xyes" )
+
###################################
# Basic environment checks #
###################################
diff --git a/src/Makefile.am b/src/Makefile.am
index 41713ec..198202b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,8 +60,11 @@ libcanberra_la_LIBADD = \
$(VORBIS_LIBS)
libcanberra_la_LDFLAGS = \
-export-dynamic \
- -version-info $(LIBCANBERRA_VERSION_INFO) \
- -Wl,-version-script=$(srcdir)/map-file
+ -version-info $(LIBCANBERRA_VERSION_INFO)
+
+if USE_VERSION_SCRIPT
+libcanberra_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
+endif
plugin_LTLIBRARIES =