- AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),
- [ if test x$enableval = xyes; then
- have_gpgme=yes
- fi
- ])
- AC_ARG_WITH(gpgme-prefix, AC_HELP_STRING([--with-gpgme-prefix=PFX], [prefix where GPGME is installed (optional)]),
- gpgme_config_prefix="$withval", gpgme_config_prefix="")
-
- if test x$have_gpgme = xyes; then
- if test x$gpgme_config_prefix != x; then
- GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
- else
- AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
- fi
- if test "x$GPGME_CONFIG" = "xno"; then
- AC_MSG_ERROR([GPGME not found])
- else
- LIBGPGME_CFLAGS=`$GPGME_CONFIG --cflags`
- LIBGPGME_LIBS=`$GPGME_CONFIG --libs`
- MUTTLIBS="$MUTTLIBS $LIBGPGME_LIBS"
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS crypt-gpgme.o crypt-mod-pgp-gpgme.o crypt-mod-smime-gpgme.o"
- AC_DEFINE(CRYPT_BACKEND_GPGME, 1, [Defined, if GPGME support is enabled])
- fi
+AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),[
+ if test x$enableval = xyes; then
+ AM_PATH_GPGME(,,[AC_MSG_ERROR(GPGME not found)])
+ MUTTLIBS="$MUTTLIBS $GPGME_LIBS"
+ AC_DEFINE(CRYPT_BACKEND_GPGME, 1, [Defined, if GPGME support is enabled])
+ AM_CONDITIONAL(BUILD_GPGME, true)
+ else
+ AM_CONDITIONAL(BUILD_GPGME, false)