diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-05-24 14:12:14 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-05-24 14:12:14 +0000 |
commit | b7e56693a937f7fda5d825093bea8952c506ef8c (patch) | |
tree | 65e75812722becd10b02ebea3a47abd6c1a7837a | |
parent | 2c7897531693ea0ea85d5f9cfa57ed35a20b9208 (diff) | |
parent | b00f7d45428daf4d57829c779fffd5cf546793f8 (diff) | |
download | gnutls-b7e56693a937f7fda5d825093bea8952c506ef8c.tar.gz |
Merge branch 'tmp-avoid-libs-in-libsvar' into 'master'
Do not add libraries in the global LIBS in configure
Closes #735
See merge request gnutls/gnutls!1008
-rw-r--r-- | .gitlab-ci.yml | 1 | ||||
-rw-r--r-- | configure.ac | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfb16609d4..7fc747f5ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -462,6 +462,7 @@ ubsan-Werror.Fedora.x86_64: - ./bootstrap - CFLAGS="-std=c99 -fsanitize=undefined -fsanitize=bool -fsanitize=alignment -fsanitize=null -fsanitize=bounds-strict -fsanitize=enum -fno-sanitize-recover -g -O2" CXXFLAGS=$CFLAGS LDFLAGS="-static-libubsan" dash ./configure --cache-file cache/config.cache --disable-non-suiteb-curves --disable-guile --disable-full-test-suite --disable-doc + - grep "^LIBS=''" config.log || false - make -j$(nproc) -C gl - make -j$(nproc) -C lib CFLAGS="-Werror -O2 -g -Wimplicit-fallthrough=2" - make -j$(nproc) -C libdane CFLAGS="-Werror -O2 -g -Wimplicit-fallthrough=2" diff --git a/configure.ac b/configure.ac index 571ae4f7cc..2112606601 100644 --- a/configure.ac +++ b/configure.ac @@ -211,7 +211,10 @@ AC_CHECK_HEADERS([netinet/tcp.h]) AC_CHECK_HEADERS([stdatomic.h]) dnl This ensures that we link with the right library for atomic operations on Linux SPARC +save_LIBS=$LIBS AC_SEARCH_LIBS([__atomic_load_4], [atomic], [], [AC_MSG_NOTICE([Could not detect libatomic])]) +LIBS=$save_LIBS + AS_IF([test "$ac_cv_search___atomic_load_4" = "none required" || test "$ac_cv_search___atomic_load_4" = "no"], [AC_SUBST([LIBATOMIC_LIBS], [])], [AC_SUBST([LIBATOMIC_LIBS], [$ac_cv_search___atomic_load_4])]) @@ -370,6 +373,7 @@ AC_ARG_WITH(included-unistring, AS_HELP_STRING([--with-included-unistring], if test "$included_unistring" = yes;then ac_have_unistring=no else + save_LIBS=$LIBS AC_SEARCH_LIBS(u8_normalize, unistring, [ included_unistring=no ac_have_unistring=yes @@ -381,6 +385,7 @@ else *** Libunistring was not found. To use the included one, use --with-included-unistring ]]) ]) + LIBS=$save_LIBS fi AM_CONDITIONAL(HAVE_LIBUNISTRING, test "$ac_have_unistring" = "yes") @@ -506,7 +511,8 @@ idna_support=no with_libidn2=no if test "$try_libidn2" = yes;then - AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [ + save_LIBS=$LIBS + AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [ with_libidn2=yes; idna_support="IDNA 2008 (libidn2)" AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.]) @@ -522,8 +528,9 @@ dnl fi with_libidn2=no; AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support) ]) + LIBS=$save_LIBS else - with_libidn2=no + with_libidn2=no fi AM_CONDITIONAL(HAVE_LIBIDN2, test "$with_libidn2" != "no") |