diff mbox series

[pseudo,17/34] configure: Fix --disable-* options

Message ID 1794370862-30908-18-git-send-email-mark.hatle@kernel.crashing.org
State New
Headers show
Series Various fixes | expand

Commit Message

Mark Hatle Nov. 11, 2026, 4:20 a.m. UTC
From: Mark Hatle <mark.hatle@amd.com>

configure turns --disable-<option> into --enable-<option>=no before
matching options, but used ${arg%--disable-}, which removes a suffix,
instead of ${arg#--disable-}, which removes the prefix.  Every
--disable-* option became --enable---disable-<option>=no, which matched
nothing, so it was ignored with an "Unrecognized option" warning.

Remove the prefix, so --disable-force-async, --disable-profiling,
--disable-xattr, --disable-xattrdb and --disable-memory-db take effect,
and --disable-epoll fails with the intended error.

AI-Generated: Uses GitHub Copilot
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/configure b/configure
index 315bcd0..e659370 100755
--- a/configure
+++ b/configure
@@ -58,7 +58,7 @@  for arg
 do
     case "$arg" in
     --disable-*)
-        arg="--enable-${arg%--disable-}=no"
+        arg="--enable-${arg#--disable-}=no"
 	;;
     esac
     case "$arg" in