From cbfd6062d048965b34e66194fec0360d2ce376bb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 25 Jul 2022 08:12:45 -0400 Subject: [PATCH] Cleanup for libtool fixes (Issue #394) --- CHANGES.md | 1 + config-scripts/cups-libtool.m4 | 16 +++++++++------- configure | 34 ++++++++++++++++++---------------- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 63a02c8aa1..381a943e60 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Changes in CUPS v2.4.3 (TBA) ---------------------------- - Added a title with device uri for found network printers (Issues #402, #393) +- Fixed `--enable-libtool-unsupported` (Issue #394) - Fixed configuration on RISC-V machines (Issue #404) - Fixed the `device_uri` invalid pointer for driverless printers with `.local` hostname (Issue #419) diff --git a/config-scripts/cups-libtool.m4 b/config-scripts/cups-libtool.m4 index 80f6158cd9..e084c793b6 100644 --- a/config-scripts/cups-libtool.m4 +++ b/config-scripts/cups-libtool.m4 @@ -1,5 +1,5 @@ dnl -dnl Libtool stuff for CUPS. +dnl GNU libtool stuff for CUPS. dnl dnl Copyright © 2021-2022 by OpenPrinting. dnl Copyright © 2007-2018 by Apple Inc. @@ -9,14 +9,16 @@ 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)]), - [], [enable_libtool_unsupported=no]) +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.]) + 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.]) ]) diff --git a/configure b/configure index c44cb8619d..e48a2d3ea4 100755 --- a/configure +++ b/configure @@ -1586,8 +1586,10 @@ Optional Features: --enable-acl build with POSIX ACL support --disable-dbus build without DBUS support --disable-shared do not create shared libraries - --enable-libtool-unsupported=/path/to/libtool + + --enable-libtool-unsupported=/path/to/libtool build with libtool (UNSUPPORTED) + --enable-debug build with debugging symbols --enable-debug-guards build with memory allocation guards --enable-debug-printfs build with CUPS_DEBUG_LOG support @@ -7856,31 +7858,31 @@ fi if test ${enable_libtool_unsupported+y} then : enableval=$enable_libtool_unsupported; - if test x$enable_libtool_unsupported != xno -then : - if test x$enable_libtool_unsupported = xyes -then : +else $as_nop - as_fn_error $? "Use --enable-libtool-unsupported=/path/to/libtool." "$LINENO" 5 + enable_libtool_unsupported=no fi - LIBTOOL="$enable_libtool_unsupported" - enable_shared="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: libtool is not supported." >&5 -printf "%s\n" "$as_me: WARNING: WARNING: libtool is not supported." >&2;} -else $as_nop - LIBTOOL="" +if test x$enable_libtool_unsupported != xno +then : -fi + if test "x$enable_libtool_unsupported" = xyes +then : -fi + as_fn_error $? "Use '--enable-libtool-unsupported=/path/to/libtool'." "$LINENO" 5 +else $as_nop -if test x$LIBTOOL != x -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libtool is not supported." >&5 +printf "%s\n" "$as_me: WARNING: libtool is not supported." >&2;} + +fi + + LIBTOOL="$enable_libtool_unsupported" + enable_shared="no" DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}" DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}" -- 2.47.2