From dacbd51c3f8ae6dafe56b3d4b4d15c8d62254230 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 17 Aug 2023 14:03:09 +0900 Subject: build: New configure option --with-libtool-modification. * Makefile.am (EXTRA_DIST): Add build-aux/libtool-patch.sed. * build-aux/libtool-patch.sed: New. * configure.ac (--with-libtool-modification): New. * build-aux/ltmain.sh: Revert our own local modification. -- Fixes-commit: e622e36f1f32641c66b28a0de95c75ae35f6ca05 GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka --- configure.ac | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d7396a27..7ddb1b4f 100644 --- a/configure.ac +++ b/configure.ac @@ -206,6 +206,44 @@ esac AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") +# +# 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],[[ + if test "$build_selection" = never; then + echo "patch not applied" + elif (mv -f libtool libtool.orig; \ + sed -f $srcdir/build-aux/libtool-patch.sed libtool.orig >libtool); 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]) + ;; + *) + ;; +esac + GPG_DEFAULT=no GPGSM_DEFAULT=no GPGCONF_DEFAULT=no -- cgit v1.2.3