]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
config-scripts: Fix --enable-libtool-unsupported 394/head
authororbea <orbea@riseup.net>
Wed, 11 May 2022 18:57:32 +0000 (11:57 -0700)
committerorbea <orbea@riseup.net>
Wed, 11 May 2022 19:08:28 +0000 (12:08 -0700)
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

index e603c06c018c285ffeddb09f04d7c5c41af23b3c..80f6158cd9d3a1fa240622eded6a1d741046ed71 100644 (file)
@@ -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}"