From 7cc2e8b349df28d55d5f40bfae323485df9f0cf2 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Fri, 16 Dec 2011 15:33:48 +0100 Subject: configure: add symbols versioning option Allow, at configure time, the production of versioned symbols. The symbols will look like "CURL__ ", where represents the SSL flavour (e.g. OPENSSL, GNUTLS, NSS, ...), is the major SONAME version and is the actual symbol name. If no SSL library is enabled the symbols will be just "CURL_ ". --- lib/Makefile.am | 6 +++++- lib/libcurl.vers.in | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 lib/libcurl.vers.in (limited to 'lib') 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: *; +}; -- cgit v1.2.3