diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2020-03-31 16:58:07 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2020-03-31 17:02:44 +0200 |
commit | e6e4de575452fd00f4cc402fc0f846741ebd33e3 (patch) | |
tree | 24759cd8d4e1a4253264084403db9e0e1639157b /configure.ac | |
parent | 5b595e8e52653f6c5726a4cdd8fddeb6e83804d2 (diff) | |
download | gnutls-e6e4de575452fd00f4cc402fc0f846741ebd33e3.tar.gz |
IDNA: require libidn2 2.0.0
We require private symbols which dissapear at some point in
IDN2 releases in order to support old versions of libidn2. Simplify
the code by requiring only recent versions and avoid issues such
as #832.
Resolves: #832
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 172cf429e4..79ee38cabe 100644 --- a/configure.ac +++ b/configure.ac @@ -559,26 +559,18 @@ idna_support=no with_libidn2=no if test "$try_libidn2" = yes;then - save_LIBS=$LIBS - AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [ - with_libidn2=yes; + PKG_CHECK_MODULES(LIBIDN2, [libidn2 >= 2.0.0], [with_libidn2=yes], [with_libidn2=no]) + if test "${with_libidn2}" = "yes";then idna_support="IDNA 2008 (libidn2)" AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.]) - AC_SUBST([LIBIDN2_CFLAGS], []) - AC_SUBST([LIBIDN2_LIBS], [-lidn2]) dnl used in gnutls.pc.in -dnl enable once libidn2.pc is widespread; and remove LIBIDN2_LIBS from gnutls.pc.in (Libs.private) -dnl if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then -dnl GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2" -dnl else -dnl GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2" -dnl fi - ],[ - with_libidn2=no; + if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then + GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2" + else + GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2" + fi + else AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support) - ]) - LIBS=$save_LIBS -else - with_libidn2=no + fi fi AM_CONDITIONAL(HAVE_LIBIDN2, test "$with_libidn2" != "no") |