diff options
author | clone2727 | 2013-07-05 15:28:06 -0700 |
---|---|---|
committer | clone2727 | 2013-07-05 15:28:06 -0700 |
commit | 279c9f78412d9053a60b53b70b5e770159a2aa92 (patch) | |
tree | 431fdb6ff27fa016dad730c526b89db54becc1f3 /configure | |
parent | 2521449e79e6650a8663e0143d60d69239e58da8 (diff) | |
parent | 4ed1bc3a57e0160eb0b395c2a363151700216d04 (diff) | |
download | scummvm-rg350-279c9f78412d9053a60b53b70b5e770159a2aa92.tar.gz scummvm-rg350-279c9f78412d9053a60b53b70b5e770159a2aa92.tar.bz2 scummvm-rg350-279c9f78412d9053a60b53b70b5e770159a2aa92.zip |
Merge pull request #343 from clone2727/mpeg2-avi
Add back support for sword1/2 MPEG-2 cutscenes
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 57 |
1 files changed, 57 insertions, 0 deletions
@@ -113,6 +113,7 @@ _seq_midi=auto _sndio=auto _timidity=auto _zlib=auto +_mpeg2=auto _sparkle=auto _png=auto _theoradec=auto @@ -925,6 +926,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] @@ -1005,6 +1009,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 ;; @@ -1046,6 +1052,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" @@ -3456,6 +3467,52 @@ define_in_config_if_yes "$_zlib" 'USE_ZLIB' echo "$_zlib" # +# Check for LibMPEG2 +# +echocheck "libmpeg2 >= 0.4.0" +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; + +extern "C" { +#include <mpeg2dec/mpeg2.h> +} + +int main(void) { + #if MPEG2_RELEASE < MPEG2_VERSION(0, 4, 0) + #error libmpeg2 version too low + #endif + + /* mpeg2_state_t first appears in 0.4.0 */ + mpeg2_state_t state; + + return 0; +} +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" |