From 35c6a78f3b24bf4192e3f01ee6322b42b6fc27fb Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 15 Feb 2017 18:42:22 +0100 Subject: [PATCH] gnutls.pc: do not include libidn2 in Requires.private The libidn2 versions available do not include libidn2.pc, thus the inclusion was causing problems when using pkg-config. Instead we include -lidn2 in Libs.private. Signed-off-by: Nikos Mavrogiannopoulos --- configure.ac | 12 +++++++----- lib/gnutls.pc.in | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 6907b215f..4cad4fa3a 100644 --- a/configure.ac +++ b/configure.ac @@ -492,11 +492,13 @@ if test "$try_libidn" = yes;then idna_support="IDNA 2008 (libidn2)" AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.]) AC_SUBST([LIBIDN_LIBS], [-lidn2]) - if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then - GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2" - else - GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2" - fi + 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; AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support) diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in index 441b45db0..c03757928 100644 --- a/lib/gnutls.pc.in +++ b/lib/gnutls.pc.in @@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system URL: http://www.gnutls.org/ Version: @VERSION@ Libs: -L${libdir} -lgnutls -Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBNSL@ @LTLIBPTHREAD@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LTLIBUNISTRING@ +Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBNSL@ @LTLIBPTHREAD@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LTLIBUNISTRING@ @LIBIDN2_LIBS@ @GNUTLS_REQUIRES_PRIVATE@ Cflags: -I${includedir} -- 2.11.1