autoconf: improve handling of versioned symbols
It checks 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.
This commit is contained in:

committed by
Daniel Stenberg

parent
03c1bcf4bd
commit
e315927a1a
22
configure.ac
22
configure.ac
@@ -2387,25 +2387,20 @@ dnl **********************************************************************
|
|||||||
dnl Check for linker switch for versioned symbols
|
dnl Check for linker switch for versioned symbols
|
||||||
dnl **********************************************************************
|
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=
|
versioned_symbols_flavour=
|
||||||
|
AC_MSG_CHECKING([whether versioned symbols are wanted])
|
||||||
AC_ARG_ENABLE(versioned-symbols,
|
AC_ARG_ENABLE(versioned-symbols,
|
||||||
AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
|
AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
|
||||||
AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
|
AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
|
||||||
[ case "$enableval" in
|
[ case "$enableval" in
|
||||||
yes) AC_MSG_RESULT(yes)
|
yes) AC_MSG_RESULT(yes)
|
||||||
|
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
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
if test "x$OPENSSL_ENABLED" = "x1"; then
|
if test "x$OPENSSL_ENABLED" = "x1"; then
|
||||||
versioned_symbols_flavour="OPENSSL_"
|
versioned_symbols_flavour="OPENSSL_"
|
||||||
elif test "x$GNUTLS_ENABLED" == "x1"; then
|
elif test "x$GNUTLS_ENABLED" == "x1"; then
|
||||||
@@ -2422,6 +2417,7 @@ AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shar
|
|||||||
versioned_symbols_flavour=""
|
versioned_symbols_flavour=""
|
||||||
fi
|
fi
|
||||||
versioned_symbols="yes"
|
versioned_symbols="yes"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) AC_MSG_RESULT(no)
|
*) AC_MSG_RESULT(no)
|
||||||
|
Reference in New Issue
Block a user