diff options
author | Paul Gilbert | 2013-11-30 20:44:23 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-11-30 20:44:23 -0500 |
commit | ede418b67a0f14e4f17a2b03f5362741badd5532 (patch) | |
tree | 07de039fac5c303f1b9fce372afe5fa19854f547 /configure | |
parent | 66d1f7a8de2ff5a21ad013f45924c406f4833e9a (diff) | |
parent | 3e859768770a0b385e21c4528cd546b33ed9a55d (diff) | |
download | scummvm-rg350-ede418b67a0f14e4f17a2b03f5362741badd5532.tar.gz scummvm-rg350-ede418b67a0f14e4f17a2b03f5362741badd5532.tar.bz2 scummvm-rg350-ede418b67a0f14e4f17a2b03f5362741badd5532.zip |
VOYEUR: Merge of upstream
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 404 |
1 files changed, 308 insertions, 96 deletions
@@ -97,7 +97,9 @@ add_feature() { _srcdir=`dirname $0` # Read list of engines -. $_srcdir/engines/configure.engines +for i in $_srcdir/engines/*/configure.engine; do + . "$i" +done # # Default settings @@ -113,7 +115,9 @@ _seq_midi=auto _sndio=auto _timidity=auto _zlib=auto +_mpeg2=auto _sparkle=auto +_jpeg=auto _png=auto _theoradec=auto _faad=auto @@ -138,9 +142,10 @@ _build_hq_scalers=yes _enable_prof=no _global_constructors=no _bink=yes -# Default vkeybd/keymapper options +# Default vkeybd/keymapper/eventrec options _vkeybd=no _keymapper=no +_eventrec=auto # GUI translation options _translation=yes # Default platform settings @@ -164,7 +169,7 @@ _windres=windres _stagingpath="staging" _win32path="c:/scummvm" _aos4path="Games:ScummVM" -_staticlibpath=/sw +_staticlibpath= _sdlconfig=sdl-config _freetypeconfig=freetype-config _sdlpath="$PATH" @@ -186,6 +191,7 @@ add_feature faad "libfaad" "_faad" add_feature flac "FLAC" "_flac" add_feature freetype2 "FreeType2" "_freetype2" add_feature mad "MAD" "_mad" +add_feature jpeg "JPEG" "_jpeg" add_feature png "PNG" "_png" add_feature theoradec "libtheoradec" "_theoradec" add_feature vorbis "Vorbis file support" "_vorbis _tremor" @@ -816,7 +822,7 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (android, bada, dc, dingux, ds, gph, + --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, gph, iphone, linuxmoto, maemo, n64, null, openpandora, ps2, psp, samsungtv, sdl, webos, wii, wince) [sdl] @@ -845,7 +851,7 @@ Fine tuning of the installation directories: Special configuration feature: --host=HOST cross-compile to target HOST (arm-linux, ...) special targets: android for Android - bada for Samsung BADA + tizen for Samsung Tizen caanoo for Caanoo dingux for Dingux dreamcast for Sega Dreamcast @@ -860,6 +866,7 @@ Special configuration feature: motomagx for MotoMAGX n64 for Nintendo 64 openpandora for OpenPandora + ouya for OUYA ps2 for PlayStation 2 ps3 for PlayStation 3 psp for PlayStation Portable @@ -898,6 +905,10 @@ Optional Features: --disable-hq-scalers exclude HQ2x and HQ3x scalers --disable-translation don't build support for translated messages --disable-taskbar don't build support for taskbar and launcher integration + --enable-vkeybd build virtual keyboard support + --enable-keymapper build key mapper support + --enable-eventrecorder enable event recording functionality + --disable-eventrecorder disable event recording functionality --enable-updates build support for updates --enable-text-console use text console instead of graphical console --enable-verbose-build enable regular echoing of commands during build @@ -924,9 +935,15 @@ 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] + --with-jpeg-prefix=DIR Prefix where libjpeg is installed (optional) + --disable-jpeg disable JPEG decoder [autodetect] + --with-png-prefix=DIR Prefix where libpng is installed (optional) --disable-png disable PNG decoder [autodetect] @@ -1004,6 +1021,10 @@ 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-jpeg) _jpeg=no ;; + --enable-jpeg) _jpeg=yes ;; --disable-png) _png=no ;; --enable-png) _png=yes ;; --disable-theoradec) _theoradec=no ;; @@ -1036,6 +1057,8 @@ for ac_option in $@; do --disable-vkeybd) _vkeybd=no ;; --enable-keymapper) _keymapper=yes ;; --disable-keymapper) _keymapper=no ;; + --enable-eventrecorder) _eventrec=yes ;; + --disable-eventrecorder) _eventrec=no ;; --enable-text-console) _text_console=yes ;; --disable-text-console) _text_console=no ;; --with-fluidsynth-prefix=*) @@ -1043,6 +1066,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" @@ -1078,6 +1106,11 @@ for ac_option in $@; do MAD_CFLAGS="-I$arg/include" MAD_LIBS="-L$arg/lib" ;; + --with-jpeg-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + JPEG_CFLAGS="-I$arg/include" + JPEG_LIBS="-L$arg/lib" + ;; --with-png-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` PNG_CFLAGS="-I$arg/include" @@ -1238,7 +1271,7 @@ get_system_exe_extension $guessed_host NATIVEEXEEXT=$_exeext case $_host in -android | android-v7a) +android | android-v7a | ouya) _host_os=android _host_cpu=arm _host_alias=arm-linux-androideabi @@ -1247,16 +1280,6 @@ arm-riscos) _host_os=riscos _host_cpu=arm ;; -bada) - _host_os=bada - if test "$_debug_build" = yes; then - _host_cpu=i686 - _host_alias=i686-mingw32 - else - _host_cpu=arm - _host_alias=arm-samsung-nucleuseabi - fi - ;; caanoo) _host_os=gph-linux _host_cpu=arm @@ -1382,6 +1405,11 @@ samsungtv) _host_cpu=arm _host_alias=arm-linux-gnueabi ;; +tizen) + _host_os=tizen + _host_cpu=arm + _host_alias=arm-linux-gnueabi + ;; webos) _host_os=webos _host_cpu=arm @@ -1491,12 +1519,6 @@ android) exit 1 fi ;; -bada) - if test -z "$BADA_SDK"; then - echo "Please set BADA_SDK in your environment. export BADA_SDK=<path to Bada SDK>" - exit 1 - fi - ;; ds | gamecube | wii) if test -z "$DEVKITPRO"; then echo "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to devkitPRO>" @@ -1538,6 +1560,12 @@ psp) exit 1 fi ;; +tizen) + if test -z "$TIZEN_ROOTSTRAP"; then + echo "Please set TIZEN_ROOTSTRAP in your environment. export TIZEN_ROOTSTRAP=<path to Tizen SDK device profile>" + exit 1 + fi + ;; webos) if test -z "$WEBOS_SDK"; then echo "Please set WEBOS_SDK in your environment. export WEBOS_SDK=<path to WebOS SDK>" @@ -1731,7 +1759,7 @@ if test "$have_gcc" = yes ; then case $_host_os in # newlib-based system include files suppress non-C89 function # declarations under __STRICT_ANSI__ - amigaos* | android | bada | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | wii | wince ) + amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | tizen | wii | wince ) ;; *) CXXFLAGS="$CXXFLAGS -ansi" @@ -1767,12 +1795,13 @@ echo $_use_cxx11 # However, some platforms use GNU extensions in system header files, so # for these we must not use -pedantic. case $_host_os in -android | gamecube | psp | wii | webos) +android | gamecube | psp | tizen | wii | webos) ;; *) # ICC does not support pedantic, while GCC and clang do. if test "$have_icc" = no ; then - CXXFLAGS="$CXXFLAGS -pedantic" + # We *do* want the 'long long' extension. + CXXFLAGS="$CXXFLAGS -pedantic -Wno-long-long" fi ;; esac @@ -1830,7 +1859,7 @@ esac # Determine a data type with the given length # find_type_with_size() { - for datatype in int short char long "long long" unknown; do + for datatype in int short char long "long long" __int64 "long long int" unknown; do cat > tmp_find_type_with_size.cpp << EOF typedef $datatype ac__type_sizeof_; int main() { @@ -2024,6 +2053,12 @@ case $_host_os in CXXFLAGS="$CXXFLAGS -mfpu=vfp" LDFLAGS="$LDFLAGS -Wl,--fix-cortex-a8" ;; + ouya) + CXXFLAGS="$CXXFLAGS -march=armv7-a" + CXXFLAGS="$CXXFLAGS -mtune=cortex-a9" + CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp" + CXXFLAGS="$CXXFLAGS -mfpu=neon" + ;; esac CXXFLAGS="$CXXFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" CXXFLAGS="$CXXFLAGS -fpic" @@ -2051,16 +2086,6 @@ case $_host_os in add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK" _seq_midi=no ;; - bada) - BADA_SDK_ROOT="`cygpath -m ${BADA_SDK}`" - add_line_to_config_mk "BADA_SDK = $BADA_SDK" - add_line_to_config_mk "BADA_SDK_ROOT = $BADA_SDK_ROOT" - - # assume dependencies have been installed in cygwin's /usr/local - CYGWIN_USR_LOCAL="`cygpath -m /usr/local`" - LDFLAGS="$LDFLAGS -L${CYGWIN_USR_LOCAL}/lib" - CXXFLAGS="$CXXFLAGS -I${CYGWIN_USR_LOCAL}/include" - ;; beos*) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" # Needs -lbind -lsocket for the timidity MIDI driver @@ -2099,6 +2124,24 @@ case $_host_os in LDFLAGS="-L${macport_prefix}/lib $LDFLAGS" CXXFLAGS="-I${macport_prefix}/include $CXXFLAGS" + + if test -z "$_staticlibpath"; then + _staticlibpath=${macport_prefix} + echo "Set staticlib-prefix to ${_staticlibpath}" + fi + fi + # If _staticlibpath is not set yet try first /sw (fink) then /usr/local + # (the macports case is handled above). + if test -z "$_staticlibpath"; then + if test -d "/sw"; then + _staticlibpath=/sw + echo "Set staticlib-prefix to ${_staticlibpath}" + elif test -d "/usr/local"; then + _staticlibpath=/usr/local + echo "Set staticlib-prefix to ${_staticlibpath}" + else + echo "Could not determine prefix for static libraries" + fi fi ;; dreamcast) @@ -2176,7 +2219,7 @@ case $_host_os in # When not cross-compiling, enable large file support, but don't # care if getconf doesn't exist or doesn't recognize LFS_CFLAGS. if test -z "$_host"; then - CXXFLAGS="$CXXFLAGS $(getconf LFS_CFLAGS 2>/dev/null)" + CXXFLAGS="$CXXFLAGS `getconf LFS_CFLAGS 2>/dev/null`" fi ;; maemo) @@ -2238,6 +2281,12 @@ case $_host_os in # Needs -lbind -lsocket for the timidity MIDI driver LIBS="$LIBS -lnsl -lsocket" ;; + tizen) + add_line_to_config_mk "TIZEN_ROOTSTRAP = $TIZEN_ROOTSTRAP" + LDFLAGS="$LDFLAGS --sysroot=${TIZEN_ROOTSTRAP}" + LDFLAGS="$LDFLAGS -L${TIZEN_LIBS}/lib" + CXXFLAGS="$CXXFLAGS -I${TIZEN_LIBS}/include" + ;; webos) CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot" CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include" @@ -2298,7 +2347,7 @@ if test -n "$_host"; then # Cross-compiling mode - add your target here if needed echo "Cross-compiling to $_host" case "$_host" in - android | android-v7a) + android | android-v7a | ouya) # we link a .so as default LDFLAGS="$LDFLAGS -shared" LDFLAGS="$LDFLAGS -Wl,-Bsymbolic,--no-undefined" @@ -2316,22 +2365,6 @@ if test -n "$_host"; then arm-riscos|linupy) DEFINES="$DEFINES -DLINUPY" ;; - bada) - _unix=yes - _backend="bada" - _port_mk="backends/platform/bada/bada.mk" - if test "$_debug_build" = yes; then - _arm_asm=no - else - _arm_asm=yes - fi - _taskbar=no - _build_scalers=no - _seq_midi=no - _mt32emu=no - _timidity=no - _vkeybd=yes - ;; bfin*) ;; caanoo) @@ -2381,7 +2414,8 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" - if test "$_release_build" = yes; then + # Enable serial debugging output only when --enable-debug is passed + if test "$_release_build" = yes -o "$_debug_build" != yes; then DEFINES="$DEFINES -DNOSERIAL" fi _optimization_level=-O3 @@ -2644,6 +2678,18 @@ if test -n "$_host"; then _mt32emu=no _vkeybd=yes ;; + tizen) + _unix=yes + _backend="tizen" + _port_mk="backends/platform/tizen/tizen.mk" + _arm_asm=yes + _taskbar=no + _build_scalers=no + _seq_midi=no + _mt32emu=no + _timidity=no + _vkeybd=yes + ;; webos) _backend="webos" _port_mk="backends/platform/webos/webos.mk" @@ -2694,34 +2740,6 @@ case $_backend in LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" INCLUDES="$INCLUDES -I$ANDROID_NDK/sources/cxx-stl/system/include" ;; - bada) - # dirent.h not available. NONSTANDARD_PORT==ensure portdefs.h is included - DEFINES="$DEFINES -DBADA -DDISABLE_STDIO_FILESTREAM -DNONSTANDARD_PORT" - DEFINES="$DEFINES -DNO_STDERR_STDOUT" - DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/bada ' - INCLUDES="$INCLUDES "'-I$(BADA_SDK)/include' - INCLUDES="$INCLUDES "'-I$(BADA_SDK_ROOT)/Include' - if test "$_debug_build" = yes; then - # debug using with the simulator - CXXFLAGS="$CXXFLAGS -D_DEBUG -DSHP -DBUILD_DLL -fmessage-length=0" - else - # created a shared library for inclusion via the eclipse build - CXXFLAGS="$CXXFLAGS -DSHP" - CXXFLAGS="$CXXFLAGS -fpic" - CXXFLAGS="$CXXFLAGS -fshort-wchar" - CXXFLAGS="$CXXFLAGS -mcpu=cortex-a8" - CXXFLAGS="$CXXFLAGS -mfpu=vfpv3" - CXXFLAGS="$CXXFLAGS -mfloat-abi=hard" - CXXFLAGS="$CXXFLAGS -mlittle-endian" - CXXFLAGS="$CXXFLAGS -mthumb-interwork" - CXXFLAGS="$CXXFLAGS -Wno-psabi" - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" - CXXFLAGS="$CXXFLAGS -fno-short-enums" - fi - HOSTEXEPRE=lib - HOSTEXEEXT=.a - ;; dc) INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc' INCLUDES="$INCLUDES "'-isystem $(ronindir)/include' @@ -2729,7 +2747,8 @@ case $_backend in LDFLAGS="$LDFLAGS -nostartfiles" LDFLAGS="$LDFLAGS "'$(ronindir)/lib/crt0.o' LDFLAGS="$LDFLAGS "'-L$(ronindir)/lib' - if test "$_release_build" = yes; then + # Enable serial debugging output only when --enable-debug is passed + if test "$_release_build" = yes -o "$_debug_build" != yes; then LIBS="$LIBS -lronin-noserial -lm" else LIBS="$LIBS -lronin -lm" @@ -2804,6 +2823,25 @@ case $_backend in LDFLAGS="$LDFLAGS -shared" LDFLAGS="$LDFLAGS -fpic" ;; + tizen) + # dirent.h not available. NONSTANDARD_PORT==ensure portdefs.h is included + DEFINES="$DEFINES -DTIZEN -DDISABLE_STDIO_FILESTREAM -DNONSTANDARD_PORT" + DEFINES="$DEFINES -DNO_STDERR_STDOUT" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/tizen' + INCLUDES="$INCLUDES "'-I$(TIZEN_ROOTSTRAP)/usr/include' + INCLUDES="$INCLUDES "'-I$(TIZEN_ROOTSTRAP)/usr/include/osp' + if test "$_debug_build" = yes; then + CXXFLAGS="$CXXFLAGS -D_DEBUG -DBUILD_DLL -O0 -g3" + fi + # created a shared library for inclusion via the eclipse build + CXXFLAGS="$CXXFLAGS -Wno-psabi" + CXXFLAGS="$CXXFLAGS --sysroot=${TIZEN_ROOTSTRAP}" + CXXFLAGS="$CXXFLAGS -fmessage-length=0" + CXXFLAGS="$CXXFLAGS -fPIC" + HOSTEXEPRE=lib + HOSTEXEEXT=.a + ;; webos) # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. # The PDL library acts as the WebOS device toolchain, and is required to control the virtual keyboard among other OS-level events. @@ -2869,7 +2907,7 @@ esac # Enable 16bit support only for backends which support it # case $_backend in - android | bada | dingux | dc | gph | iphone | maemo | openpandora | psp | samsungtv | sdl | webos | wii) + android | dingux | dc | gph | iphone | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii) if test "$_16bit" = auto ; then _16bit=yes else @@ -2882,6 +2920,20 @@ case $_backend in esac # +# Enable Event Recorder only for backends that support it +# +case $_backend in + sdl) + if test "$_eventrec" = auto ; then + _eventrec=yes + fi + ;; + *) + _eventrec=no + ;; +esac + +# # Disable savegame timestamp support for backends which don't have a reliable real time clock # case $_backend in @@ -2915,7 +2967,7 @@ case $_host_os in amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp | wii | wince) _posix=no ;; - android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) + android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) _posix=yes ;; os2-emx*) @@ -3071,7 +3123,7 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive ' ;; - linux*) + linux* | gnu* | k*bsd*-gnu*) _plugin_prefix="lib" _plugin_suffix=".so" CXXFLAGS="$CXXFLAGS -fPIC" @@ -3326,6 +3378,32 @@ define_in_config_h_if_yes "$_alsa" 'USE_ALSA' echo "$_alsa" # +# Check for libjpeg +# +echocheck "libjpeg >= v6b" +if test "$_jpeg" = auto ; then + _jpeg=no + cat > $TMPC << EOF +#include <stdio.h> +#include <jpeglib.h> +int main(void) { +#if JPEG_LIB_VERSION >= 62 +#else + syntax error +#endif + return 0; +} +EOF + cc_check $JPEG_CFLAGS $JPEG_LIBS -ljpeg && _jpeg=yes +fi +if test "$_jpeg" = yes ; then + LIBS="$LIBS $JPEG_LIBS -ljpeg" + INCLUDES="$INCLUDES $JPEG_CFLAGS" +fi +define_in_config_if_yes "$_jpeg" 'USE_JPEG' +echo "$_jpeg" + +# # Check for PNG # echocheck "PNG >= 1.2.8" @@ -3341,10 +3419,10 @@ int main(void) { return 0; } EOF - cc_check $PNG_CFLAGS $PNG_LIBS -lpng && _png=yes + cc_check $PNG_CFLAGS $PNG_LIBS -lpng -lz && _png=yes fi if test "$_png" = yes ; then - LIBS="$LIBS $PNG_LIBS -lpng" + LIBS="$LIBS $PNG_LIBS -lpng -lz" INCLUDES="$INCLUDES $PNG_CFLAGS" fi define_in_config_if_yes "$_png" 'USE_PNG' @@ -3461,6 +3539,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" @@ -3563,8 +3687,8 @@ if test "$_libunity" = auto ; then ;; *) # Unity has a lots of dependencies, update the libs and cflags var with them - LIBUNITY_LIBS="$LIBUNITY_LIBS $(pkg-config --libs unity = 3.8.4 2>> "$TMPLOG")" - LIBUNITY_CFLAGS="$LIBUNITY_CFLAGS $(pkg-config --cflags unity = 3.8.4 2>> "$TMPLOG")" + LIBUNITY_LIBS="$LIBUNITY_LIBS `pkg-config --libs unity = 3.8.4 2>> "$TMPLOG"`" + LIBUNITY_CFLAGS="$LIBUNITY_CFLAGS `pkg-config --cflags unity = 3.8.4 2>> "$TMPLOG"`" _libunity=no cat > $TMPC << EOF #include <unity.h> @@ -3721,7 +3845,7 @@ EOF fi case $_host_os in - bada) + tizen) # components live in non-standard locations so just assume sane SDK _opengl=yes _opengles=yes @@ -3797,10 +3921,21 @@ fi define_in_config_if_yes $_nasm 'USE_NASM' # -# Enable vkeybd / keymapper +# Enable vkeybd / keymapper / event recorder # define_in_config_if_yes $_vkeybd 'ENABLE_VKEYBD' define_in_config_if_yes $_keymapper 'ENABLE_KEYMAPPER' +define_in_config_if_yes $_eventrec 'ENABLE_EVENTRECORDER' + +# +# Check if the keymapper and the event recorder are enabled simultaneously +# +if test "$_keymapper" = yes ; then + if test "$_eventrec" = yes ; then + echo "ERROR: The keymapper and the event recorder cannot be enabled simultaneously currently, please disable one of the two" + exit 1 + fi +fi # Check whether to build translation support # @@ -3879,7 +4014,14 @@ fi test "x$prefix" = xNONE && prefix=/usr/local test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -DEFINES="$DEFINES -DDATA_PATH=\\\"$datadir\\\"" +case $_host_os in + mingw*) + # Windows stores all the external data files in executable file. + ;; + *) + DEFINES="$DEFINES -DDATA_PATH=\\\"$datadir\\\"" + ;; +esac case $_backend in openpandora) @@ -3946,7 +4088,11 @@ if test "$_vkeybd" = yes ; then fi if test "$_keymapper" = yes ; then - echo ", keymapper" + echo_n ", keymapper" +fi + +if test "$_eventrec" = yes ; then + echo ", event recorder" else echo fi @@ -4053,8 +4199,18 @@ for engine in $_engines; do fi done -# Prepare the information to be shown +# Sort engines to place our headline engine at start... +# No technical reason, just historical convention +headline_engine=scumm +_sorted_engines="${headline_engine}" for engine in $_engines; do + if test "${engine}" != "${headline_engine}" ; then + _sorted_engines="${_sorted_engines} ${engine}" + fi +done + +# Prepare the information to be shown +for engine in $_sorted_engines; do if test "`get_engine_sub $engine`" = "no" ; then # It's a main engine prepare_engine_build_strings $engine @@ -4236,3 +4392,59 @@ include \$(srcdir)/Makefile EOF fi + +# Ensure engines folder exists prior to trying to generate +# files into it (used for out-of-tree-builds) +mkdir -p engines + +echo "Creating engines/engines.mk" +cat > engines/engines.mk << EOF +# This file is automatically generated by configure +# DO NOT EDIT MANUALLY +# This file is being included by "Makefile.common" +EOF + +for engine in $_sorted_engines; do + j=`echo $engine | tr '[:lower:]' '[:upper:]'` + if test "`get_engine_sub $engine`" = "no" ; then + # main engine + cat >> engines/engines.mk << EOF + +ifdef ENABLE_$j +DEFINES += -DENABLE_$j=\$(ENABLE_$j) +MODULES += engines/$engine +EOF + + for subeng in `get_engine_subengines $engine` ; do + k=`echo $subeng | tr '[:lower:]' '[:upper:]'` + cat >> engines/engines.mk << EOF + +ifdef ENABLE_$k +DEFINES += -DENABLE_$k +endif +EOF + done + + cat >> engines/engines.mk << EOF +endif +EOF + fi +done + +echo "Creating engines/plugins_table.h" +cat > engines/plugins_table.h << EOF +/* This file is automatically generated by configure */ +/* DO NOT EDIT MANUALLY */ +// This file is being included by "base/plugins.cpp" +EOF + +for engine in $_sorted_engines; do + if test "`get_engine_sub $engine`" = "no" ; then + j=`echo $engine | tr '[:lower:]' '[:upper:]'` + cat >> engines/plugins_table.h << EOF +#if PLUGIN_ENABLED_STATIC($j) +LINK_PLUGIN($j) +#endif +EOF + fi +done |