about summary refs log tree commit diff stats
path: root/configure.ac
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-22 20:08:22 +0100
committerJames Booth <boothj5@gmail.com>2015-06-22 20:08:22 +0100
commitf81873824bb45158c8046dd6cefc1e8348c029cf (patch)
tree925fce3887fcd5b8e0f0c9f6998ed74789ebdfa5 /configure.ac
parent54df2101be63616121d8c6a67fcb37b2375a910c (diff)
downloadprofani-tty-f81873824bb45158c8046dd6cefc1e8348c029cf.tar.gz
Use gpgme-config
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index aefd028d..b8d1f866 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,7 +191,12 @@ fi
 AM_CONDITIONAL([BUILD_PGP], [false])
 if test "x$enable_pgp" != xno; then
     AC_CHECK_LIB([gpgme], [main],
-        [AM_CONDITIONAL([BUILD_PGP], [true]) LIBS="-lgpgme $LIBS" AC_DEFINE([HAVE_LIBGPGME], [1], [Have libgpgme])],
+        [AM_CONDITIONAL([BUILD_PGP], [true])
+         AC_DEFINE([HAVE_LIBGPGME], [1], [Have libgpgme])
+         AC_PATH_PROG([GPGME_CONFIG], [gpgme-config], ["failed"])
+         AS_IF([test "x$GPGME_CONFIG" = xfailed],
+            [LIBS="-lgpgme $LIBS"],
+            [LIBS="`$GPGME_CONFIG --libs` $LIBS" CFLAGS="`$GPGME_CONFIG --cflags` $CFLAGS"])],
         [AS_IF([test "x$enable_pgp" = xyes],
             [AC_MSG_ERROR([libgpgme is required for pgp support])],
             [AC_MSG_NOTICE([libgpgme not found, pgp support not enabled])])])