]> git.notmuchmail.org Git - notmuch/commitdiff
configure: use pkg-config for gpgme
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 2 Nov 2022 16:15:12 +0000 (12:15 -0400)
committerDavid Bremner <david@tethera.net>
Tue, 10 Jan 2023 12:29:23 +0000 (08:29 -0400)
GnuPG upstream has supported pkg-config since gpgme version 1.13 and
gpg-error 1.33, and now prefers the use of pkg-config by default,
instead of relying on gpg-error-config and gpgme-config.

As of libgpg-error 1.46, upstream deliberately does not ship
gpg-error-config by default.  As of gpgme 1.18.0, upstream does not
ship gpgme-config if gpg-error-config is also not present.

Both of these versions of upstream libraries are in debian unstable
now.  To the extent that notmuch is dependent on GnuPG, it should
follow GnuPG upstream's lead.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
configure

index be69b34d87e967dc7ca7b26b45f1564e343fd58e..c3629a73a4f3536993329ab1770a6622ab6fcb93 100755 (executable)
--- a/configure
+++ b/configure
@@ -541,8 +541,8 @@ version of GPGME.
 Please try to rebuild your version of GMime against a more recent
 version of GPGME (at least GPGME 1.8.0).
 EOF
-       if command -v gpgme-config >/dev/null; then
-           printf 'Your current GPGME development version is: %s\n' "$(gpgme-config --version)"
+       if GPGME_VERS="$(pkg-config --modversion gpgme || gpgme-config --version)"; then
+           printf 'Your current GPGME development version is: %s\n' "$GPGME_VERS"
        else
            printf 'You do not have the GPGME development libraries installed.\n'
        fi