From 02a2f350359013bf33c3957e95c98726273ced8c Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 28 Jun 2022 11:26:11 +0900 Subject: [PATCH] build: When no gpg-error-config, not install gpgme-config. * configure.ac (USE_GPGRT_CONFIG): New. * src/Makefile.am [USE_GPGRT_CONFIG]: Conditionalize the install of gpgme-config. -- When system will migrate use of gpgrt-config and removal of gpg-error-config, gpgme-config will not be installed (but use gpgme.pc by gpgrt-config). Signed-off-by: NIIBE Yutaka --- configure.ac | 3 +++ src/Makefile.am | 4 ++++ 2 files changed, 7 insertions(+) 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