From fa192206d152f1eaeebe4b53b9fa3ba2c5d585c9 Mon Sep 17 00:00:00 2001 From: orbea Date: Wed, 11 May 2022 11:57:32 -0700 Subject: [PATCH] config-scripts: Fix --enable-libtool-unsupported When the LIBTOOL variable is set in the user's environment the build will use libtool even when --enable-libtool-unsupported is not used. This can lead to unexpected failures when LIBTOOL is set to rlibtool rather than GNU libtool. To solve this the build now relies on the enable_libtool_unsupported varaiable set by --enable-libtool-unsupported. Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=843638 --- config-scripts/cups-libtool.m4 | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/config-scripts/cups-libtool.m4 b/config-scripts/cups-libtool.m4 index e603c06c01..80f6158cd9 100644 --- a/config-scripts/cups-libtool.m4 +++ b/config-scripts/cups-libtool.m4 @@ -9,20 +9,21 @@ dnl Licensed under Apache License v2.0. See the file "LICENSE" for more dnl information. dnl -AC_ARG_ENABLE([libtool_unsupported], AS_HELP_STRING([--enable-libtool-unsupported=/path/to/libtool], [build with libtool (UNSUPPORTED)]), [ - AS_IF([test x$enable_libtool_unsupported != xno], [ - AS_IF([test x$enable_libtool_unsupported = xyes], [ - AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.]) - ]) - LIBTOOL="$enable_libtool_unsupported" - enable_shared="no" - AC_MSG_WARN([WARNING: libtool is not supported.]) - ], [ - LIBTOOL="" +AC_ARG_ENABLE([libtool_unsupported], + AS_HELP_STRING([--enable-libtool-unsupported=/path/to/libtool], + [build with libtool (UNSUPPORTED)]), + [], [enable_libtool_unsupported=no]) + +AS_IF([test x$enable_libtool_unsupported != xno], [ + AS_IF([test x$enable_libtool_unsupported = xyes], [ + AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.]) + ],[ + AC_MSG_WARN([libtool is not supported.]) ]) -]) -AS_IF([test x$LIBTOOL != x], [ + LIBTOOL="$enable_libtool_unsupported" + enable_shared="no" + DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}" DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}" -- 2.47.2