diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 385 |
1 files changed, 325 insertions, 60 deletions
@@ -88,6 +88,7 @@ add_engine drascula "Drascula: The Vampire Strikes Back" yes add_engine gob "Gobli*ns" yes add_engine groovie "Groovie" yes "groovie2" add_engine groovie2 "Groovie 2 games" no +add_engine hugo "Hugo Trilogy" no add_engine kyra "Legend of Kyrandia" yes "lol" add_engine lol "Lands of Lore" no add_engine lure "Lure of the Temptress" yes @@ -104,8 +105,11 @@ add_engine sci32 "SCI32 games" no add_engine sky "Beneath a Steel Sky" yes add_engine sword1 "Broken Sword" yes add_engine sword2 "Broken Sword II" yes +add_engine sword25 "Broken Sword 2.5" no add_engine teenagent "Teen Agent" yes +add_engine testbed "TestBed: the Testing framework" no add_engine tinsel "Tinsel" yes +add_engine toon "Toonstruck" no add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes add_engine tucker "Bud Tucker in Double Trouble" yes @@ -120,8 +124,11 @@ _flac=auto _mad=auto _alsa=auto _seq_midi=auto +_timidity=auto _zlib=auto _mpeg2=no +_png=auto +_theoradec=auto _fluidsynth=auto _16bit=auto _opengl=auto @@ -136,6 +143,7 @@ _build_hq_scalers=yes _indeo3=auto _enable_prof=no _unix=no +_global_constructors=no # Default vkeybd/keymapper options _vkeybd=no _keymapper=no @@ -172,15 +180,15 @@ NASM="" # to make it possible to change e.g. the location of the # man pages independently of that of the engine data files, # which are placed inside $datadir/scummvm -exec_prefix=NONE prefix=NONE +exec_prefix=NONE bindir='${exec_prefix}/bin' +libdir='${exec_prefix}/lib' datarootdir='${prefix}/share' datadir='${datarootdir}/scummvm' +mandir='${datarootdir}/man' docdir='${datarootdir}/doc/scummvm' -libdir='${exec_prefix}/lib' #localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' # For cross compiling _host="" @@ -192,12 +200,8 @@ _host_alias="" _srcdir=`dirname $0` _port_mk="ports.mk" -# Determine a tmp file name, using mktemp(1) when available. -if type mktemp > /dev/null 2>&1 ; then - TMPO=`mktemp /tmp/scummvm-conf.XXXXXXXXXX` -else - TMPO=./scummvm-conf -fi +# Use temp files in the build directory +TMPO=./scummvm-conf TMPC=${TMPO}.cpp TMPLOG=config.log @@ -366,11 +370,8 @@ get_system_exe_extension() { dreamcast | ds | gamecube | n64 | ps2 | psp | wii) _exeext=".elf" ;; - gp2x-linux) - _exeext=".gp2x" - ;; - gp2xwiz-linux) - _exeext=".wiz" + gph-linux) + _exeext=".gph" ;; mingw* | *os2-emx | wince) _exeext=".exe" @@ -646,9 +647,9 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (dc, gp2x, gp2xwiz, iphone, - linuxmoto, ds, null, ps2, psp, sdl, wii, wince) - [sdl] + --backend=BACKEND backend to build (android, dc, dingux, ds, gp2x, gph, + iphone, linuxmoto, maemo, n64, null, openpandora, ps2, + psp, samsungtv, sdl, symbian, wii, wince) [sdl] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -667,19 +668,30 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --libdir=DIR object code libraries [EPREFIX/lib] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR/scummvm] + --datadir=DIR read-only architecture-independent data + [DATAROOTDIR/scummvm] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/scummvm] Special configuration feature: --host=HOST cross-compile to target HOST (arm-linux, ...) - special targets: dreamcast for Sega Dreamcast + special targets: android for Android + caanoo for GP2X Caanoo + dingux for Dingux + dreamcast for Sega Dreamcast + ds for Nintendo DS gamecube for Nintendo GameCube + gp2x for GP2X + gp2xwiz for GP2X Wiz iphone for Apple iPhone linupy for Yopy PDA - ds for Nintendo DS + motoezx for MotoEZX + motomagx for MotoMAGX + n64 for Nintendo 64 + openpandora for OpenPandora ps2 for PlayStation 2 psp for PlayStation Portable + samsungtv for Samsung TV wii for Nintendo Wii wince for Windows CE @@ -690,7 +702,8 @@ $engines_help Optional Features: --disable-debug disable building with debugging symbols --enable-Werror treat warnings as errors - --enable-release enable building in release mode (this activates optimizations) + --enable-release enable building in release mode (this activates + optimizations) --enable-profiling enable profiling --enable-plugins enable the support for dynamic plugins --default-dynamic make plugins dynamic by default @@ -701,7 +714,8 @@ Optional Features: --disable-hq-scalers exclude HQ2x and HQ3x scalers --disable-translation don't build support for translated messages --enable-text-console use text console instead of graphical console - --enable-verbose-build enable regular echoing of commands during build process + --enable-verbose-build enable regular echoing of commands during build + process Optional Libraries: --with-alsa-prefix=DIR Prefix where alsa is installed (optional) @@ -731,10 +745,18 @@ Optional Libraries: --disable-indeo3 disable Indeo3 decoder [autodetect] - --with-fluidsynth-prefix=DIR Prefix where libfluidsynth is installed (optional) + --with-png-prefix=DIR Prefix where libpng is installed (optional) + --disable-png disable PNG decoder [autodetect] + + --with-theoradec-prefix=DIR Prefix where libtheoraec is installed (optional) + --disable-theoradec disable Theora decoder [autodetect] + + --with-fluidsynth-prefix=DIR Prefix where libfluidsynth is + installed (optional) --disable-fluidsynth disable fluidsynth MIDI driver [autodetect] - --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) + --with-sdl-prefix=DIR Prefix where the sdl-config script is + installed (optional) --with-nasm-prefix=DIR Prefix where nasm executable is installed (optional) --disable-nasm disable assembly language optimizations [autodetect] @@ -764,8 +786,10 @@ for ac_option in $@; do --disable-hq-scalers) _build_hq_scalers=no ;; --enable-alsa) _alsa=yes ;; --disable-alsa) _alsa=no ;; - --enable-seq-midi) _seq_midi=yes ;; - --disable-seq-midi) _seq_midi=no ;; + --enable-seq-midi) _seq_midi=yes ;; + --disable-seq-midi) _seq_midi=no ;; + --enable-timidity) _timidity=yes ;; + --disable-timidity) _timidity=no ;; --enable-vorbis) _vorbis=yes ;; --disable-vorbis) _vorbis=no ;; --enable-tremor) _tremor=yes ;; @@ -781,6 +805,10 @@ for ac_option in $@; do --enable-mpeg2) _mpeg2=yes ;; --disable-indeo3) _indeo3=no ;; --enable-indeo3) _indeo3=yes ;; + --disable-png) _png=no ;; + --enable-png) _png=yes ;; + --disable-theoradec) _png=no ;; + --enable-theoradec) _theoradec=yes ;; --disable-fluidsynth) _fluidsynth=no ;; --enable-readline) _readline=yes ;; --disable-readline) _readline=no ;; @@ -839,6 +867,16 @@ for ac_option in $@; do MAD_CFLAGS="-I$arg/include" MAD_LIBS="-L$arg/lib" ;; + --with-png-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + PNG_CFLAGS="-I$arg/include" + PNG_LIBS="-L$arg/lib" + ;; + --with-theoradec-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + THEORADEC_CFLAGS="-I$arg/include" + THEORADEC_LIBS="-L$arg/lib" + ;; --with-zlib-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` ZLIB_CFLAGS="-I$arg/include" @@ -889,17 +927,17 @@ for ac_option in $@; do --host=*) _host=`echo $ac_option | cut -d '=' -f 2` ;; - --exec-prefix=*) - exec_prefix=`echo $ac_option | cut -d '=' -f 2` - ;; --prefix=*) prefix=`echo $ac_option | cut -d '=' -f 2` ;; + --exec-prefix=*) + exec_prefix=`echo $ac_option | cut -d '=' -f 2` + ;; --bindir=*) bindir=`echo $ac_option | cut -d '=' -f 2` ;; - --mandir=*) - mandir=`echo $ac_option | cut -d '=' -f 2` + --libdir=*) + libdir=`echo $ac_option | cut -d '=' -f 2` ;; --datarootdir=*) datarootdir=`echo $ac_option | cut -d '=' -f 2` @@ -907,8 +945,11 @@ for ac_option in $@; do --datadir=*) datadir=`echo $ac_option | cut -d '=' -f 2` ;; - --libdir=*) - libdir=`echo $ac_option | cut -d '=' -f 2` + --mandir=*) + mandir=`echo $ac_option | cut -d '=' -f 2` + ;; + --docdir=*) + docdir=`echo $ac_option | cut -d '=' -f 2` ;; --enable-all-engines) engine_enable_all @@ -942,6 +983,25 @@ arm-riscos) _host_os=riscos _host_cpu=arm ;; +caanoo) + _host_os=gph-linux + _host_cpu=arm + _host_alias=arm-none-linux-gnueabi + if test "$_debug_build" = auto; then + # If you want to debug on the Caanoo use '--disable-release --enable-debug' + _debug_build=no + fi + + if test "$_release_build" = auto; then + # Enable release build by default. + _release_build=yes + fi + ;; +dingux) + _host_os=linux + _host_cpu=mipsel + _host_alias=mipsel-linux + ;; dreamcast) _host_os=dreamcast _host_cpu=sh @@ -960,14 +1020,32 @@ gamecube) _host_alias=powerpc-gekko ;; gp2x) - _host_os=gp2x-linux + _host_os=gph-linux _host_cpu=arm _host_alias=arm-open2x-linux + if test "$_debug_build" = auto; then + # If you want to debug on the GP2X use '--disable-release --enable-debug' + _debug_build=no + fi + + if test "$_release_build" = auto; then + # Enable release build by default. + _release_build=yes + fi ;; gp2xwiz) - _host_os=gp2xwiz-linux + _host_os=gph-linux _host_cpu=arm _host_alias=arm-open2x-linux + if test "$_debug_build" = auto; then + # If you want to debug on the GP2XWiz use '--disable-release --enable-debug' + _debug_build=no + fi + + if test "$_release_build" = auto; then + # Enable release build by default. + _release_build=yes + fi ;; i586-mingw32msvc) _host_os=mingw32msvc @@ -992,7 +1070,7 @@ motomagx) _host_cpu=arm _host_alias=arm-linux-gnueabi ;; -n64) +n64) _host_os=n64 _host_cpu=mips _host_alias=mips64 @@ -1001,6 +1079,20 @@ neuros) _host_os=linux _host_cpu=arm ;; +openpandora) + _host_os=linux + _host_cpu=arm + _host_alias=arm-angstrom-linux-gnueabi + if test "$_debug_build" = auto; then + # If you want to debug on the OP use '--disable-release --enable-debug' + _debug_build=no + fi + + if test "$_release_build" = auto; then + # Enable release build by default. + _release_build=yes + fi + ;; ppc-amigaos) _host_os=amigaos _host_cpu=ppc @@ -1182,12 +1274,12 @@ else CXX= for compiler in $compilers; do if test_compiler $compiler; then - echo "success testing compiler: $1" >> "$TMPLOG" + echo "success testing compiler: $compiler" >> "$TMPLOG" CXX=$compiler echo $CXX break else - echo "failure testing compiler: $1" >> "$TMPLOG" + echo "failure testing compiler: $compiler" >> "$TMPLOG" fi done fi @@ -1275,6 +1367,17 @@ if test "$cxx_verc_fail" = yes ; then exit 1 fi +echocheck "whether -Wglobal-constructors work" +cat > $TMPC << EOF +int main() { return 0; } +EOF +cc_check -Wglobal-constructors && _global_constructors=yes + +if test "$_global_constructors" = yes; then + CXXFLAGS="$CXXFLAGS -Wglobal-constructors" +fi +echo $_global_constructors + # # Check for endianness # @@ -1461,9 +1564,10 @@ case $_host_os in _unix=yes ;; n64) - DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT" + DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT" DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_COMMAND_LINE" DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; os2-emx*) _unix=yes # FIXME??? Why?? @@ -1535,10 +1639,52 @@ if test -n "$_host"; then bfin*) _need_memalign=yes ;; + caanoo) + DEFINES="$DEFINES -DCAANOO -DREDUCE_MEMORY_USAGE" + # Disable DOSBOX OPL for now. + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + if test "$_debug_build" = yes; then + DEFINES="$DEFINES -DGPH_DEBUG" + else + # Use -O3 on the Caanoo for non-debug builds. + CXXFLAGS="$CXXFLAGS -O3" + fi + CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" + ASFLAGS="$ASFLAGS" + _unix=yes + _need_memalign=yes + add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' + add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' + add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' + add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' + add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' + _backend="gph" + _build_hq_scalers=no + _mt32emu=no + _vkeybd=yes + _seq_midi=no + _port_mk="backends/platform/gph/caanoo-bundle.mk" + ;; *darwin*) _ranlib=$_host-ranlib _strip=$_host-strip ;; + dingux) + DEFINES="$DEFINES -DUNIX -DDINGUX -DDISABLE_DOSBOX_OPL -DREDUCE_MEMORY_USAGE" + ASFLAGS="$ASFLAGS" + CXXFLAGS="$CXXFLAGS -msoft-float -mips32" + _need_memalign=yes + _backend="dingux" + _mt32emu=no + _vkeybd=yes + _build_hq_scalers=no + _keymapper=no + # Force disable vorbis on dingux, it has terrible performance compared to tremor + _vorbis=no + # Force disable seq on dingux, no way to use it and it would get enabled by default with configure + _seq_midi=no + _port_mk="backends/platform/dingux/dingux.mk" + ;; dreamcast) DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE" CXXFLAGS="$CXXFLAGS -O3 -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks" @@ -1556,13 +1702,14 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DSTREAM_AUDIO_FROM_DISK" DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" - DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" _need_memalign=yes add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' + add_line_to_config_h '#define DISABLE_TEXT_CONSOLE' _backend="ds" _build_scalers=no _mt32emu=no @@ -1576,6 +1723,7 @@ if test -n "$_host"; then _mt32emu=no _port_mk="backends/platform/wii/wii.mk" add_line_to_config_mk 'GAMECUBE = 1' + add_line_to_config_h '#define AUDIO_REVERSE_STEREO' add_line_to_config_h '#define GAMECUBE' add_line_to_config_h "/* #define DEBUG_WII_USBGECKO */" add_line_to_config_h "/* #define DEBUG_WII_MEMSTATS */" @@ -1583,7 +1731,12 @@ if test -n "$_host"; then add_line_to_config_h "#define USE_WII_DI" ;; gp2x) - DEFINES="$DEFINES -DGP2X -DNDEBUG" + DEFINES="$DEFINES -DGP2X -DREDUCE_MEMORY_USAGE" + # Disable DOSBOX OPL for now. + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + if test "$_debug_build" = yes; then + DEFINES="$DEFINES -DGPH_DEBUG" + fi CXXFLAGS="$CXXFLAGS -march=armv4t" ASFLAGS="$ASFLAGS -mfloat-abi=soft" LDFLAGS="$LDFLAGS -static" @@ -1602,7 +1755,12 @@ if test -n "$_host"; then _port_mk="backends/platform/gp2x/gp2x-bundle.mk" ;; gp2xwiz) - DEFINES="$DEFINES -DGP2XWIZ -DNDEBUG" + DEFINES="$DEFINES -DGP2XWIZ -DREDUCE_MEMORY_USAGE" + # Disable DOSBOX OPL for now. + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + if test "$_debug_build" = yes; then + DEFINES="$DEFINES -DGPH_DEBUG" + fi CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS -mfloat-abi=soft" _unix=yes @@ -1612,12 +1770,12 @@ if test -n "$_host"; then add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="gp2xwiz" + _backend="gph" _build_hq_scalers=no _mt32emu=no _vkeybd=yes _seq_midi=no - _port_mk="backends/platform/gp2xwiz/gp2xwiz-bundle.mk" + _port_mk="backends/platform/gph/gp2xwiz-bundle.mk" ;; iphone) DEFINES="$DEFINES -DIPHONE" @@ -1691,7 +1849,6 @@ if test -n "$_host"; then _backend="n64" _need_memalign=yes _mt32emu=no - _vkeybd=yes _build_scalers=no _indeo3=no _translation=no @@ -1704,6 +1861,7 @@ if test -n "$_host"; then _mad=yes _tremor=yes _zlib=yes + _port_mk="backends/platform/n64/n64.mk" ;; neuros) DEFINES="$DEFINES -DNEUROS" @@ -1713,6 +1871,32 @@ if test -n "$_host"; then _build_hq_scalers=no _mt32emu=no ;; + openpandora) + DEFINES="$DEFINES -DOPENPANDORA -DREDUCE_MEMORY_USAGE" + # Disable DOSBOX OPL for now. + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + if test "$_release_build" = no; then + DEFINES="$DEFINES -DOP_DEBUG" + else + # Use -O3 on the OpenPandora for non-debug builds. + CXXFLAGS="$CXXFLAGS -O3" + fi + CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon" + ASFLAGS="$ASFLAGS -mfloat-abi=soft" + _unix=yes + _need_memalign=yes + add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' + add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' + add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' + add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' + add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' + _backend="openpandora" + _build_hq_scalers=yes + _mt32emu=no + _vkeybd=no + _seq_midi=no + _port_mk="backends/platform/openpandora/op-bundle.mk" + ;; ppc-amigaos) _endian=big _need_memalign=yes @@ -1776,6 +1960,7 @@ if test -n "$_host"; then _build_scalers=no _port_mk="backends/platform/wii/wii.mk" add_line_to_config_mk 'GAMECUBE = 0' + add_line_to_config_h '#define AUDIO_REVERSE_STEREO' add_line_to_config_h "#define DEBUG_WII_USBGECKO" add_line_to_config_h "/* #define DEBUG_WII_MEMSTATS */" add_line_to_config_h "/* #define DEBUG_WII_GDB */" @@ -1854,7 +2039,7 @@ fi # Enable 16bit support only for backends which support it # case $_backend in - dreamcast | samsungtv | sdl | wii | psp) + dingux | dreamcast | gph | openpandora | psp | samsungtv | sdl | wii) if test "$_16bit" = auto ; then _16bit=yes else @@ -1960,7 +2145,7 @@ PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive ' ;; - gp2xwiz*) + gph*) _def_plugin=' #define PLUGIN_PREFIX "" #define PLUGIN_SUFFIX ".plugin" @@ -2024,7 +2209,7 @@ PLUGIN_SUFFIX := .plg PLUGIN_EXTRA_DEPS = $(EXECUTABLE) CXXFLAGS += -DDYNAMIC_MODULES LDFLAGS += -Wl,-T$(srcdir)/backends/platform/psp/main_prog.ld -PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/psp/plugin.syms,-T$(srcdir)/backends/platform/psp/plugin.ld -lstdc++ -lc -lm -Wl,--wrap,memcpy +PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/psp/plugin.syms,-T$(srcdir)/backends/platform/psp/plugin.ld -lstdc++ -lc -lm PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--no-whole-archive ' @@ -2195,6 +2380,62 @@ define_in_config_h_if_yes "$_alsa" 'USE_ALSA' echo "$_alsa" # +# Check for PNG +# +echocheck "PNG >= 1.2.8" +if test "$_png" = auto ; then + _png=no + cat > $TMPC << EOF +#include <png.h> +int main(void) { if (PNG_LIBPNG_VER >= 10208) { return 0; } return 1; } +EOF + cc_check_no_clean $PNG_CFLAGS $PNG_LIBS -lpng && $TMPO$HOSTEXEEXT && _png=yes + cc_check_clean +fi +if test "$_png" = yes ; then + LIBS="$LIBS $PNG_LIBS -lpng" + INCLUDES="$INCLUDES $PNG_CFLAGS" +fi +define_in_config_h_if_yes "$_png" 'USE_PNG' +echo "$_png" + +if test `get_engine_build sword25` = yes && test ! "$_png" = yes ; then + echo "...disabling Broken Sword 2.5 engine. PNG is required" + engine_disable sword25 +fi + +# +# Check for Theora Decoder +# +echocheck "libtheoradec >= 1.0" +if test "$_vorbis" = no ; then + echo "skipping. no vorbis" + _theoradec=notsupported +fi +if test "$_theoradec" = auto ; then + _theoradec=no + cat > $TMPC << EOF +#include <theora/theoradec.h> +#include <vorbis/codec.h> +int main(void) { th_ycbcr_buffer yuv; th_decode_ycbcr_out(NULL, yuv); } +EOF + cc_check $THEORADEC_CFLAGS $THEORADEC_LIBS -ltheoradec && _theoradec=yes +fi +if test "$_theoradec" = yes ; then + LIBS="$LIBS $THEORADEC_LIBS -ltheoradec" + INCLUDES="$INCLUDES $THEORADEC_CFLAGS" +fi +define_in_config_h_if_yes "$_theoradec" 'USE_THEORADEC' +if test ! "$_theoradec" = notsupported ; then + echo "$_theoradec" +fi + +if test `get_engine_build sword25` = yes && test ! "$_theoradec" = yes ; then + echo "...disabling Broken Sword 2.5 engine. libtheoradec is required" + engine_disable sword25 +fi + +# # Check for SEQ MIDI # echocheck "SEQ MIDI" @@ -2208,6 +2449,19 @@ define_in_config_h_if_yes "$_seq_midi" 'USE_SEQ_MIDI' echo "$_seq_midi" # +# Check for TiMidity(++) +# +echocheck "TiMidity" +if test "$_timidity" = auto ; then + # TODO: Is there a good possibility of auto detecting whether we + # should include TiMidity support? It can only be used on Unix + # currently so we use that as "detection" for now. + _timidity="$_unix" +fi +define_in_config_h_if_yes "$_timidity" 'USE_TIMIDITY' +echo "$_timidity" + +# # Check for ZLib # echocheck "zlib" @@ -2417,14 +2671,14 @@ if test "$_have_x86" = yes ; then _nasm=no else case $_host_os in - os2-emx*) - NASMFLAGS="$NASMFLAGS -f aout" + darwin*) + NASMFLAGS="$NASMFLAGS -f macho" ;; mingw*) NASMFLAGS="$NASMFLAGS -f win32" ;; - darwin*) - NASMFLAGS="$NASMFLAGS -f macho" + os2-emx*) + NASMFLAGS="$NASMFLAGS -f aout" ;; *) NASMFLAGS="$NASMFLAGS -f elf" @@ -2573,6 +2827,14 @@ case $_backend in LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib' LIBS="$LIBS -lronin -lm" ;; + dingux) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND -DDINGUX" + LDFLAGS="$LDFLAGS " + MODULES="$MODULES backends/platform/sdl" + ;; ds) # TODO ds INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/arm9/source' @@ -2583,15 +2845,13 @@ case $_backend in find_sdlconfig INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS -static" - CXXFLAGS="$CXXFLAGS -march=armv4t" + LDFLAGS="$LDFLAGS" ;; - gp2xwiz) + gph) find_sdlconfig INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" LDFLAGS="$LDFLAGS" - CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ;; iphone) OBJCFLAGS="$OBJCFLAGS --std=c99" @@ -2613,6 +2873,12 @@ case $_backend in null) DEFINES="$DEFINES -DUSE_NULL_DRIVER" ;; + openpandora) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + LDFLAGS="$LDFLAGS" + ;; ps2) # TODO ps2 DEFINES="$DEFINES -D_EE -DFORCE_RTL" @@ -2624,7 +2890,6 @@ case $_backend in psp) DEFINES="$DEFINES -D__PSP__ -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" - LDFLAGS="$LDFLAGS -Wl,--wrap,memcpy" ;; samsungtv) find_sdlconfig @@ -2670,7 +2935,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 | ds | dreamcast | gamecube | mingw* | n64 | psp | wii | wince ) + amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | wii | wince ) CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" ;; *) @@ -2834,11 +3099,11 @@ NASMFLAGS := $NASMFLAGS prefix = $prefix exec_prefix = $exec_prefix bindir = $bindir +libdir = $libdir datarootdir = $datarootdir datadir = $datadir -docdir = $docdir -libdir = $libdir mandir = $mandir +docdir = $docdir $_config_mk_data |