From ba2ebce0110a16d82253cd4003691f98bb622928 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Fri, 17 Aug 2012 10:48:45 +0100 Subject: [PATCH] Fix enabling of unsupported options from command line. --- support/configure.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/support/configure.inc b/support/configure.inc index c80b2ae4..308f4701 100644 --- a/support/configure.inc +++ b/support/configure.inc @@ -63,7 +63,7 @@ function die # Enable/Disable option function _enable { - local opt=$1 val=$2 row= k= v= + local opt=$1 val=$2 ignore=$3 row= k= v= for row in ${OPTIONS[*]}; do k=${row%:*} [ "$k" == "$opt" ] || continue @@ -73,19 +73,19 @@ function _enable fi return done - OPTIONS=(${OPTIONS[@]} $opt:$val) + [ -z "$ignore" ] && OPTIONS=(${OPTIONS[@]} $opt:$val) } # Enable option function enable { - _enable $1 yes + _enable $1 yes $2 } # Disable option function disable { - _enable $1 no + _enable $1 no $2 } # Enable package @@ -186,11 +186,11 @@ function parse_args ;; enable-*) opt=${opt#*-} - enable $opt + enable $opt 1 ;; disable-*) opt=${opt#*-} - disable $opt + disable $opt 1 ;; esac done