diff options
| author | Johannes Schickel | 2012-09-04 20:26:08 +0200 |
|---|---|---|
| committer | Johannes Schickel | 2012-09-04 20:38:17 +0200 |
| commit | a83bca79dac51222394cd328abdc5a87ab3cb6a2 (patch) | |
| tree | e2971070217413cd3460395ae6007e4e5e521aa5 /configure | |
| parent | 8208d725e3f06899b2685719d3ae628007616091 (diff) | |
| download | scummvm-rg350-a83bca79dac51222394cd328abdc5a87ab3cb6a2.tar.gz scummvm-rg350-a83bca79dac51222394cd328abdc5a87ab3cb6a2.tar.bz2 scummvm-rg350-a83bca79dac51222394cd328abdc5a87ab3cb6a2.zip | |
CONFIGURE: Add initial virtual feature support.
This is used to support features as dependencies, which can be supplied by
multiple sources, like it is the case for Vorbis support.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 44 |
1 files changed, 42 insertions, 2 deletions
@@ -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 |
