diff options
author | Matthew Hoops | 2011-07-20 09:27:39 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-07-20 09:27:39 -0400 |
commit | ad293b249e74dd1cfbdbd721d02145efbdaf9eca (patch) | |
tree | e568d96f6d7f64c5e58b4c7cd1c4fda7e649bfc7 /configure | |
parent | d7411acc2b1c7702280dbff1c3e1bafee528184b (diff) | |
parent | e25e85fbb047fef895ede97c3c2c73451631052c (diff) | |
download | scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.gz scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.bz2 scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 261 |
1 files changed, 237 insertions, 24 deletions
@@ -65,8 +65,12 @@ get_var() { # Add an engine: id name build subengines add_engine() { _engines="${_engines} ${1}" + if test "${3}" = "no" ; then + set_var _wip_engines "${_wip_engines} ${1}" + fi set_var _engine_${1}_name "${2}" set_var _engine_${1}_build "${3}" + set_var _engine_${1}_build_default "${3}" set_var _engine_${1}_subengines "${4}" for sub in ${4}; do set_var _engine_${sub}_sub "yes" @@ -83,6 +87,7 @@ add_engine cine "Cinematique evo 1" yes add_engine cruise "Cinematique evo 2" yes add_engine draci "Dragon History" yes add_engine drascula "Drascula: The Vampire Strikes Back" yes +add_engine dreamweb "Dreamweb" no add_engine gob "Gobli*ns" yes add_engine groovie "Groovie" yes "groovie2" add_engine groovie2 "Groovie 2 games" no @@ -117,7 +122,6 @@ add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes add_engine tsage "Ringworld: Revenge Of The Patriarch" no add_engine tucker "Bud Tucker in Double Trouble" yes - # # Default settings # @@ -138,6 +142,8 @@ _fluidsynth=auto _opengl=auto _opengles=auto _readline=auto +_taskbar=yes +_libunity=auto # Default option behaviour yes/no _debug_build=auto _release_build=auto @@ -148,6 +154,7 @@ _build_scalers=yes _build_hq_scalers=yes _enable_prof=no _global_constructors=no +_bink=yes # Default vkeybd/keymapper options _vkeybd=no _keymapper=no @@ -168,7 +175,8 @@ _strip=strip _ar="ar cru" _as="as" _windres=windres -_win32path="build/x86" +_stagingpath="staging" +_win32path="c:/scummvm" _aos4path="Games:ScummVM" _staticlibpath=/sw _sdlconfig=sdl-config @@ -176,6 +184,7 @@ _sdlpath="$PATH" _nasmpath="$PATH" NASMFLAGS="" NASM="" +_tainted_build=no # The following variables are automatically detected, and should not # be modified otherwise. Consider them read-only. _posix=no @@ -423,6 +432,11 @@ get_engine_build() { get_var _engine_$1_build } +# Was this engine set to be built by default? +get_engine_build_default() { + get_var _engine_$1_build_default +} + # Get the subengines get_engine_subengines() { get_var _engine_$1_subengines @@ -542,12 +556,19 @@ prepare_engine_build_strings() { if test -n "$string" ; then _engines_skipped="${_engines_skipped}#$string@" fi + + string=`get_engine_build_string $1 wip` + if test -n "$string" ; then + _engines_built_wip="${_engines_built_wip}#$string@" + fi + } # Get the string about building an engine get_engine_build_string() { engine_string="" engine_build=`get_engine_build $1` + engine_build_default=`get_engine_build_default $1` show=no # Check if the current engine should be shown for the current status @@ -563,6 +584,14 @@ get_engine_build_string() { fi done fi + # Test for enabled wip sub-engines + if test $2 = wip ; then + for subeng in `get_engine_subengines $1` ; do + if test `get_engine_build $subeng` != no -a `get_engine_build_default $subeng` = no ; then + show=yes + fi + done + fi fi # Convert static/dynamic to yes to ease the check of subengines @@ -570,13 +599,18 @@ get_engine_build_string() { engine_build=yes fi + # Check if it is a wip engine + if test "$2" = "wip" -a "$engine_build" != "no" -a "$engine_build_default" = no; then + show=yes + fi + # The engine should be shown, build the string if test $show = yes ; then build_string_func=get_${1}_build_string if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then - engine_string=`$build_string_func $1 $engine_build` + engine_string=`$build_string_func $1 $engine_build $2` else - engine_string=`get_subengines_build_string $1 $engine_build` + engine_string=`get_subengines_build_string $1 $engine_build "" $2` fi engine_string="`get_engine_name $1` $engine_string" @@ -588,14 +622,29 @@ get_engine_build_string() { # Get the string about building subengines get_subengines_build_string() { all=yes + parent_engine=$1 subengine_string=$3 - for subeng in `get_engine_subengines $1` ; do - if test `get_engine_build $subeng` = $2 ; then + parent_status=$4 + parent_engine_build_default=`get_engine_build_default $parent_engine` + + for subeng in `get_engine_subengines $parent_engine` ; do + subengine_build=`get_engine_build $subeng` + subengine_build_default=`get_engine_build_default $subeng` + if test \( $subengine_build = $2 -a "$parent_status" != wip \) -o \( "$parent_status" = wip -a $subengine_build != no -a "$subengine_build_default" = no \) ; then subengine_string="$subengine_string [`get_engine_name $subeng`]" else all=no fi + + # handle engines that are on by default and have a single subengine that is off by default + if test "$parent_status" = wip ; then + if test $parent_engine_build_default = yes -a subengine ; then + all=no + fi + fi + done + if test $2 != no ; then if test -n "$subengine_string" ; then if test $all = yes ; then @@ -610,19 +659,19 @@ get_subengines_build_string() { # Engine specific build strings get_scumm_build_string() { if test `get_engine_build $1` != no ; then - if test $2 != no ; then + if test $2 != no -a "$3" != wip ; then base="[v0-v6 games]" fi - get_subengines_build_string $1 $2 "$base" + get_subengines_build_string $1 $2 "$base" $3 fi } get_saga_build_string() { if test `get_engine_build $1` != no ; then - if test $2 != no ; then + if test $2 != no -a "$3" != wip; then base="[ITE]" fi - get_subengines_build_string $1 $2 "$base" + get_subengines_build_string $1 $2 "$base" $3 fi } @@ -698,6 +747,7 @@ Special configuration feature: n64 for Nintendo 64 openpandora for OpenPandora ps2 for PlayStation 2 + ps3 for PlayStation 3 psp for PlayStation Portable samsungtv for Samsung TV webos for HP Palm WebOS @@ -722,9 +772,11 @@ Optional Features: --disable-scalers exclude scalers --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-text-console use text console instead of graphical console --enable-verbose-build enable regular echoing of commands during build process + --disable-bink don't build with Bink video support Optional Libraries: --with-alsa-prefix=DIR Prefix where alsa is installed (optional) @@ -771,6 +823,9 @@ Optional Libraries: --with-readline-prefix=DIR Prefix where readline is installed (optional) --disable-readline disable readline support in text console [autodetect] + --with-libunity-prefix=DIR Prefix where libunity is installed (optional) + --disable-libunity disable Unity launcher integration [autodetect] + Some influential environment variables: LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> @@ -818,8 +873,14 @@ for ac_option in $@; do --disable-fluidsynth) _fluidsynth=no ;; --enable-readline) _readline=yes ;; --disable-readline) _readline=no ;; + --enable-taskbar) _taskbar=yes ;; + --disable-taskbar) _taskbar=no ;; + --enable-libunity) _libunity=yes ;; + --disable-libunity) _libunity=no ;; --enable-opengl) _opengl=yes ;; --disable-opengl) _opengl=no ;; + --enable-bink) _bink=yes ;; + --disable-bink) _bink=no ;; --enable-verbose-build) _verbose_build=yes ;; --enable-plugins) _dynamic_modules=yes ;; --default-dynamic) _plugins_default=dynamic ;; @@ -893,6 +954,11 @@ for ac_option in $@; do READLINE_CFLAGS="-I$arg/include" READLINE_LIBS="-L$arg/lib" ;; + --with-libunity-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + LIBUNITY_CFLAGS="-I$arg/include" + LIBUNITY_LIBS="-L$arg/lib" + ;; --with-opengl-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` OPENGL_CFLAGS="-I$arg/include" @@ -1072,6 +1138,22 @@ ps2) _host_cpu=mips64r5900el _host_alias=ee ;; +ps3) + _host_os=ps3 + _host_cpu=ppc + _host_alias=powerpc64-ps3-elf + + # The prefix is always the same on PS3 so we hardcode the default + # here. It is still possible to define a custom prefix which is + # needed when packaging the app with a user-specific app ID. + test "x$prefix" = xNONE && prefix=/dev_hdd0/game/SCUM12000/USRDIR + # PS3 apps are installed into app-specific directories. The + # default directory structure of ScummVM makes no sense here so we + # hardcode PS3 specific directories here. + datarootdir='${prefix}/data' + datadir='${datarootdir}' + docdir='${prefix}/doc' + ;; psp) _host_os=psp _host_cpu=mipsallegrexel @@ -1213,6 +1295,12 @@ ps2) exit 1 fi ;; +ps3) + if test -z "$PS3DEV"; then + echo "Please set PS3DEV in your environment. export PS3DEV=<path to ps3 toolchain>" + exit 1 + fi + ;; psp) if test -z "$PSPDEV"; then PSPDEV=`psp-config --pspdev-path` @@ -1405,7 +1493,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 | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince ) + amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | wii | wince ) ;; *) CXXFLAGS="$CXXFLAGS -ansi" @@ -1770,7 +1858,8 @@ case $_host_os in mingw*) DEFINES="$DEFINES -DWIN32" DEFINES="$DEFINES -D__USE_MINGW_ANSI_STDIO=0" - LIBS="$LIBS -lmingw32 -lwinmm" + LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" + LIBS="$LIBS -lmingw32 -lwinmm -lgdi32" OBJS="$OBJS scummvmwinres.o" add_line_to_config_mk 'WIN32 = 1' ;; @@ -1794,6 +1883,16 @@ case $_host_os in DEFINES="$DEFINES -D_EE" DEFINES="$DEFINES -D__PLAYSTATION2__" ;; + ps3) + # Force use of SDL from the ps3 toolchain + _sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin" + + DEFINES="$DEFINES -DPLAYSTATION3" + CXXFLAGS="$CXXFLAGS -mcpu=cell -mminimal-toc -I$PS3DEV/psl1ght/ppu/include -I$PS3DEV/portlibs/ppu/include" + LDFLAGS="$LDFLAGS -L$PS3DEV/psl1ght/ppu/lib -L$PS3DEV/portlibs/ppu/lib" + add_line_to_config_mk 'PLAYSTATION3 = 1' + add_line_to_config_h "#define PREFIX \"${prefix}\"" + ;; psp) if test -d "$PSPDEV/psp/lib"; then LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" @@ -1970,6 +2069,7 @@ if test -n "$_host"; then gamecube) _backend="wii" _build_scalers=no + _vkeybd=yes _mt32emu=no _port_mk="backends/platform/wii/wii.mk" add_line_to_config_mk 'GAMECUBE = 1' @@ -2151,6 +2251,11 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -s" fi ;; + ps3) + _mt32emu=no + _timidity=no + _vkeybd=yes + ;; psp) _backend="psp" _build_scalers=no @@ -2179,6 +2284,7 @@ if test -n "$_host"; then wii) _backend="wii" _build_scalers=no + _vkeybd=yes _port_mk="backends/platform/wii/wii.mk" add_line_to_config_mk 'GAMECUBE = 0' add_line_to_config_h '#define AUDIO_REVERSE_STEREO' @@ -2193,6 +2299,7 @@ if test -n "$_host"; then LDFLAGS="$LDFLAGS -Wl,--stack,65536" _tremolo=yes _backend="wince" + _detectlang=yes _mt32emu=no _port_mk="backends/platform/wince/wince.mk" ;; @@ -2207,16 +2314,9 @@ fi # case $_backend in android) - # ssp at this point so the cxxtests link - if test "$_debug_build" = yes; then - CXXFLAGS="$CXXFLAGS -fstack-protector" - else - CXXFLAGS="$CXXFLAGS -fno-stack-protector" - fi + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" CXXFLAGS="$CXXFLAGS -Wa,--noexecstack" LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" - - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; dc) INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc' @@ -2340,6 +2440,15 @@ case $_backend in LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" DEFINES="$DEFINES -DSDL_BACKEND" add_line_to_config_mk "SDL_BACKEND = 1" + + _sdlversion=`$_sdlconfig --version` + case $_sdlversion in + 1.3.*) + add_line_to_config_mk "USE_SDL13 = 1" + ;; + *) + ;; + esac ;; esac @@ -2371,7 +2480,7 @@ esac # echo_n "Checking if host is POSIX compliant... " case $_host_os in - amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | psp | wii | wince) + 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* | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) @@ -2927,6 +3036,43 @@ define_in_config_h_if_yes "$_readline" 'USE_READLINE' define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE_FOR_DEBUGGER' # +# Check for Unity if taskbar integration is enabled +# +echocheck "libunity" +if test "$_unix" = no || test "$_taskbar" = no; then + _libunity=no +else +if test "$_libunity" = auto ; then + case $_host_os in + mingw*) + # pkgconfig and unity are not supported on mingw + _libunity=no + ;; + *) + # 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=no + cat > $TMPC << EOF +#include <unity.h> +int main(void) { + unity_launcher_entry_get_for_desktop_id("scummvm.desktop"); + return 0; +} +EOF + cc_check $LIBUNITY_CFLAGS $LIBUNITY_LIBS && _libunity=yes + ;; + esac +fi +if test "$_libunity" = yes ; then + LIBS="$LIBS $LIBUNITY_LIBS" + INCLUDES="$INCLUDES $LIBUNITY_CFLAGS" +fi +define_in_config_h_if_yes "$_libunity" 'USE_TASKBAR_UNITY' +fi +echo "$_libunity" + +# # Check for OpenGL (ES) # echocheck "OpenGL" @@ -3084,12 +3230,14 @@ if test "$_translation" = no ; then else echo_n "yes (" - cat > $TMPC << EOF + if test "$_detectlang" != yes ; then + cat > $TMPC << EOF #include <locale.h> int main(void) { setlocale(LC_ALL, ""); return 0; } EOF - _detectlang=no - cc_check $LDFLAGS $CXXFLAGS && _detectlang=yes + _detectlang=no + cc_check $LDFLAGS $CXXFLAGS && _detectlang=yes + fi define_in_config_h_if_yes $_detectlang 'USE_DETECTLANG' if test "$_detectlang" = yes ; then @@ -3100,6 +3248,36 @@ EOF fi # +# Check whether to build taskbar integration support +# +echo_n "Building taskbar integration support... " +define_in_config_if_yes $_taskbar 'USE_TASKBAR' +if test "$_taskbar" = yes; then + case $_host_os in + mingw*) + LIBS="$LIBS -lole32 -luuid" + echo "win32" + ;; + *) + if test "$_libunity" = yes; then + echo "unity" + else + echo "$_taskbar" + fi + ;; + esac +else + echo "$_taskbar" +fi + +# +# Check whether to build Bink video support +# +echo_n "Building Bink video support... " +define_in_config_if_yes $_bink 'USE_BINK' +echo "$_bink" + +# # Figure out installation directories # test "x$prefix" = xNONE && prefix=/usr/local @@ -3135,6 +3313,10 @@ fi echo_n "Backend... " echo_n "$_backend" +if test "$_backend" = "sdl" -a -n "$_sdlversion"; then + echo_n " ($_sdlversion)" +fi + if test "$_nasm" = yes ; then echo_n ", assembly routines" fi @@ -3175,6 +3357,13 @@ fi # case $_backend in android) + # ssp at this point so the cxxtests link + if test "$_debug_build" = yes; then + CXXFLAGS="$CXXFLAGS -fstack-protector" + else + CXXFLAGS="$CXXFLAGS -fno-stack-protector" + fi + static_libs='' system_libs='' for lib in $LIBS; do @@ -3256,6 +3445,23 @@ for engine in $_engines; do done # +# Detection of WIP/unstable engines +# +for engine in $_engines; do + engine_build=`get_engine_build $engine` + engine_build_default=`get_engine_build_default $engine` + engine_wip=false + if test $engine_build != no -a $engine_build_default = no ; then + engine_wip=true + set_var _tainted_build "yes" + fi + engine_wip_defname="ENGINE_WIP_`echo $engine | tr '[a-z]' '[A-Z]'`" + add_line_to_config_h "#define $engine_wip_defname $engine_wip" +done + +add_to_config_h_if_yes `get_var _tainted_build` '#define TAINTED_BUILD' + +# # Show which engines ("frontends") are to be built # echo @@ -3280,6 +3486,12 @@ if test -n "$_engines_skipped" ; then s/#/ /g' fi +if test -n "$_engines_built_wip" ; then + echo "WARNING: This ScummVM build contains the following UNSTABLE engines:" + echo $_engines_built_wip | sed 's/@/\ +/g +s/#/ /g' +fi echo echo "Creating config.h" @@ -3320,6 +3532,7 @@ AS := $_as ASFLAGS := $ASFLAGS WINDRES := $_windres WINDRESFLAGS := $WINDRESFLAGS +STAGINGPATH=$_stagingpath WIN32PATH=$_win32path AOS4PATH=$_aos4path STATICLIBPATH=$_staticlibpath |