diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 267 |
1 files changed, 224 insertions, 43 deletions
@@ -83,7 +83,7 @@ add_engine he "HE71+ games" yes add_engine agi "AGI" yes add_engine agos "AGOS" yes "agos2" add_engine agos2 "AGOS 2 games" yes -add_engine cge "CGE" no +add_engine cge "CGE" yes add_engine cine "Cinematique evo 1" yes add_engine composer "Magic Composer" no add_engine cruise "Cinematique evo 2" yes @@ -94,11 +94,11 @@ add_engine gob "Gobli*ns" yes add_engine groovie "Groovie" yes "groovie2" add_engine groovie2 "Groovie 2 games" no add_engine hugo "Hugo Trilogy" yes -add_engine kyra "Legend of Kyrandia" yes "lol" +add_engine kyra "Legend of Kyrandia" yes "lol eob" add_engine lol "Lands of Lore" yes +add_engine eob "Eye of the Beholder" 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 add_engine mohawk "Mohawk" yes "cstime myst riven" add_engine cstime "Where in Time is Carmen Sandiego?" no @@ -119,9 +119,10 @@ 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 toltecs "3 Skulls of the Toltecs" no add_engine toon "Toonstruck" yes add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes -add_engine tsage "Ringworld: Revenge Of The Patriarch" yes +add_engine tsage "TsAGE" yes add_engine tucker "Bud Tucker in Double Trouble" yes # @@ -138,13 +139,14 @@ _seq_midi=auto _timidity=auto _zlib=auto _sparkle=auto -_png=auto +_png=no _theoradec=auto _faad=auto _fluidsynth=auto _opengl=auto _opengles=auto _readline=auto +_freetype2=auto _taskbar=yes _updates=no _libunity=auto @@ -188,7 +190,9 @@ _win32path="c:/scummvm" _aos4path="Games:ScummVM" _staticlibpath=/sw _sdlconfig=sdl-config +_freetypeconfig=freetype-config _sdlpath="$PATH" +_freetypepath="$PATH" _nasmpath="$PATH" NASMFLAGS="" NASM="" @@ -384,6 +388,40 @@ find_sdlconfig() { } # +# Determine freetype-config +# +find_freetypeconfig() { + echo_n "Looking for freetype-config... " + freetypeconfigs="$_freetypeconfig" + _freetypeconfig= + + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR" + for path_dir in $_freetypepath; do + #reset separator to parse freetypeconfigs + IFS=":" + for freetypeconfig in $freetypeconfigs; do + if test -f "$path_dir/$freetypeconfig" ; then + _freetypeconfig="$path_dir/$freetypeconfig" + echo $_freetypeconfig + # Save the prefix + _freetypepath=$path_dir + if test `basename $path_dir` = bin ; then + _freetypepath=`dirname $path_dir` + fi + # break at first freetype-config found in path + break 2 + fi + done + done + + IFS="$ac_save_ifs" + + if test -z "$_freetypeconfig"; then + echo "none found!" + fi +} + +# # Determine extension used for executables # get_system_exe_extension() { @@ -412,19 +450,39 @@ get_system_exe_extension() { # Show the configure help line for an option option_help() { + if test "${3}" != "" ; then + tmpopt_prefix="${3}" + else + tmpopt_prefix="--" + fi tmpopt=`echo $1 | sed 's/_/-/g'` - option=`echo "--${tmpopt} " | sed "s/\(.\{23\}\).*/\1/"` + option=`echo "${tmpopt_prefix}${tmpopt} " | sed "s/\(.\{23\}\).*/\1/"` echo " ${option} ${2}" } # Show an error about an unknown option option_error() { - echo "error: unrecognised option: $ac_option + echo "error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + exit 1 +} + +# Show an error about an unknown engine +engine_option_error() { + echo "error: unrecognized engine: $1 +Try \`$0 --help' for more information." >&2 + exit 1 +} + +# Show an error about an invalid subengine option +subengine_option_error() { + echo "error: this option is invalid for the subengine $1: $ac_option Try \`$0 --help' for more information." >&2 exit 1 } + # # Engine handling functions # @@ -475,9 +533,9 @@ engine_disable_all() { # Enable the given engine engine_enable() { # Get the parameter - if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then - eng=`echo $1 | cut -d '=' -f 1` - opt=`echo $1 | cut -d '=' -f 2` + if ( echo $1 | grep ':' ) 2> /dev/null > /dev/null ; then + eng=`echo $1 | cut -d ':' -f 1` + opt=`echo $1 | cut -d ':' -f 2` else eng=$1 opt=yes @@ -486,7 +544,7 @@ engine_enable() { # Filter the parameter for the subengines if test "`get_engine_sub ${engine}`" != "no" -a "$opt" != "yes" ; then - option_error + subengine_option_error ${engine} return fi @@ -494,7 +552,7 @@ engine_enable() { if test "`get_engine_name ${engine}`" != "" ; then set_var _engine_${engine}_build "$opt" else - option_error + engine_option_error ${engine} fi else option_error @@ -513,21 +571,14 @@ engine_disable() { if test "`get_engine_name ${engine}`" != "" ; then set_var _engine_${engine}_build "no" else - option_error + engine_option_error ${engine} fi } # Show the configure help line for a given engine show_engine_help() { - if test `get_engine_build $1` = yes ; then - option="disable" - do="don't " - else - option="enable" - do="" - fi name=`get_engine_name $1` - option_help ${option}-${1} "${do}build the ${name} engine" + option_help "${1}" "${name} engine" " " for sub in `get_engine_subengines $1`; do show_subengine_help $sub $1 done @@ -535,16 +586,9 @@ show_engine_help() { # Show the configure help line for a given subengine show_subengine_help() { - if test `get_engine_build $1` = yes ; then - option="disable" - do="exclude" - else - option="enable" - do="include" - fi name=`get_engine_name $1` parent=`get_engine_name $2` - option_help ${option}-${1} "${do} the ${name} in ${parent} engine" + option_help "${1}" "${name} in ${parent} engine" " " } # Prepare the strings about the engines to build @@ -767,6 +811,13 @@ Game engines: --enable-all-engines enable all engines, including those which are broken or unsupported --disable-all-engines disable all engines + --enable-engine=<engine name>[,<engine name>...] enable engine(s) listed + --disable-engine=<engine name>[,<engine name>...] disable engine(s) listed + --enable-engine-static=<engine name>[,<engine name>...] + enable engine(s) listed as static builtin (when plugins are enabled) + --enable-engine-dynamic=<engine name>[,<engine name>...] + enable engine(s) listed as dynamic plugin (when plugins are enabled) + The values of <engine name> for these options are as follows: $engines_help Optional Features: --disable-debug disable building with debugging symbols @@ -833,6 +884,9 @@ Optional Libraries: --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) + --with-freetype-prefix=DIR Prefix where the freetype-config script is + installed (optional) + --with-nasm-prefix=DIR Prefix where nasm executable is installed (optional) --disable-nasm disable assembly language optimizations [autodetect] @@ -892,6 +946,8 @@ for ac_option in $@; do --disable-fluidsynth) _fluidsynth=no ;; --enable-readline) _readline=yes ;; --disable-readline) _readline=no ;; + --enable-freetype2) _freetype2=yes ;; + --disable-freetype2) _freetype2=no ;; --enable-taskbar) _taskbar=yes ;; --disable-taskbar) _taskbar=no ;; --enable-updates) _updates=yes ;; @@ -1029,6 +1085,10 @@ for ac_option in $@; do arg=`echo $ac_option | cut -d '=' -f 2` _sdlpath="$arg:$arg/bin" ;; + --with-freetype2-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + _freetypepath="$arg:$arg/bin" + ;; --with-nasm-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` _nasmpath="$arg:$arg/bin" @@ -1069,11 +1129,25 @@ for ac_option in $@; do --disable-all-engines) engine_disable_all ;; - --enable-*) - engine_enable `echo $ac_option | cut -d '-' -f 4-` + --enable-engine=* | --enable-engines=*) + for engine_name in `echo $ac_option | cut -d '=' -f 2- | tr ',' '\n'`; do + engine_enable "${engine_name}" + done + ;; + --enable-engine-static=* | --enable-engines-static=*) + for engine_name in `echo $ac_option | cut -d '=' -f 2- | tr ',' '\n'`; do + engine_enable "${engine_name}:static" + done + ;; + --enable-engine-dynamic=* | --enable-engines-dynamic=*) + for engine_name in `echo $ac_option | cut -d '=' -f 2- | tr ',' '\n'`; do + engine_enable "${engine_name}:dynamic" + done ;; - --disable-*) - engine_disable `echo $ac_option | cut -d '-' -f 4-` + --disable-engine=* | --disable-engines=*) + for engine_name in `echo $ac_option | cut -d '=' -f 2 | tr ',' '\n'`; do + engine_disable ${engine_name} + done ;; *) option_error @@ -1253,7 +1327,7 @@ wii) wince) _host_os=wince _host_cpu=arm - _host_alias=arm-wince-mingw32ce + _host_alias=arm-mingw32ce ;; *) if test -n "$_host"; then @@ -1547,7 +1621,7 @@ fi echo "$cxx_version" # -# Bail out now if now useable compiler was found. +# Bail out now if no useable compiler was found. # if test "$cxx_verc_fail" = yes ; then echo @@ -1592,7 +1666,7 @@ fi; # 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) +android | gamecube | psp | wii | webos) ;; *) # ICC does not support pedantic, while GCC and clang do. @@ -1655,7 +1729,7 @@ esac # Determine a data type with the given length # find_type_with_size() { - for datatype in int short char long unknown; do + for datatype in int short char long "long long" unknown; do cat > tmp_find_type_with_size.cpp << EOF typedef $datatype ac__type_sizeof_; int main() { @@ -1679,6 +1753,35 @@ EOF } # +# Check whether the system is 32-bit +# +pointer_is_32bit() { + cat > tmp_pointer_is_32bit.cpp << EOF +int main() { + static int test_array[1 - 2 * !(sizeof(void *) == 4)]; + test_array[0] = 0; + return 0; +} +EOF + $CXX $CXXFLAGS -c -o $TMPO.o tmp_pointer_is_32bit.cpp 2>/dev/null + status=$? + cc_check_clean tmp_pointer_is_32bit.cpp + return $status +} + +echo_n "Checking 64-bitness... " +pointer_is_32bit +if test $? -eq 0; then + type_ptr=int32 + echo "no" + add_line_to_config_h "/* #define SCUMM_64BITS */" +else + type_ptr=int64 + echo "yes" + add_line_to_config_h "#define SCUMM_64BITS" +fi + +# # Determine data type sizes # echo_n "Type with 1 byte... " @@ -1699,6 +1802,17 @@ TMPR="$?" echo "$type_4_byte" test $TMPR -eq 0 || exit 1 # check exit code of subshell +echo_n "Type with 8 bytes... " +type_8_byte=`find_type_with_size 8` +TMPR="$?" +echo "$type_8_byte" +if test $TMPR -eq 0; then + _def_64bit_type_signed="typedef signed $type_8_byte int64;" + _def_64bit_type_unsigned="typedef unsigned $type_8_byte uint64;" +fi +# force cleanup after check for 8 bytes type +cc_check_clean tmp_find_type_with_size.cpp + # # Check whether memory alignment is required # @@ -1865,7 +1979,7 @@ case $_host_os in # Now we may have MacPorts or Fink installed # Which put libraries and headers in non-standard places # Checking them here - + # MacPorts # There is no way to get the prefix, so implementing a hack here macport_version=`port version 2>/dev/null` @@ -2021,6 +2135,7 @@ case $_host_os in LIBS="$LIBS -lnsl -lsocket" ;; webos) + CXXFLAGS="$CXXFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot" CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include" CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include/SDL" CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/device/usr/include" @@ -2252,8 +2367,10 @@ if test -n "$_host"; then iphone) DEFINES="$DEFINES -DIPHONE" _backend="iphone" - _build_hq_scalers=no + _build_scalers=no + _mt32emu=no _seq_midi=no + _timidity=no ;; m68k-atari-mint) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" @@ -2266,11 +2383,12 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s" CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" INCLUDES="$INCLUDES -I/usr/X11R6/include" - LIBS="$LIBS -lpthread" + LIBS="$LIBS -lX11" LIBS="$LIBS -L/usr/lib" _backend="maemo" _vkeybd=yes + _keymapper=yes _build_hq_scalers=no _mt32emu=no _alsa=no @@ -2468,8 +2586,9 @@ case $_backend in DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" CXXFLAGS="$CXXFLAGS -Wa,--noexecstack" LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + INCLUDES="$INCLUDES -I$ANDROID_NDK/sources/cxx-stl/system/include" ;; - bada) + 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" @@ -2523,7 +2642,6 @@ case $_backend in gph) ;; iphone) - OBJCFLAGS="$OBJCFLAGS --std=c99" LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES" LIBS="$LIBS -framework QuartzCore -framework GraphicsServices -framework CoreFoundation" LIBS="$LIBS -framework Foundation -framework AudioToolbox -framework CoreAudio" @@ -2640,7 +2758,7 @@ esac # Enable 16bit support only for backends which support it # case $_backend in - android | bada | dingux | dreamcast | gph | maemo | openpandora | psp | samsungtv | sdl | webos | wii) + android | bada | dingux | dreamcast | gph | iphone | maemo | openpandora | psp | samsungtv | sdl | webos | wii) if test "$_16bit" = auto ; then _16bit=yes else @@ -3343,6 +3461,50 @@ fi echo "$_libunity" # +# Check for FreeType2 to be present +# +if test "$_freetype2" != "no"; then + + # Look for the freetype-config script + find_freetypeconfig + + if test -z "$_freetypeconfig"; then + _freetype2=no + else + FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --libs` + FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$_freetypepath" --cflags` + + if test "$_freetype2" = "auto"; then + _freetype2=no + + cat > $TMPC << EOF +#include <ft2build.h> +#include FT_FREETYPE_H + +int main(int argc, char *argv[]) { + FT_Library library; + FT_Error error = FT_Init_FreeType(&library); + FT_Done_FreeType(library); +} +EOF + + cc_check $FREETYPE2_CFLAGS $FREETYPE2_LIBS && _freetype2=yes + fi + + if test "$_freetype2" = "yes"; then + LIBS="$LIBS $FREETYPE2_LIBS" + INCLUDES="$INCLUDES $FREETYPE2_CFLAGS" + fi + fi + +fi + +echocheck "FreeType2" +echo "$_freetype2" + +define_in_config_h_if_yes "$_freetype2" "USE_FREETYPE2" + +# # Check for OpenGL (ES) # echocheck "OpenGL" @@ -3823,6 +3985,25 @@ typedef unsigned $type_4_byte uint32; typedef signed $type_1_byte int8; typedef signed $type_2_byte int16; typedef signed $type_4_byte int32; +EOF + +if test -n "$_def_64bit_type_unsigned" ; then +cat >> config.h << EOF + +/* 64-bit stuff */ +$_def_64bit_type_signed +#if defined(__APPLE__) && !defined(__ppc__) +#ifndef _UINT64 +#define _UINT64 +$_def_64bit_type_unsigned +#endif +#else +$_def_64bit_type_unsigned +#endif +EOF +fi + +cat >> config.h << EOF #endif /* CONFIG_H */ EOF |
