From: MichaIng Date: Thu, 18 Apr 2024 19:05:22 +0000 (+0200) Subject: configure: fix parsing args if values contain "=" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a68d340a89a3786c441185698ae999b86d77c777;p=thirdparty%2Ftvheadend.git 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 --- 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)