summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2011-12-16 15:33:48 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-12-19 23:25:36 +0100
commit7cc2e8b349df28d55d5f40bfae323485df9f0cf2 (patch)
tree9f79d8c47d6fc05ae52b8a92e9b33c5e5e91baa0 /lib
parent3c18b38dcc59cbb4f62b48cc4d7004f6bccffc37 (diff)
downloadcurl-7cc2e8b349df28d55d5f40bfae323485df9f0cf2.tar.gz
configure: add symbols versioning option
Allow, at configure time, the production of versioned symbols. The symbols will look like "CURL_<FLAVOUR>_<VERSION> <SYMBOL>", where <FLAVOUR> represents the SSL flavour (e.g. OPENSSL, GNUTLS, NSS, ...), <VERSION> is the major SONAME version and <SYMBOL> is the actual symbol name. If no SSL library is enabled the symbols will be just "CURL_<VERSION> <SYMBOL>".
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am6
-rw-r--r--lib/libcurl.vers.in13
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f2e54db95..d764274fc 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -116,7 +116,11 @@ if MIMPURE
MIMPURE = -mimpure-text
endif
-libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
+if VERSIONED_SYMBOLS
+VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
+endif
+
+libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(VERSIONED_SYMBOLS) $(LIBCURL_LIBS)
# unit testing static library built only along with unit tests
if BUILD_UNITTESTS
diff --git a/lib/libcurl.vers.in b/lib/libcurl.vers.in
new file mode 100644
index 000000000..8294557b8
--- /dev/null
+++ b/lib/libcurl.vers.in
@@ -0,0 +1,13 @@
+HIDDEN
+{
+ local:
+ __*;
+ _rest*;
+ _save*;
+};
+
+CURL_@VERSIONED_FLAVOUR@4
+{
+ global: curl_*;
+ local: *;
+};