From 2a3de8b4b01c11fdbf49c174833422b1cf55eee8 Mon Sep 17 00:00:00 2001 From: schrotthaufen Date: Wed, 3 Jul 2024 01:01:00 +0200 Subject: [PATCH 1/2] Replace libgcrypt-config with pkg-config Libgcrypt 1.11.0 deprecated libgcrypt-config in favor for gpgrt-config, which doesn't emit -lgcrypt. pkg-config does, though. See also: * https://dev.gnupg.org/T7165 * https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=2db5b5e995c21c5bd9cd193c2ed1109ba9b1a440 This should fix #5405 --- configure.ac | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 0671fa32ca..a52278ddb4 100644 --- a/configure.ac +++ b/configure.ac @@ -1181,19 +1181,15 @@ AC_ARG_ENABLE(libgcrypt, [enable_libgcrypt=yes] ) if test "x$enable_libgcrypt" = "xyes"; then - AC_PATH_PROG([LIBGCRYPT_CONFIG],[libgcrypt-config],[no]) - if test "x${LIBGCRYPT_CONFIG}" = "xno"; then - AC_MSG_FAILURE([libgcrypt-config not found in PATH]) - fi AC_CHECK_LIB( - [gcrypt], - [gcry_cipher_open], - [LIBGCRYPT_CFLAGS="`${LIBGCRYPT_CONFIG} --cflags`" - LIBGCRYPT_LIBS="`${LIBGCRYPT_CONFIG} --libs`" - ], - [AC_MSG_FAILURE([libgcrypt is missing])], - [`${LIBGCRYPT_CONFIG} --libs --cflags`] - ) + [gcrypt], + [gcry_cipher_open], + [LIBGCRYPT_CFLAGS="`pkg-config --cflags libgcrypt`" + LIBGCRYPT_LIBS="`pkg-config --libs libgcrypt`" + ], + [AC_MSG_FAILURE([libgcrypt is missing])], + [`pkg-config --libs --cflags libgcrypt`] + ) AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present]) fi AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes) From 9613354dbeeb36c9a55db98a05f130c160fd4c60 Mon Sep 17 00:00:00 2001 From: schrotthaufen Date: Thu, 4 Jul 2024 18:03:50 +0200 Subject: [PATCH 2/2] Add missing libraries to pkg-config call --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index a52278ddb4..f5af471695 100644 --- a/configure.ac +++ b/configure.ac @@ -1184,11 +1184,11 @@ if test "x$enable_libgcrypt" = "xyes"; then AC_CHECK_LIB( [gcrypt], [gcry_cipher_open], - [LIBGCRYPT_CFLAGS="`pkg-config --cflags libgcrypt`" - LIBGCRYPT_LIBS="`pkg-config --libs libgcrypt`" + [LIBGCRYPT_CFLAGS="`pkg-config --cflags libgcrypt gpg-error`" + LIBGCRYPT_LIBS="`pkg-config --libs libgcrypt gpg-error`" ], [AC_MSG_FAILURE([libgcrypt is missing])], - [`pkg-config --libs --cflags libgcrypt`] + [`pkg-config --libs --cflags libgcrypt gpg-error`] ) AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present]) fi