Building GnuPG packages and PKG_CHECK_MODULES
Sachin T
sachin.t at ibm.com
Tue Mar 3 07:05:09 CET 2026
Hello NIIBE,
Yes, I’ve already tested the suggested approach and it works on my side.
Based on that, I’ve shared the reverted patch below, Please review and let me know if anything’s needed.
Appreciate the guidance.
Thanks,
Sachin
---
* configure.ac: Revert pkgconfig requirement and EXTRA_LIBS_FOR_BUILD
setting
* src/Makefile.am: Remove EXTRA_LIBS_FOR_BUILD variable
Signed-off-by: Sachin T <sachin.t at ibm.com>
---
configure.ac | 18 ------------------
src/Makefile.am | 2 +-
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index 58bbf92..d83e7e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,24 +142,6 @@ case "${host}" in
;;
esac
-# Set some variables for build platform helpers.
-case "$build_os" in
- *openedition*)
- PKG_CHECK_MODULES([ZOSLIB], [zoslib],
- [EXTRA_LIBS_FOR_BUILD="$ZOSLIB_LIBS"],
- [AC_MSG_WARN([[
-***
-*** zoslib not found. Please ensure zoslib.pc is in PKG_CONFIG_PATH.
-*** (If you are not using zOS please ignore this warning)
-***]])])
- ;;
- *)
- EXTRA_LIBS_FOR_BUILD=""
- ;;
-esac
-AC_SUBST(EXTRA_LIBS_FOR_BUILD)
-
-
if test "$have_w32_system" != yes; then
gl_THREADLIB_EARLY
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 82b4193..7fd1d98 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -280,7 +280,7 @@ errnos-sym.h: Makefile mkstrtable.awk errnos.in
mkheader$(EXEEXT_FOR_BUILD): mkheader.c Makefile
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
$(CPPFLAGS_FOR_BUILD) -g -I. -I$(srcdir) \
- -o $@ $(srcdir)/mkheader.c $(EXTRA_LIBS_FOR_BUILD)
+ -o $@ $(srcdir)/mkheader.c
parts_of_gpg_error_h = \
gpg-error.h.in \
--
2.53.0
From: NIIBE Yutaka <gniibe at fsij.org>
Date: Tuesday, 3 March 2026 at 7:34 AM
To: Sachin T <sachin.t at ibm.com>, GnuPG development <gnupg-devel at gnupg.org>
Subject: [EXTERNAL] Building GnuPG packages and PKG_CHECK_MODULES
Hello, Sachin T,
(also sent to GnuPG development mailing list)
Thank you for your patches last year.
While maintaining the GnuPG packages, I found an issue in libgpg-error.
For GnuPG, we have kept the dependency smaller as possible. This is
because GnuPG is an important package in an OS, in general, and smaller
dependency allows easy adoption in earlier phase of OS bootstrapping.
But now, (because of the change of z/OS support), for the maintainers,
it requires PKG_CHECK_MODULES macro from pkg-config. I'm afraid it's a
bit larger change. pkg-config is common these days, but not that
essential.
Last year, for z/OS support of libgpg-error, we added
EXTRA_LIBS_FOR_BUILD in libgpg-error/configure.ac. IIUC, this is needed
for z/OS to link zoslib to the executable (this case, it's mkheader
command).
For libgcrypt, you asked similar. I noticed that this would be
problematic (might result patches for many packages as well), and
suggested another approach of preparing a wrapper script for
CC_FOR_BUILD and use the script to build packages.
I wonder if the approach works well for your projects. If it works
well, is it possible to consider removal of EXTRA_LIBS_FOR_BUILD in
libgpg-error/configure.ac ?
Thank you in advance for your time,
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20260303/0d726fb1/attachment-0001.html>
More information about the Gnupg-devel
mailing list