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.
ck_pring
Olivier Houchard 8 years ago
parent 15529b2372
commit b87563b7bd

6
configure vendored

@ -169,7 +169,8 @@ generate_stdout()
for option; do for option; do
case "$option" in case "$option" in
*=?*) *=?*)
value=`expr -- "$option" : '[^=]*=\(.*\)'` optname=`echo $option|cut -c 3-`
value=`expr "$optname" : '[^=]*=\(.*\)'`
;; ;;
*=) *=)
value= value=
@ -294,7 +295,8 @@ for option; do
fi fi
;; ;;
*=*) *=*)
NAME=`expr -- "$option" : '\([^=]*\)='` optname=`echo $option|cut -c 3-`
NAME=`expr "$optname" : '\([^=]*\)='`
eval "$NAME='$value'" eval "$NAME='$value'"
export $NAME export $NAME
;; ;;

Loading…
Cancel
Save