From a68d340a89a3786c441185698ae999b86d77c777 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 21:05:22 +0200 Subject: [PATCH] configure: fix parsing args if values contain "=" Currently, when the value of an option passed to the configure script as argument contains an equal sign "=", the part of the string up to the second equal sign is used as option. This commit changes how the string is split, so that always only the part up to the first equal sign is interpreted as option. "${var%=*}" removes everything from the last equal sign, "${var%%=*}" removes everything from the first equal sign. This allows to pass CFLAGS, which usually contain equal signs, like "--cflags=-march=armv6 -mfloat-abi=hard -mfpu=vfp" For reference: https://github.com/tvheadend/tvheadend/issues/1665 Signed-off-by: MichaIng --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 970404d2e..96bacd218 100755 --- a/configure +++ b/configure @@ -96,7 +96,7 @@ opt= val= for opt do val=${opt#*=} - opt=${opt%=*} + opt=${opt%%=*} opt=${opt#*--} case "$opt" in help) -- 2.47.3