diff options
author | Matthew Hoops | 2012-11-19 13:13:36 -0500 |
---|---|---|
committer | Matthew Hoops | 2013-06-19 23:58:03 -0400 |
commit | e5e467f5a1dffde7f4371a7c585351188677f746 (patch) | |
tree | e65332ef79dbf418438af21df06e0f627d3fb8bc /configure | |
parent | 125b146b06945eb738f8d0358ce1c1ede1208f81 (diff) | |
download | scummvm-rg350-e5e467f5a1dffde7f4371a7c585351188677f746.tar.gz scummvm-rg350-e5e467f5a1dffde7f4371a7c585351188677f746.tar.bz2 scummvm-rg350-e5e467f5a1dffde7f4371a7c585351188677f746.zip |
CONFIGURE: Add libmpeg2 as an optional dependency again
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -113,6 +113,7 @@ _seq_midi=auto _sndio=auto _timidity=auto _zlib=auto +_mpeg2=auto _sparkle=auto _png=auto _theoradec=auto @@ -924,6 +925,9 @@ Optional Libraries: --with-zlib-prefix=DIR Prefix where zlib is installed (optional) --disable-zlib disable zlib (compression) support [autodetect] + --with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional) + --enable-mpeg2 enable mpeg2 codec for cutscenes [autodetect] + --with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional) --disable-opengl disable OpenGL (ES) support [autodetect] @@ -1004,6 +1008,8 @@ for ac_option in $@; do --disable-sparkle) _sparkle=no ;; --enable-nasm) _nasm=yes ;; --disable-nasm) _nasm=no ;; + --enable-mpeg2) _mpeg2=yes ;; + --disable-mpeg2) _mpeg2=no ;; --disable-png) _png=no ;; --enable-png) _png=yes ;; --disable-theoradec) _theoradec=no ;; @@ -1043,6 +1049,11 @@ for ac_option in $@; do FLUIDSYNTH_CFLAGS="-I$arg/include" FLUIDSYNTH_LIBS="-L$arg/lib" ;; + --with-mpeg2-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + MPEG2_CFLAGS="-I$arg/include" + MPEG2_LIBS="-L$arg/lib" + ;; --with-alsa-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` ALSA_CFLAGS="-I$arg/include" @@ -3461,6 +3472,49 @@ define_in_config_if_yes "$_zlib" 'USE_ZLIB' echo "$_zlib" # +# Check for LibMPEG2 +# +echocheck "libmpeg2 >= 0.3.2" +if test "$_mpeg2" = auto ; then + _mpeg2=no + cat > $TMPC << EOF +typedef signed $type_1_byte int8_t; +typedef signed $type_2_byte int16_t; +typedef signed $type_4_byte int32_t; + +typedef unsigned $type_1_byte uint8_t; +typedef unsigned $type_2_byte uint16_t; +typedef unsigned $type_4_byte uint32_t; + +#include <mpeg2dec/mpeg2.h> +int main(void) { + /* mpeg2_state_t first appears in 0.4.0 */ + mpeg2_state_t state; + + #ifdef MPEG2_RELEASE + if (MPEG2_RELEASE >= MPEG2_VERSION(0, 3, 2)) + return 0; + #endif + return 1; +} +EOF + + if test -n "$_host"; then + # don't execute while cross compiling + cc_check $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && _mpeg2=yes + else + cc_check_no_clean $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && $TMPO$HOSTEXEEXT && _mpeg2=yes + cc_check_clean + fi +fi +if test "$_mpeg2" = yes ; then + INCLUDES="$INCLUDES $MPEG2_CFLAGS" + LIBS="$LIBS $MPEG2_LIBS -lmpeg2" +fi +define_in_config_if_yes "$_mpeg2" 'USE_MPEG2' +echo "$_mpeg2" + +# # Check for Sparkle if updates support is enabled # echocheck "Sparkle" |