diff --git a/configure.ac b/configure.ac index 6b80b6bb..58c963ac 100644 --- a/configure.ac +++ b/configure.ac @@ -724,6 +724,9 @@ AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION", AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME, [The default error source for GPGME.]) +AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -n "$GPGRT_CONFIG" \ + -a "$ac_cv_path_GPG_ERROR_CONFIG" = no]) + # And for libassuan. have_libassuan=no AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION", diff --git a/src/Makefile.am b/src/Makefile.am index 39c341f5..67805a89 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,11 @@ EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \ gpgme.h.in versioninfo.rc.in gpgme.def \ gpgme.pc.in gpgme-glib.pc.in +if USE_GPGRT_CONFIG +noinst_SCRIPTS = gpgme-config +else bin_SCRIPTS = gpgme-config +endif m4datadir = $(datadir)/aclocal m4data_DATA = gpgme.m4 nodist_include_HEADERS = gpgme.h