summaryrefslogtreecommitdiff
path: root/configure.ac
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 /configure.ac
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 'configure.ac')
-rw-r--r--configure.ac55
1 files changed, 55 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3e95b0cdc..cc7f88897 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2347,6 +2347,60 @@ if test X"$OPT_LIBRTMP" != Xno; then
fi
dnl **********************************************************************
+dnl Check for linker switch for versioned symbols
+dnl **********************************************************************
+
+AC_MSG_CHECKING([if libraries can be versioned])
+GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+if test -z "$GLD"; then
+ versioned_symbols_flavour=
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(***
+*** You need an ld version supporting the --version-script option.
+)
+else
+ AC_MSG_RESULT(yes)
+
+AC_MSG_CHECKING([whether versioned symbols are wanted])
+versioned_symbols_flavour=
+
+AC_ARG_ENABLE(versioned-symbols,
+AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
+AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
+[ case "$enableval" in
+ yes) AC_MSG_RESULT(yes)
+ if test "x$OPENSSL_ENABLED" = "x1"; then
+ versioned_symbols_flavour="OPENSSL_"
+ elif test "x$GNUTLS_ENABLED" == "x1"; then
+ versioned_symbols_flavour="GNUTLS_"
+ elif test "x$NSS_ENABLED" == "x1"; then
+ versioned_symbols_flavour="NSS_"
+ elif test "x$POLARSSL_ENABLED" == "x1"; then
+ versioned_symbols_flavour="POLARSSL_"
+ elif test "x$CYASSL_ENABLED" == "x1"; then
+ versioned_symbols_flavour="CYASSL_"
+ elif test "x$AXTLS_ENABLED" == "x1"; then
+ versioned_symbols_flavour="AXTLS_"
+ else
+ versioned_symbols_flavour=""
+ fi
+ versioned_symbols="yes"
+ ;;
+
+ *) AC_MSG_RESULT(no)
+ ;;
+ esac
+], [
+AC_MSG_RESULT(no)
+]
+)
+fi
+
+AC_SUBST(VERSIONED_FLAVOUR, ["$versioned_symbols_flavour"])
+AM_CONDITIONAL(VERSIONED_SYMBOLS, test "x$versioned_symbols" = "xyes")
+
+
+dnl **********************************************************************
dnl Check for the presence of IDN libraries and headers
dnl **********************************************************************
@@ -3215,6 +3269,7 @@ AC_CONFIG_FILES([Makefile \
include/curl/Makefile \
src/Makefile \
lib/Makefile \
+ lib/libcurl.vers \
tests/Makefile \
tests/data/Makefile \
tests/server/Makefile \