From b8466e5ec141ab9c1d34fb594c84970941235b1a Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Tue, 2 Jul 2013 15:33:55 +0000 Subject: [PATCH] Add in --with-gpg configure option to allow user to specify the path to gpg v1.x (which gpgme still needs to know if compiled for both but uses gpg2 by default) --- config.m4 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config.m4 b/config.m4 index f7d1873..ee878a1 100644 --- a/config.m4 +++ b/config.m4 @@ -42,3 +42,24 @@ if test "$PHP_GNUPG" != "no"; then PHP_NEW_EXTENSION(gnupg, [gnupg.c gnupg_keylistiterator.c], $ext_shared) fi + +AC_ARG_WITH([gpg], [AS_HELP_STRING([--with-gpg], + [path to gpg v1.x])], [], [with_gpg=no]) + +AC_PATH_PROG(GNUPG_PATH, gpg) +if test "$with_gpg" != "no"; then + if test "$with_gpg" != "yes"; then + if test -x "$with_gpg"; then + ac_cv_path_GNUPG_PATH=$with_gpg + else + if test -x "$ac_cv_path_GNUPG_PATH"; then + AC_MSG_RESULT($with_gpg invalid: using $ac_cv_path_GNUPG_PATH) + else + AC_MSG_RESULT($with_gpg invalid) + fi + fi + fi + if test -x "$ac_cv_path_GNUPG_PATH"; then + AC_DEFINE_UNQUOTED([GNUPG_PATH], ["$ac_cv_path_GNUPG_PATH"], [Path to gpg v1.x]) + fi +fi