unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: 65142@debbugs.gnu.org
Subject: bug#65142: 30.0.50; configure --without-all does not disable some features
Date: Tue, 08 Aug 2023 09:54:20 +0200	[thread overview]
Message-ID: <ujzu6as0j@gentoo.org> (raw)

Ever since --with-json was changed from using OPTION_DEFAULT_ON to
OPTION_DEFAULT_IFAVAILABLE (commit 43091e6c5069), option --without-all
will no longer disable it. The same applies to --with-tree-sitter.

$ ./configure --without-all
[...]
  Does Emacs use -ljansson?                               yes
  Does Emacs use -ltree-sitter?                           yes
[...]

The following patch should fix the problem:

From b5ef99a3f06005524ab12a1bd6a2a6dfa7689ec2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Tue, 8 Aug 2023 08:34:43 +0200
Subject: [PATCH] Disable json and tree-sitter with --without-all

* configure.ac (OPTION_DEFAULT_IFAVAILABLE): Disable the option if
--without-all was specified.
---
 configure.ac | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index e01465c2af0..de602371f7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -305,7 +305,8 @@ AC_DEFUN
 ])dnl
 
 dnl OPTION_DEFAULT_IFAVAILABLE(NAME, HELP-STRING)
-dnl Create a new --with option that defaults to 'ifavailable'.
+dnl Create a new --with option that defaults to 'ifavailable',
+dnl unless it is overriden by $with_features being equal to 'no'.
 dnl NAME is the base name of the option.  The shell variable with_NAME
 dnl   will be set to either the user's value (if the option is
 dnl   specified; 'yes' for a plain --with-NAME) or to 'ifavailable' (if the
@@ -315,10 +316,12 @@ AC_DEFUN
 dnl HELP-STRING is the help text for the option.
 AC_DEFUN([OPTION_DEFAULT_IFAVAILABLE], [dnl
   AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[],[dnl
-    m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=ifavailable])dnl
+    AS_IF([test "$with_features" != no],
+      [m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=ifavailable],
+      [m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=no])dnl
+  ])dnl
 ])dnl
 
-
 dnl OPTION_DEFAULT_ON(NAME, HELP-STRING)
 dnl Create a new --with option that defaults to $with_features.
 dnl NAME is the base name of the option.  The shell variable with_NAME
-- 
2.41.0






             reply	other threads:[~2023-08-08  7:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  7:54 Ulrich Müller [this message]
2023-08-08 12:13 ` bug#65142: 30.0.50; configure --without-all does not disable some features Eli Zaretskii
2023-08-08 14:41   ` Ulrich Mueller
2023-08-08 15:28     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ujzu6as0j@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=65142@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).