aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-08-02 01:19:59 +0000
committerNIIBE Yutaka <[email protected]>2023-08-02 01:19:59 +0000
commit64532db11fcda9b886df74c00c730108852f4f52 (patch)
tree650f36d8262ffddd6ee9a398ff48d00fa5720c9c
parentbuild: Fix libtool modification. (diff)
downloadlibgpg-error-64532db11fcda9b886df74c00c730108852f4f52.tar.gz
libgpg-error-64532db11fcda9b886df74c00c730108852f4f52.zip
build: New configure option --with-libtool-modification.
* configure.ac (--with-libtool-modification): New. -- GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--configure.ac28
1 files changed, 26 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index fa31cde..cf7c28b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,13 +157,37 @@ LT_INIT([win32-dll disable-static])
LT_LANG([Windows Resource])
#
+# Specify how we support our local modification of libtool for Windows
+# 64-bit. Options are:
+#
+# (1) apply: when appying patch fails, it results failure of entire build
+# (2) never: never apply the patch (no try)
+# (3) try: use patched if it goes well, use original if fails
+#
+AC_ARG_WITH([libtool-modification],
+ AS_HELP_STRING([--with-libtool-modification=apply|never|try],
+ [how to handle libtool modification (default=apply)]),
+ build_libtool_modification=$withval,
+ build_libtool_modification=apply)
+
+#
# Apply a patch (locally maintained one of ours) to libtool
#
case $host in
x86_64-*mingw32*)
AC_CONFIG_COMMANDS([libtool-patch],[[
- patch -p0 < $srcdir/build-aux/libtool.patch || as_fn_exit 1
-]])
+ if test "$build_selection" = never; then
+ echo "patch not applied"
+ elif patch -p0 < $srcdir/build-aux/libtool.patch; then
+ echo "applied successfully"
+ elif test "$build_selection" = try; then
+ mv -f libtool.orig libtool
+ echo "patch failed, thus, using original"
+ else
+ echo "patch failed"
+ as_fn_exit 1
+ fi
+]],[build_selection=$build_libtool_modification])
;;
*)
;;