diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 207 |
1 files changed, 104 insertions, 103 deletions
@@ -91,6 +91,7 @@ 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 lastexpress "The Last Express" no add_engine lure "Lure of the Temptress" yes add_engine m4 "M4/MADS" no add_engine made "MADE" yes @@ -131,7 +132,6 @@ _png=auto _theoradec=auto _fluidsynth=auto _16bit=auto -_opengl=auto _readline=auto # Default option behaviour yes/no _debug_build=auto @@ -144,6 +144,7 @@ _indeo3=auto _enable_prof=no _unix=no _global_constructors=no +_elf_loader=no # Default vkeybd/keymapper options _vkeybd=no _keymapper=no @@ -676,7 +677,7 @@ Fine tuning of the installation directories: Special configuration feature: --host=HOST cross-compile to target HOST (arm-linux, ...) special targets: android for Android - caanoo for GP2X Caanoo + caanoo for Caanoo dingux for Dingux dreamcast for Sega Dreamcast ds for Nintendo DS @@ -709,7 +710,6 @@ Optional Features: --default-dynamic make plugins dynamic by default --disable-mt32emu don't enable the integrated MT-32 emulator --disable-16bit don't enable 16bit color support - --disable-opengl don't enable OpenGL (ES) --disable-scalers exclude scalers --disable-hq-scalers exclude HQ2x and HQ3x scalers --disable-translation don't build support for translated messages @@ -740,15 +740,12 @@ Optional Libraries: --with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional) --enable-mpeg2 enable mpeg2 codec for cutscenes [no] - --with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional) - --disable-opengl disable OpenGL (ES) support [autodetect] - --disable-indeo3 disable Indeo3 decoder [autodetect] --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) + --with-theoradec-prefix=DIR Prefix where libtheoradec is installed (optional) --disable-theoradec disable Theora decoder [autodetect] --with-fluidsynth-prefix=DIR Prefix where libfluidsynth is @@ -807,13 +804,11 @@ for ac_option in $@; do --enable-indeo3) _indeo3=yes ;; --disable-png) _png=no ;; --enable-png) _png=yes ;; - --disable-theoradec) _png=no ;; - --enable-theoradec) _theoradec=yes ;; + --disable-theoradec) _theoradec=no ;; + --enable-theoradec) _theoradec=yes ;; --disable-fluidsynth) _fluidsynth=no ;; --enable-readline) _readline=yes ;; --disable-readline) _readline=no ;; - --enable-opengl) _opengl=yes ;; - --disable-opengl) _opengl=no ;; --enable-verbose-build) _verbose_build=yes ;; --enable-plugins) _dynamic_modules=yes ;; --default-dynamic) _plugins_default=dynamic ;; @@ -887,11 +882,6 @@ for ac_option in $@; do READLINE_CFLAGS="-I$arg/include" READLINE_LIBS="-L$arg/lib" ;; - --with-opengl-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - OPENGL_CFLAGS="-I$arg/include" - OPENGL_LIBS="-L$arg/lib" - ;; --backend=*) _backend=`echo $ac_option | cut -d '=' -f 2` ;; @@ -1188,10 +1178,10 @@ HOSTEXEEXT=$_exeext # Determine separator used for $PATH # case $_host_os in -os2-emx* ) +os2-emx*) SEPARATOR=";" ;; -* ) +*) SEPARATOR=":" ;; esac @@ -1474,7 +1464,6 @@ case $_host_os in # We have to use 'long' for our 4 byte typedef because AmigaOS already typedefs (u)int32 # as (unsigned) long, and consequently we'd get a compiler error otherwise. type_4_byte='long' - add_line_to_config_mk 'AMIGAOS = 1' ;; android) CXXFLAGS="$CXXFLAGS -Os -msoft-float -mtune=xscale -march=armv5te -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5TE__" @@ -1501,7 +1490,6 @@ case $_host_os in ;; darwin*) DEFINES="$DEFINES -DMACOSX" - CXXFLAGS="$CXXFLAGS" LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI" add_line_to_config_mk 'MACOSX = 1' _unix=yes @@ -1515,7 +1503,13 @@ case $_host_os in CXXFLAGS="$CXXFLAGS -isystem $DEVKITPRO/libnds/include -isystem $DEVKITPRO/devkitARM/arm-eabi/include" CXXFLAGS="$CXXFLAGS -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -mthumb-interwork" CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-strict-aliasing" - LDFLAGS="$LDFLAGS -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections" + CXXFLAGS="$CXXFLAGS -fuse-cxa-atexit" + LDFLAGS="$LDFLAGS -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt" + if test "$_dynamic_modules" = no ; then + LDFLAGS="$LDFLAGS -Wl,--gc-sections" + else + LDFLAGS="$LDFLAGS -Wl,--retain-symbols-file,ds.syms" + fi LDFLAGS="$LDFLAGS -L$DEVKITPRO/libnds/lib" LIBS="$LIBS -lnds9" ;; @@ -1527,9 +1521,14 @@ case $_host_os in gamecube) CXXFLAGS="$CXXFLAGS -Os -mogc -mcpu=750 -meabi -mhard-float" CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched" + CXXFLAGS="$CXXFLAGS -fuse-cxa-atexit" CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include" # libogc is required to link the cc tests (includes _start()) LDFLAGS="$LDFLAGS -mogc -mcpu=750 -L$DEVKITPRO/libogc/lib/cube -logc" + if test "$_dynamic_modules" = "yes" ; then + # retarded toolchain patch forces --gc-sections, overwrite it + LDFLAGS="$LDFLAGS -Wl,--no-gc-sections" + fi ;; haiku*) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" @@ -1557,7 +1556,6 @@ case $_host_os in DEFINES="$DEFINES -DWIN32 -D__USE_MINGW_ANSI_STDIO=0" LIBS="$LIBS -lmingw32 -lwinmm" OBJS="$OBJS scummvmico.o" - add_line_to_config_mk 'WIN32 = 1' ;; mint*) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" @@ -1589,9 +1587,14 @@ case $_host_os in wii) CXXFLAGS="$CXXFLAGS -Os -mrvl -mcpu=750 -meabi -mhard-float" CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched" + CXXFLAGS="$CXXFLAGS -fuse-cxa-atexit" CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include" # libogc is required to link the cc tests (includes _start()) LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -L$DEVKITPRO/libogc/lib/wii -logc" + if test "$_dynamic_modules" = "yes" ; then + # retarded toolchain patch forces --gc-sections, overwrite it + LDFLAGS="$LDFLAGS -Wl,--no-gc-sections" + fi ;; wince) CXXFLAGS="$CXXFLAGS -O3 -march=armv4 -mtune=xscale" @@ -1640,9 +1643,9 @@ if test -n "$_host"; then _need_memalign=yes ;; caanoo) + # This uses the GPH backend. + DEFINES="$DEFINES -DGPH_DEVICE" 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 @@ -1731,9 +1734,9 @@ if test -n "$_host"; then add_line_to_config_h "#define USE_WII_DI" ;; gp2x) + # This uses the GPH backend. + DEFINES="$DEFINES -DGPH_DEVICE" 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 @@ -1755,9 +1758,9 @@ if test -n "$_host"; then _port_mk="backends/platform/gp2x/gp2x-bundle.mk" ;; gp2xwiz) + # This uses the GPH backend. + DEFINES="$DEFINES -DGPH_DEVICE" 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 @@ -1803,6 +1806,8 @@ if test -n "$_host"; then _ranlib=$_host-ranlib ;; mips-sgi*) + LDFLAGS="$LDFLAGS -static-libgcc" + LIBS="$LIBS -laudio" _endian=big _need_memalign=yes ;; @@ -1858,7 +1863,7 @@ if test -n "$_host"; then _dynamic_modules=no _plugins_default=static # Force use of libmad, libtremor and zlib - _mad=yes + _mad=no _tremor=yes _zlib=yes _port_mk="backends/platform/n64/n64.mk" @@ -1873,8 +1878,6 @@ if test -n "$_host"; then ;; 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 @@ -2128,6 +2131,13 @@ PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--no-whole-archive ' ;; + ds) + _elf_loader=yes + DEFINES="$DEFINES -DARM_TARGET -DELF_LOADER_CXA_ATEXIT -DONE_PLUGIN_AT_A_TIME" +_mak_plugins=' +PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mno-fpu +' + ;; freebsd*) _def_plugin=' #define PLUGIN_PREFIX "lib" @@ -2145,6 +2155,13 @@ PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive ' ;; + gamecube | wii) + _elf_loader=yes + DEFINES="$DEFINES -DPPC_TARGET -DELF_LOADER_CXA_ATEXIT -DONE_PLUGIN_AT_A_TIME" +_mak_plugins=' +PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/wii/plugin.ld +' + ;; gph*) _def_plugin=' #define PLUGIN_PREFIX "" @@ -2197,21 +2214,20 @@ PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a ' ;; - psp) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plg" + ps2) + _elf_loader=yes + DEFINES="$DEFINES -DMIPS_TARGET" +_mak_plugins=' +LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T$(srcdir)/backends/plugins/ps2/main_prog.ld +PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc ' + ;; + psp) + _elf_loader=yes + DEFINES="$DEFINES -DMIPS_TARGET" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -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 -PRE_OBJS_FLAGS := -Wl,--whole-archive -POST_OBJS_FLAGS := -Wl,--no-whole-archive +LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/main_prog.ld +PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/plugin.ld -lstdc++ -lc ' ;; *) @@ -2223,6 +2239,27 @@ POST_OBJS_FLAGS := -Wl,--no-whole-archive echo "$_dynamic_modules" fi +# +# Check whether integrated ELF loader support is requested +# +define_in_config_if_yes "$_elf_loader" 'USE_ELF_LOADER' + +if test "$_elf_loader" = yes; then + CXXFLAGS="$CXXFLAGS -DDYNAMIC_MODULES" + _def_plugin=' +#define PLUGIN_PREFIX "" +#define PLUGIN_SUFFIX ".plg" +' + _mak_plugins=' +DYNAMIC_MODULES := 1 +PLUGIN_PREFIX := +PLUGIN_SUFFIX := .plg +PLUGIN_EXTRA_DEPS = $(EXECUTABLE) +PLUGIN_LDFLAGS = -nostartfiles backends/plugins/elf/version.o -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms +PRE_OBJS_FLAGS := -Wl,--whole-archive +POST_OBJS_FLAGS := -Wl,--no-whole-archive +'"$_mak_plugins" +fi # # Check whether integrated MT-32 emulator support is requested @@ -2387,16 +2424,21 @@ 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; } +int main(void) { +#if PNG_LIBPNG_VER >= 10208 +#else + syntax error +#endif + return 0; +} EOF - cc_check_no_clean $PNG_CFLAGS $PNG_LIBS -lpng && $TMPO$HOSTEXEEXT && _png=yes - cc_check_clean + cc_check $PNG_CFLAGS $PNG_LIBS -lpng && _png=yes 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' +define_in_config_if_yes "$_png" 'USE_PNG' echo "$_png" if test `get_engine_build sword25` = yes && test ! "$_png" = yes ; then @@ -2425,16 +2467,11 @@ if test "$_theoradec" = yes ; then LIBS="$LIBS $THEORADEC_LIBS -ltheoradec" INCLUDES="$INCLUDES $THEORADEC_CFLAGS" fi -define_in_config_h_if_yes "$_theoradec" 'USE_THEORADEC' +define_in_config_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 # @@ -2589,51 +2626,6 @@ define_in_config_h_if_yes "$_readline" 'USE_READLINE' define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE' # -# Check for OpenGL (ES) -# - -echocheck "OpenGL (ES)" -if test "$_opengl" = auto ; then - _opengl=no - if test "$_backend" = "sdl" ; then - case $_host_os in - *darwin*) - _opengl=yes - ;; - *mingw*) - _opengl=yes - ;; - *) - cat > $TMPC << EOF -#include <GL/gl.h> -int main(void) { return GL_VERSION_1_1; } -EOF - cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS -lGL && _opengl=yes - esac - fi -fi -if test "$_opengl" = yes ; then - LIBS="$LIBS $OPENGL_LIBS" - INCLUDES="$INCLUDES $OPENGL_CFLAGS" - DEFINES="$DEFINES -DUSE_OPENGL" - case $_host_os in - *darwin*) - INCLUDES="$INCLUDES -I/System/Library/Frameworks/OpenGL.framework/Headers" - LIBS="$LIBS -framework OpenGL" - ;; - *mingw*) - LIBS="$LIBS -lopengl32" - ;; - *) - LIBS="$LIBS -lGL" - esac -fi - -echo "$_opengl" - -add_to_config_mk_if_yes "$_opengl" 'USE_OPENGL=1' - -# # Check for nasm # if test "$_have_x86" = yes ; then @@ -2732,8 +2724,16 @@ test "x$prefix" = xNONE && prefix=/usr/local test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFINES="$DEFINES -DDATA_PATH=\\\"$datadir\\\"" -DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir/scummvm\\\"" +case $_backend in + openpandora) + # Add ../plugins as a path so plugins can be found when running from a .PND. + DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"../plugins\\\"" + ;; + *) + DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir/scummvm\\\"" + ;; +esac # # Set variables for profiling. @@ -2883,12 +2883,14 @@ case $_backend in # TODO ps2 DEFINES="$DEFINES -D_EE -DFORCE_RTL" INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" - LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" + if test "$_dynamic_modules" = no ; then + LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" + fi LDFLAGS="$LDFLAGS -L$PS2SDK/ee/lib -L$PS2SDK/ports/lib" LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lm -lc -lfileXio -lkernel -lstdc++ " ;; psp) - DEFINES="$DEFINES -D__PSP__ -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" + DEFINES="$DEFINES -D__PSP__ -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" ;; samsungtv) @@ -3147,4 +3149,3 @@ include \$(srcdir)/Makefile EOF fi - |