aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordi Vilalta Prat2008-05-07 01:15:46 +0000
committerJordi Vilalta Prat2008-05-07 01:15:46 +0000
commitf1514641ee8263503e59654fc46856364a96e144 (patch)
treeb6827b1e01086b8b1f3eb584287ef5ada48ac9f2
parent0fe0f093c7266c9407b9c0e93f73865883c9af25 (diff)
downloadscummvm-rg350-f1514641ee8263503e59654fc46856364a96e144.tar.gz
scummvm-rg350-f1514641ee8263503e59654fc46856364a96e144.tar.bz2
scummvm-rg350-f1514641ee8263503e59654fc46856364a96e144.zip
Reject invalid option combinations when enabling/disabling engines
svn-id: r31914
-rwxr-xr-xconfigure13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure b/configure
index 134bec4c08..ea627e4fd8 100755
--- a/configure
+++ b/configure
@@ -373,6 +373,13 @@ engine_enable() {
opt=yes
fi
engine=`echo $eng | sed 's/-/_/g'`
+
+ # Filter the parameter for the subengines
+ if test "`get_engine_sub ${engine}`" != "no" -a "$opt" != "yes" ; then
+ option_error
+ return
+ fi
+
if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then
if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build ${engine}`" != "$opt" ; then
eval _engine_${engine}_build=$opt
@@ -386,6 +393,12 @@ engine_enable() {
# Disable the given engine
engine_disable() {
+ # Filter malformed options
+ if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then
+ option_error
+ return
+ fi
+
engine=`echo $1 | sed 's/-/_/g'`
if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build $engine`" != "no" ; then
eval _engine_${engine}_build=no