From b87563b7bd21b7b339529541f7f24063ca8f5075 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 15 Jun 2017 19:25:35 +0200 Subject: [PATCH] configure: Fix usage with busybox. expr as provided by busybox doesn't know about --, while most other implementations require it, or it'd try to interpret --prefix=whatever as one of its own options. To fix this, we just remove the first two characters of the option before calling expr, rendering -- useles. --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 29a1f2c..9d2fe83 100755 --- a/configure +++ b/configure @@ -169,7 +169,8 @@ generate_stdout() for option; do case "$option" in *=?*) - value=`expr -- "$option" : '[^=]*=\(.*\)'` + optname=`echo $option|cut -c 3-` + value=`expr "$optname" : '[^=]*=\(.*\)'` ;; *=) value= @@ -294,7 +295,8 @@ for option; do fi ;; *=*) - NAME=`expr -- "$option" : '\([^=]*\)='` + optname=`echo $option|cut -c 3-` + NAME=`expr "$optname" : '\([^=]*\)='` eval "$NAME='$value'" export $NAME ;;