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)
This commit is contained in:
Jim Jagielski 2013-07-02 15:33:55 +00:00
parent 757cc7b807
commit b8466e5ec1

View file

@ -42,3 +42,24 @@ if test "$PHP_GNUPG" != "no"; then
PHP_NEW_EXTENSION(gnupg, [gnupg.c gnupg_keylistiterator.c], $ext_shared) PHP_NEW_EXTENSION(gnupg, [gnupg.c gnupg_keylistiterator.c], $ext_shared)
fi 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