Hello list,
I have attached a small patch to autoconf.ac that modifies the part
called
"Check for linker switch for versioned symbols". It can also be seen on
GitHub at [1].
What it does is check whether versioned symbols should be enabled
before
checking whether it is possible (i.e. the linker supports
--version-script)
or not. This avoids a useless warning when building cURL on a platform
that
does not use GNU ld.
Moreover, it fixes broken indentation of this chunk of code.
As far as I know this change is innocuous, but I am far from being an
autoconf expert, so please do not hesitate to suggest modifications.
[1]
https://github.com/catwell/curl/commit/54da2068387cdb7ade8fbb12da8dfa8124ba5c4b
--
Pierre Chapuis
From 54da2068387cdb7ade8fbb12da8dfa8124ba5c4b Mon Sep 17 00:00:00 2001
From: Pierre Chapuis <[email protected]>
Date: Thu, 10 May 2012 18:50:51 +0200
Subject: [PATCH] autoconf: improve handling of versioned symbols
---
configure.ac | 50 +++++++++++++++++++++++---------------------------
1 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/configure.ac b/configure.ac
index 89f26f4..966273d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2387,41 +2387,37 @@ 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_MSG_CHECKING([whether versioned symbols are wanted])
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_"
+ AC_MSG_CHECKING([if libraries can be versioned])
+ GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+ if test -z "$GLD"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([You need an ld version supporting the --version-script option])
else
- versioned_symbols_flavour=""
+ 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"
fi
- versioned_symbols="yes"
;;
*) AC_MSG_RESULT(no)
--
1.7.3.5
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html