aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMatthew Hoops2012-09-05 11:45:25 -0400
committerMatthew Hoops2012-09-05 11:45:25 -0400
commitf35e820e9f2f4c2f8b9c6d3b572d588fccf99f19 (patch)
tree42510da50bdf8515a577fdd74622539ff829ef78 /configure
parent2f9b1b67b08f1b70cd95795aaf7816ca7f991649 (diff)
parent058b9b9aca066c886ceb4e454a5541be70c27cb6 (diff)
downloadscummvm-rg350-f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19.tar.gz
scummvm-rg350-f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19.tar.bz2
scummvm-rg350-f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 43 insertions, 3 deletions
diff --git a/configure b/configure
index 5d440baf1f..df2c2107c8 100755
--- a/configure
+++ b/configure
@@ -62,7 +62,7 @@ get_var() {
eval echo \$${1}
}
-# Add an engine: id name build subengines
+# Add an engine: id name build subengines dependencies
add_engine() {
_engines="${_engines} ${1}"
if test "${3}" = "no" ; then
@@ -78,6 +78,14 @@ add_engine() {
done
}
+# Add a feature: id name settings-list
+add_feature() {
+ set_var _feature_${1}_name "${2}"
+ # This is a list of settings, where one must be "yes" for the feature to
+ # be enabled
+ set_var _feature_${1}_settings "${3}"
+}
+
_srcdir=`dirname $0`
# Read list of engines
@@ -163,6 +171,17 @@ _endian=unknown
_need_memalign=yes
_have_x86=no
+# Add (virtual) features
+add_feature 16bit "16bit color" "_16bit"
+add_feature faad "libfaad" "_faad"
+add_feature flac "FLAC" "_flac"
+add_feature freetype2 "FreeType2" "_freetype2"
+add_feature mad "MAD" "_mad"
+add_feature png "PNG" "_png"
+add_feature theoradec "libtheoradec" "_theoradec"
+add_feature vorbis "Vorbis file support" "_vorbis _tremor"
+add_feature zlib "zlib" "_zlib"
+
# Directories for installing ScummVM.
@@ -440,6 +459,26 @@ Try \`$0 --help' for more information." >&2
}
+#
+# Feature handling functions
+#
+
+# Get the name of the feature
+get_feature_name() {
+ get_var _feature_$1_name
+}
+
+# Check whether the feature is enabled
+get_feature_state() {
+ for i in `get_var _feature_$1_settings`; do
+ if test `get_var $i` = "yes"; then
+ echo "yes"
+ return
+ fi
+ done
+ echo "no"
+}
+
#
# Engine handling functions
@@ -547,8 +586,9 @@ check_engine_deps() {
if test `get_engine_build $1` = yes ; then
# Collect unmet dependencies
for dep in `get_engine_dependencies $1`; do
- if test `get_var _${dep}` = no ; then
- unmet_deps="${unmet_deps}${dep} "
+ if test `get_feature_state $dep` = "no"; then
+ feature_name=`get_feature_name $dep`
+ unmet_deps="${unmet_deps}${feature_name} "
fi
done