configure: Allow for multi-option parameters.

ck_pring
Samy Al Bahra 10 years ago
parent 84cd66b2ed
commit 747779df1b

19
configure vendored

@ -144,8 +144,18 @@ generate_stdout()
echo "Documentation will be installed in $MANDIR" echo "Documentation will be installed in $MANDIR"
} }
for option in $*; do for option; do
value=`echo "$option" | sed -e 's/^[^=]*=\(.*\)/\1/'` case "$option" in
*=?*)
value=`expr -- "$option" : '[^=]*=\(.*\)'`
;;
*=)
value=
;;
*)
value=yes
;;
esac
case "$option" in case "$option" in
--help) --help)
@ -244,9 +254,8 @@ for option in $*; do
fi fi
;; ;;
*=*) *=*)
NAME=`expr "$option" : '\([^=]*\)='` NAME=`expr -- "$option" : '\([^=]*\)='`
VALUE=`echo "$value" | sed "s/'/'\\\\\\\\''/g"` eval "$NAME='$value'"
eval "$NAME='$VALUE'"
export $NAME export $NAME
;; ;;
*) *)

Loading…
Cancel
Save