aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure767
1 files changed, 586 insertions, 181 deletions
diff --git a/configure b/configure
index 6bc0e857aa..b8656b1022 100755
--- a/configure
+++ b/configure
@@ -70,13 +70,23 @@ get_var() {
}
append_var() {
- VAR=${1}
- shift
- if eval test -z \"\$${VAR}\" ; then
- eval ${VAR}='$@'
- else
- eval ${VAR}=\"\$${VAR} \"'$@'
- fi
+ VAR=${1}
+ shift
+ if eval test -z \"\$${VAR}\" ; then
+ eval ${VAR}='$@'
+ else
+ eval ${VAR}=\"\$${VAR} \"'$@'
+ fi
+}
+
+prepend_var() {
+ VAR=${1}
+ shift
+ if eval test -z \"\$${VAR}\" ; then
+ eval ${VAR}='$@'
+ else
+ eval ${VAR}='$@'\" \$${VAR}\"
+ fi
}
# Add an engine: id name build subengines base-games dependencies
@@ -117,6 +127,8 @@ done
#
# Default lib behavior yes/no/auto
_vorbis=auto
+_sdlnet=auto
+_libcurl=auto
_tremor=auto
_tremolo=no
_flac=auto
@@ -128,13 +140,13 @@ _timidity=auto
_zlib=auto
_mpeg2=auto
_sparkle=auto
+_osxdockplugin=auto
_jpeg=auto
_png=auto
_theoradec=auto
_faad=auto
_fluidsynth=auto
-_opengl=auto
-_opengles=auto
+_opengl_mode=auto
_readline=auto
_freetype2=auto
_taskbar=auto
@@ -153,6 +165,7 @@ _build_hq_scalers=yes
_enable_prof=no
_global_constructors=no
_bink=yes
+_cloud=auto
# Default vkeybd/keymapper/eventrec options
_vkeybd=no
_keymapper=no
@@ -162,6 +175,7 @@ _translation=yes
# Default platform settings
_backend=sdl
_16bit=auto
+_highres=auto
_savegame_timestamp=auto
_dynamic_modules=no
_elf_loader=no
@@ -181,10 +195,14 @@ _stagingpath="staging"
_win32path="c:/scummvm"
_amigaospath="Games:ScummVM"
_staticlibpath=
-_sdlconfig=sdl-config
+_xcodetoolspath=
+_sparklepath=
+_sdlconfig=sdl2-config
+_libcurlconfig=curl-config
_freetypeconfig=freetype-config
_sdlpath="$PATH"
_freetypepath="$PATH"
+_libcurlpath="$PATH"
_nasmpath="$PATH"
NASMFLAGS=""
NASM=""
@@ -198,9 +216,11 @@ _have_x86=no
# Add (virtual) features
add_feature 16bit "16bit color" "_16bit"
+add_feature cloud "cloud" "_cloud"
add_feature faad "libfaad" "_faad"
add_feature flac "FLAC" "_flac"
add_feature freetype2 "FreeType2" "_freetype2"
+add_feature highres "high resolution" "_highres"
add_feature mad "MAD" "_mad"
add_feature jpeg "JPEG" "_jpeg"
add_feature png "PNG" "_png"
@@ -364,7 +384,7 @@ define_in_config_if_yes() {
# TODO: small bit of code to test sdl usability
find_sdlconfig() {
echo_n "Looking for sdl-config... "
- sdlconfigs="$SDL_CONFIG:$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
+ sdlconfigs="$SDL_CONFIG:$_sdlconfig:sdl2-config:sdl12-config:sdl11-config:sdl-config"
_sdlconfig=
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
@@ -429,6 +449,40 @@ find_freetypeconfig() {
}
#
+# Determine curl-config
+#
+find_libcurlconfig() {
+ echo_n "Looking for curl-config... "
+ libcurlconfigs="$_libcurlconfig"
+ _libcurlconfig=
+
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
+ for path_dir in $_libcurlpath; do
+ #reset separator to parse sdlconfigs
+ IFS=":"
+ for libcurlconfig in $libcurlconfigs; do
+ if test -f "$path_dir/$libcurlconfig" ; then
+ _libcurlconfig="$path_dir/$libcurlconfig"
+ echo $_libcurlconfig
+ # Save the prefix
+ _libcurlpath=$path_dir
+ if test `basename $path_dir` = bin ; then
+ _libcurlpath=`dirname $path_dir`
+ fi
+ # break at first curl-config found in path
+ break 2
+ fi
+ done
+ done
+
+ IFS="$ac_save_ifs"
+
+ if test -z "$_libcurlconfig"; then
+ echo "none found!"
+ fi
+}
+
+#
# Determine extension used for executables
#
get_system_exe_extension() {
@@ -436,7 +490,7 @@ get_system_exe_extension() {
arm-riscos)
_exeext=",ff8"
;;
- dreamcast | ds | gamecube | n64 | ps2 | psp | wii)
+ 3ds | dreamcast | ds | gamecube | n64 | ps2 | psp | wii)
_exeext=".elf"
;;
gph-linux)
@@ -805,18 +859,6 @@ get_subengines_build_string() {
}
#
-# Greet user
-#
-echo "Running ScummVM configure..."
-echo "Configure run on" `date` > $TMPLOG
-cat >> $TMPLOG <<EOF
-Invocation command line was:
-$0 $@
-Saved environment variables:
-LDFLAGS="$SAVED_LDFLAGS" CXX="$SAVED_CXX" CXXFLAGS="$SAVED_CXXFLAGS" CPPFLAGS="$SAVED_CPPFLAGS" ASFLAGS="$SAVED_ASFLAGS" WINDRESFLAGS="$SAVED_WINDRESFLAGS" SDL_CONFIG="$SAVED_SDL_CONFIG"
-EOF
-
-#
# Check any parameters we received
#
# TODO:
@@ -839,9 +881,9 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, gcw0,
+ --backend=BACKEND backend to build (3ds, android, dc, dingux, ds, gcw0,
gph, iphone, ios7, linuxmoto, maemo, n64, null, openpandora,
- ps2, psp, samsungtv, sdl, webos, wii, wince) [sdl]
+ ps2, psp, samsungtv, sdl, tizen, webos, wii, wince) [sdl]
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -867,10 +909,11 @@ Fine tuning of the installation directories:
Special configuration feature:
--host=HOST cross-compile to target HOST (arm-linux, ...)
- special targets: android-arm for Android ARM
+ special targets: 3ds for Nintendo 3DS
+ android-arm for Android ARM
android-mips for Android MIPS
android-x86 for Android x86
- tizen for Samsung Tizen
+ androidsdl for Android with SDL backend
caanoo for Caanoo
dingux for Dingux
raspberrypi for Raspberry Pi
@@ -893,6 +936,7 @@ Special configuration feature:
ps3 for PlayStation 3
psp for PlayStation Portable
samsungtv for Samsung TV
+ tizen for Samsung Tizen
webos for HP Palm WebOS
wii for Nintendo Wii
wince for Windows CE
@@ -922,11 +966,13 @@ 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-highres don't enable support for high resolution engines >320x240
--disable-savegame-timestamp don't use timestamps for blank savegame descriptions
--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
+ --disable-cloud don't build cloud support
--enable-vkeybd build virtual keyboard support
--enable-keymapper build key mapper support
--enable-eventrecorder enable event recording functionality
@@ -936,6 +982,15 @@ Optional Features:
--enable-verbose-build enable regular echoing of commands during build
process
--disable-bink don't build with Bink video support
+ --opengl-mode=MODE OpenGL (ES) mode to use for OpenGL output [auto]
+ available modes: auto for autodetection
+ none for disabling any OpenGL usage
+ any for runtime detection
+ gl for forcing OpenGL
+ gles for forcing OpenGL ES
+ gles2 for forcing OpenGL ES 2
+ WARNING: only specify this manually if you know what
+ you are doing!
Optional Libraries:
--with-alsa-prefix=DIR Prefix where alsa is installed (optional)
@@ -960,9 +1015,6 @@ Optional Libraries:
--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]
@@ -979,8 +1031,10 @@ Optional Libraries:
installed (optional)
--disable-fluidsynth disable fluidsynth MIDI driver [autodetect]
- --with-sparkle-prefix=DIR Prefix where sparkle is installed (Mac OS X only - optional)
- --disable-sparkle disable sparkle automatic update support [Mac OS X only - autodetect]
+ --with-sparkle-prefix=DIR Prefix where sparkle is installed (OS X/Windows only - optional)
+ --disable-sparkle disable sparkle automatic update support [OS X/Windows only - autodetect]
+
+ --disable-osx-dock-plugin disable the NSDockTilePlugin support [Mac OS X only - autodetect]
--with-sdl-prefix=DIR Prefix where the sdl-config script is
installed (optional)
@@ -1001,6 +1055,11 @@ Optional Libraries:
--with-sndio-prefix=DIR Prefix where sndio is installed (optional)
--disable-sndio disable sndio MIDI driver [autodetect]
+ --with-sdlnet-prefix=DIR Prefix where SDL_Net is
+ installed (optional)
+ --disable-sdlnet disable SDL_Net networking library [autodetect]
+ --disable-libcurl disable libcurl networking library [autodetect]
+
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
@@ -1016,9 +1075,25 @@ EOF
fi
done # for parm in ...
+
+#
+# If we're not showing help, greet the user and start the log file
+#
+echo "Running ScummVM configure..."
+echo "Configure run on" `date` > $TMPLOG
+cat >> $TMPLOG <<EOF
+Invocation command line was:
+$0 $@
+Saved environment variables:
+LDFLAGS="$SAVED_LDFLAGS" CXX="$SAVED_CXX" CXXFLAGS="$SAVED_CXXFLAGS" CPPFLAGS="$SAVED_CPPFLAGS" ASFLAGS="$SAVED_ASFLAGS" WINDRESFLAGS="$SAVED_WINDRESFLAGS" SDL_CONFIG="$SAVED_SDL_CONFIG"
+EOF
+
+
for ac_option in $@; do
case "$ac_option" in
--disable-16bit) _16bit=no ;;
+ --enable-highres) _highres=yes ;;
+ --disable-highres) _highres=no ;;
--disable-savegame-timestamp) _savegame_timestamp=no ;;
--disable-scalers) _build_scalers=no ;;
--disable-hq-scalers) _build_hq_scalers=no ;;
@@ -1042,6 +1117,8 @@ for ac_option in $@; do
--disable-zlib) _zlib=no ;;
--enable-sparkle) _sparkle=yes ;;
--disable-sparkle) _sparkle=no ;;
+ --enable-osx-dock-plugin) _osxdockplugin=yes;;
+ --disable-osx-dock-plugin) _osxdockplugin=no;;
--enable-nasm) _nasm=yes ;;
--disable-nasm) _nasm=no ;;
--enable-mpeg2) _mpeg2=yes ;;
@@ -1061,14 +1138,21 @@ for ac_option in $@; do
--disable-freetype2) _freetype2=no ;;
--enable-taskbar) _taskbar=yes ;;
--disable-taskbar) _taskbar=no ;;
+ --enable-sdlnet) _sdlnet=yes ;;
+ --disable-sdlnet) _sdlnet=no ;;
+ --enable-libcurl) _libcurl=yes ;;
+ --disable-libcurl) _libcurl=no ;;
+ --enable-cloud) _cloud=yes ;;
+ --disable-cloud) _cloud=no ;;
--enable-updates) _updates=yes ;;
--disable-updates) _updates=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 ;;
+ --opengl-mode=*)
+ _opengl_mode=`echo $ac_option | cut -d '=' -f 2`
+ ;;
--enable-verbose-build) _verbose_build=yes ;;
--enable-plugins) _dynamic_modules=yes ;;
--default-dynamic) _plugins_default=dynamic ;;
@@ -1156,8 +1240,7 @@ for ac_option in $@; do
;;
--with-sparkle-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
- SPARKLE_CFLAGS="-F$arg"
- SPARKLE_LIBS="-F$arg"
+ _sparklepath=$arg
;;
--with-readline-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
@@ -1169,10 +1252,10 @@ for ac_option in $@; do
LIBUNITY_CFLAGS="-I$arg/include"
LIBUNITY_LIBS="-L$arg/lib"
;;
- --with-opengl-prefix=*)
+ --with-sdlnet-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
- OPENGL_CFLAGS="-I$arg/include"
- OPENGL_LIBS="-L$arg/lib"
+ SDL_NET_CFLAGS="-I$arg/include"
+ SDL_NET_LIBS="-L$arg/lib"
;;
--backend=*)
_backend=`echo $ac_option | cut -d '=' -f 2`
@@ -1230,6 +1313,9 @@ for ac_option in $@; do
--with-staticlib-prefix=*)
_staticlibpath=`echo $ac_option | cut -d '=' -f 2`
;;
+ --with-xcodetools-path=*)
+ _xcodetoolspath=`echo $ac_option | cut -d '=' -f 2`
+ ;;
--host=*)
_host=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -1294,6 +1380,11 @@ get_system_exe_extension $guessed_host
NATIVEEXEEXT=$_exeext
case $_host in
+3ds)
+ _host_os=3ds
+ _host_cpu=arm
+ _host_alias=arm-none-eabi
+ ;;
android | android-arm | android-v7a | android-arm-v7a | ouya)
_host_os=android
_host_cpu=arm
@@ -1309,6 +1400,31 @@ android-x86)
_host_cpu=i686
_host_alias=i686-linux-android
;;
+androidsdl-armeabi | androidsdl-armeabi-v7a)
+ _host_os=androidsdl
+ _host_cpu=arm
+ _host_alias=arm-linux-androideabi
+ ;;
+androidsdl-arm64-v8a)
+ _host_os=androidsdl
+ _host_cpu=aarch64
+ _host_alias=aarch64-linux-android
+ ;;
+androidsdl-mips)
+ _host_os=androidsdl
+ _host_cpu=mipsel
+ _host_alias=mipsel-linux-android
+ ;;
+androidsdl-x86)
+ _host_os=androidsdl
+ _host_cpu=i686
+ _host_alias=i686-linux-android
+ ;;
+androidsdl-x86_64)
+ _host_os=androidsdl
+ _host_cpu=x86_64
+ _host_alias=x86_64-linux-android
+ ;;
arm-riscos)
_host_os=riscos
_host_cpu=arm
@@ -1575,7 +1691,7 @@ android)
exit 1
fi
;;
-ds | gamecube | wii)
+3ds | ds | gamecube | wii)
if test -z "$DEVKITPRO"; then
echo "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to devkitPRO>"
exit 1
@@ -1831,7 +1947,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 | ps3 | tizen | wii | wince )
+ 3ds | amigaos* | android | androidsdl | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | tizen | wii | wince )
;;
*)
append_var CXXFLAGS "-ansi"
@@ -1867,7 +1983,7 @@ 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 | tizen | wii | webos)
+android | androidsdl | gamecube | psp | tizen | wii | webos)
;;
*)
# ICC does not support pedantic, while GCC and clang do.
@@ -2051,7 +2167,7 @@ cc_check_clean tmp_find_type_with_size.cpp
# for the smaller sizes.
echo_n "Alignment required... "
case $_host_cpu in
- i[3-6]86 | amd64 | x86_64 | powerpc*)
+ i[3-6]86 | amd64 | x86_64 | powerpc* | ppc*)
# Unaligned access should work
_need_memalign=no
;;
@@ -2112,7 +2228,7 @@ case $_host_cpu in
echo "MIPS"
append_var DEFINES "-DMIPS_TARGET"
;;
- powerpc*)
+ powerpc* | ppc*)
echo "PowerPC"
append_var DEFINES "-DPPC_TARGET"
;;
@@ -2131,6 +2247,27 @@ esac
echo_n "Checking hosttype... "
echo $_host_os
case $_host_os in
+ 3ds)
+ _optimization_level=-O2
+ append_var DEFINES "-D__3DS__"
+ append_var DEFINES "-DARM"
+ append_var DEFINES "-DARM11"
+ append_var CXXFLAGS "-march=armv6k"
+ append_var CXXFLAGS "-mtune=mpcore"
+ append_var CXXFLAGS "-mword-relocations"
+ append_var CXXFLAGS "-mfloat-abi=hard"
+ append_var CXXFLAGS "-ffunction-sections"
+ append_var CXXFLAGS "-fomit-frame-pointer"
+ append_var CXXFLAGS "-I$DEVKITPRO/libctru/include"
+ append_var CXXFLAGS "-I$DEVKITPRO/portlibs/3ds/include"
+ if test "$_dynamic_modules" = no ; then
+ append_var LDFLAGS "-Wl,--gc-sections"
+ else
+ append_var LDFLAGS "-Wl,--no-gc-sections"
+ fi
+ append_var LDFLAGS "-L$DEVKITPRO/portlibs/3ds/lib"
+ append_var LIBS "-lcitro3d -lctru"
+ ;;
amigaos*)
append_var LDFLAGS "-Wl,--export-dynamic"
append_var LDFLAGS "-L/sdk/local/newlib/lib"
@@ -2149,7 +2286,7 @@ case $_host_os in
append_var CXXFLAGS "-mtune=xscale"
append_var CXXFLAGS "-msoft-float"
ABI="armeabi"
- ANDROID_PLATFORM=4
+ ANDROID_PLATFORM=9
ANDROID_PLATFORM_ARCH="arm"
;;
android-v7a | android-arm-v7a)
@@ -2158,7 +2295,7 @@ case $_host_os in
append_var CXXFLAGS "-mfpu=vfp"
append_var LDFLAGS "-Wl,--fix-cortex-a8"
ABI="armeabi-v7a"
- ANDROID_PLATFORM=4
+ ANDROID_PLATFORM=9
ANDROID_PLATFORM_ARCH="arm"
;;
android-mips)
@@ -2183,7 +2320,7 @@ case $_host_os in
append_var CXXFLAGS "-mfloat-abi=softfp"
append_var CXXFLAGS "-mfpu=neon"
ABI="armeabi-v7a"
- ANDROID_PLATFORM=4
+ ANDROID_PLATFORM=16
ANDROID_PLATFORM_ARCH="arm"
;;
esac
@@ -2345,6 +2482,17 @@ case $_host_os in
echo "Could not determine prefix for static libraries"
fi
fi
+
+ # If _xcodetoolspath is not set yet use xcode-select to get the path
+ if test -z "$_xcodetoolspath"; then
+ _xcodetoolspath=`xcode-select -print-path`/Tools
+ if test -d "$_xcodetoolspath"; then
+ echo "Set xcodetools-path to ${_xcodetoolspath}"
+ else
+ _xcodetoolspath=
+ echo "Could not determine path for Xcode Tools"
+ fi
+ fi
;;
dreamcast)
append_var DEFINES "-D__DC__"
@@ -2438,6 +2586,10 @@ case $_host_os in
mint*)
append_var DEFINES "-DSYSTEM_NOT_SUPPORTING_D_TYPE"
;;
+ msys)
+ echo ERROR: Using the MSYS shell in msys mode is not supported. Please use the MSYS shell in mingw mode instead.
+ exit 1
+ ;;
n64)
append_var DEFINES "-D__N64__"
append_var DEFINES "-DLIMIT_FPS"
@@ -2460,13 +2612,15 @@ case $_host_os in
;;
ps3)
# Force use of SDL and freetype from the ps3 toolchain
- _sdlconfig=sdl2-config
_sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
_freetypepath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
+ _libcurlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
append_var DEFINES "-DPLAYSTATION3"
append_var CXXFLAGS "-mcpu=cell -mminimal-toc -I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include"
append_var LDFLAGS "-L$PSL1GHT/ppu/lib -L$PS3DEV/portlibs/ppu/lib"
+ # The network libraries are statically linked and need to be specified in the following order
+ append_var SDL_NET_LIBS "-lSDL_net -lnet -lsysmodule"
add_line_to_config_mk 'PLAYSTATION3 = 1'
add_line_to_config_h "#define PREFIX \"${prefix}\""
;;
@@ -2553,6 +2707,18 @@ if test -n "$_host"; then
# Cross-compiling mode - add your target here if needed
echo "Cross-compiling to $_host"
case "$_host" in
+ 3ds)
+ append_var DEFINES "-DDISABLE_FANCY_THEMES"
+ append_var DEFINES "-DDISABLE_SID"
+ append_var DEFINES "-DDISABLE_NES_APU"
+ _backend="3ds"
+ _build_scalers=no
+ _vkeybd=yes
+ _mt32emu=no
+ # Should use Tremor instead of Vorbis
+ _vorbis=no
+ _port_mk="backends/platform/3ds/3ds.mk"
+ ;;
android | android-arm | android-v7a | android-arm-v7a | android-mips | android-x86 | ouya)
# we link a .so as default
append_var LDFLAGS "-shared"
@@ -2566,6 +2732,14 @@ if test -n "$_host"; then
_mt32emu=no
_timidity=no
;;
+ androidsdl | androidsdl-armeabi | androidsdl-armeabi-v7a | androidsdl-mips | androidsdl-x86 | androidsdl-arm64-v8a)
+ DEFINES="$DEFINES -DANDROIDSDL"
+ _unix=yes
+ _seq_midi=no
+ _timidity=no
+ _backend="androidsdl"
+ _port_mk="backends/platform/androidsdl/androidsdl.mk"
+ ;;
arm-linux|arm*-linux-gnueabi|arm-*-linux)
;;
arm-riscos|linupy)
@@ -2605,6 +2779,10 @@ if test -n "$_host"; then
_optimization_level=-O3
# Disable alsa midi to get the port build on OpenDingux toolchain
_alsa=no
+ # Disable cloud and SDL_Net due to outdated toolchain
+ _cloud=no
+ _sdlnet=no
+ _libcurl=no
_vkeybd=yes
_build_hq_scalers=no
_keymapper=no
@@ -2635,10 +2813,11 @@ if test -n "$_host"; then
# since SDL2 manages dispmanx/GLES2 very well internally.
# SDL1 is bit-rotten on this platform.
_sdlconfig=sdl2-config
- # OpenGL(ES) support is mature enough as to be the best option on
+ # OpenGL ES support is mature enough as to be the best option on
# the Raspberry Pi, so it's enabled by default.
- _opengl=yes
- _opengles=yes
+ # The Raspberry Pi always supports OpenGL ES 2.0 contexts, thus we
+ # take advantage of those.
+ _opengl_mode=gles2
;;
dreamcast)
append_var DEFINES "-DDISABLE_DEFAULT_SAVEFILEMANAGER"
@@ -2653,8 +2832,6 @@ if test -n "$_host"; then
append_var CXXFLAGS "-fschedule-insns2"
append_var CXXFLAGS "-fomit-frame-pointer"
append_var CXXFLAGS "-fdelete-null-pointer-checks"
- # no-delayed-branch is a workaround for GCC bug #42841 - "SH: Assembler complains pcrel too far."
- append_var CXXFLAGS "-fno-delayed-branch"
_backend="dc"
_build_scalers=no
_mad=yes
@@ -2699,21 +2876,20 @@ if test -n "$_host"; then
gcw0)
_sysroot=`$CXX --print-sysroot`
_sdlpath=$_sysroot/usr/bin
- append_var DEFINES "-DDINGUX -DGCW0"
+ append_var DEFINES "-DDINGUX -DGCW0 -DGUI_ONLY_FULLSCREEN"
append_var DEFINES "-DREDUCE_MEMORY_USAGE"
append_var CXXFLAGS "-mips32"
_backend="dingux"
+ _alsa=no
_mt32emu=no
+ _seq_midi=no
+ _timidity=no
+ _build_scalers=yes
_optimization_level=-O3
- # Disable alsa midi to get the port build on OpenDingux toolchain
- _alsa=no
_vkeybd=yes
- _build_hq_scalers=no
_keymapper=yes
- # 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
+ _sdlconfig=sdl-config
_port_mk="backends/platform/dingux/dingux.mk"
;;
gp2x)
@@ -2966,6 +3142,8 @@ if test -n "$_host"; then
_mt32emu=no
_timidity=no
_vkeybd=yes
+ # Tizen relies on the OpenGL ES output thus we always enable it.
+ _opengl_mode=gles
;;
webos)
_backend="webos"
@@ -3011,12 +3189,16 @@ fi
# Backend related stuff
#
case $_backend in
+ 3ds)
+ ;;
android)
append_var DEFINES "-DREDUCE_MEMORY_USAGE"
append_var CXXFLAGS "-Wa,--noexecstack"
append_var LDFLAGS "-Wl,-z,noexecstack"
append_var INCLUDES "-I$ANDROID_NDK/sources/cxx-stl/system/include"
;;
+ androidsdl)
+ ;;
dc)
append_var INCLUDES '-I$(srcdir)/backends/platform/dc'
append_var INCLUDES '-isystem $(ronindir)/include'
@@ -3113,6 +3295,8 @@ case $_backend in
append_var LDFLAGS "-shared"
append_var LDFLAGS "-fpic"
;;
+ sdl)
+ ;;
tizen)
# dirent.h not available. NONSTANDARD_PORT==ensure portdefs.h is included
append_var DEFINES "-DTIZEN -DDISABLE_STDIO_FILESTREAM -DNONSTANDARD_PORT"
@@ -3161,8 +3345,6 @@ case $_backend in
append_var DEFINES "-DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"
;;
- sdl)
- ;;
*)
echo "support for $_backend backend not implemented in configure script yet"
exit 1
@@ -3174,7 +3356,7 @@ append_var MODULES "backends/platform/$_backend"
# Setup SDL specifics for SDL based backends
#
case $_backend in
- dingux | gph | linuxmoto | maemo | openpandora | samsungtv | sdl)
+ androidsdl | dingux | gph | linuxmoto | maemo | openpandora | samsungtv | sdl)
find_sdlconfig
append_var INCLUDES "`$_sdlconfig --prefix="$_sdlpath" --cflags`"
append_var LIBS "`$_sdlconfig --prefix="$_sdlpath" --libs`"
@@ -3185,10 +3367,31 @@ case $_backend in
case $_sdlversion in
2.0.*)
add_line_to_config_mk "USE_SDL2 = 1"
+ append_var SDL_NET_LIBS "-lSDL2_net"
;;
*)
+ append_var SDL_NET_LIBS "-lSDL_net"
;;
esac
+
+ # Check for SDL_Net
+ echocheck "SDL_Net"
+ if test "$_sdlnet" = auto ; then
+ _sdlnet=no
+ cat > $TMPC << EOF
+#include "SDL_net.h"
+int main(int argc, char *argv[]) { SDLNet_Init(); return 0; }
+EOF
+ cc_check $SDL_NET_LIBS $LIBS $INCLUDES $SDL_NET_CFLAGS && _sdlnet=yes
+ fi
+ if test "$_sdlnet" = yes ; then
+ # Some platforms require SDL to be after SDL_Net, thus we prepend var
+ prepend_var LIBS "$SDL_NET_LIBS"
+ append_var INCLUDES "$SDL_NET_CFLAGS"
+ fi
+ define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
+ echo "$_sdlnet"
+
;;
esac
@@ -3197,7 +3400,7 @@ esac
# Enable 16bit support only for backends which support it
#
case $_backend in
- android | dingux | dc | gph | iphone | ios7 | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii)
+ 3ds | android | androidsdl | dingux | dc | gph | iphone | ios7 | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii)
if test "$_16bit" = auto ; then
_16bit=yes
else
@@ -3210,6 +3413,26 @@ case $_backend in
esac
#
+# Enable High resolution engines (>320x240) support only for backends which support it
+#
+case $_host in
+ gcw0)
+ if test "$_highres" = yes ; then
+ _highres=yes
+ else
+ _highres=no
+ fi
+ ;;
+ *)
+ if test "$_highres" = no ; then
+ _highres=no
+ else
+ _highres=yes
+ fi
+ ;;
+esac
+
+#
# Enable Event Recorder only for backends that support it
#
case $_backend in
@@ -3256,7 +3479,7 @@ case $_host_os in
amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp | wii | wince)
_posix=no
;;
- android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
+ 3ds | android | androidsdl | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
_posix=yes
;;
os2-emx*)
@@ -3424,7 +3647,7 @@ PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive
POST_OBJS_FLAGS := -Wl,-no-whole-archive
'
;;
- *mingw32*)
+ *mingw32* | mingw64)
_plugin_prefix=""
_plugin_suffix=".dll"
_mak_plugins='
@@ -3522,6 +3745,11 @@ define_in_config_if_yes "$_mt32emu" 'USE_MT32EMU'
define_in_config_if_yes "$_16bit" 'USE_RGB_COLOR'
#
+# Check whether High resolution graphics support is requested
+#
+define_in_config_if_yes "$_highres" 'USE_HIGHRES'
+
+#
# Check whether save games use the current time as default description
#
define_in_config_if_yes "$_savegame_timestamp" 'USE_SAVEGAME_TIMESTAMP'
@@ -3879,26 +4107,186 @@ echo "$_mpeg2"
#
# Check for Sparkle if updates support is enabled
#
-echocheck "Sparkle"
-if test "$_updates" = no; then
- _sparkle=no
-else
-if test "$_sparkle" = auto ; then
- _sparkle=no
- cat > $TMPC << EOF
+#
+# Check is NSDockTilePlugIn protocol is supported
+#
+case $_host_os in
+ darwin*)
+ echocheck "Sparkle"
+ if test "$_updates" = no; then
+ _sparkle=no
+ else
+ if test ! -z $_sparklepath ; then
+ SPARKLE_CFLAGS="-F$_sparklepath"
+ SPARKLE_LIBS="-F$_sparklepath"
+ fi
+ if test "$_sparkle" = auto ; then
+ _sparkle=no
+ cat > $TMPC << EOF
#include <Cocoa/Cocoa.h>
#include <Sparkle/Sparkle.h>
int main(void) { SUUpdater *updater = [SUUpdater sharedUpdater]; return 0; }
EOF
- cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -framework Sparkle -ObjC++ -lobjc && _sparkle=yes
-fi
-if test "$_sparkle" = yes ; then
- append_var LIBS "$SPARKLE_LIBS -framework Sparkle"
- append_var INCLUDES "$SPARKLE_CFLAGS"
+ cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -framework Sparkle -ObjC++ -lobjc && _sparkle=yes
+ fi
+ if test "$_sparkle" = yes ; then
+ append_var LIBS "$SPARKLE_LIBS -framework Sparkle"
+ append_var INCLUDES "$SPARKLE_CFLAGS"
+ fi
+ define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
+ fi
+ echo "$_sparkle"
+ ;;
+ mingw*)
+ echocheck "Sparkle"
+ if test "$_updates" = no; then
+ _sparkle=no
+ else
+ if test ! -z $_sparklepath ; then
+ SPARKLE_CFLAGS="-I$_sparklepath/include"
+ SPARKLE_LIBS="-L$_sparklepath/Release -L$_sparklepath/x64/Release"
+ fi
+ if test "$_sparkle" = auto ; then
+ _sparkle=no
+ cat > $TMPC << EOF
+#include <winsparkle.h>
+int main(void) { win_sparkle_get_update_check_interval(); return 0; }
+EOF
+ cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -lWinSparkle && _sparkle=yes
+ fi
+ if test "$_sparkle" = yes ; then
+ append_var LIBS "$SPARKLE_LIBS -lWinSparkle"
+ append_var INCLUDES "$SPARKLE_CFLAGS"
+ fi
+ define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
+ fi
+ echo "$_sparkle"
+ ;;
+ *)
+ _sparkle=no
+ ;;
+esac
+
+#
+# Check for libcurl to be present
+#
+if test "$_libcurl" != "no"; then
+
+ # Look for the curl-config script
+ find_libcurlconfig
+
+ if test -z "$_libcurlconfig"; then
+ _libcurl=no
+ else
+ LIBCURL_LIBS=`$_libcurlconfig --libs`
+ LIBCURL_CFLAGS=`$_libcurlconfig --cflags`
+
+ case $_host_os in
+ amigaos*)
+ append_var LIBCURL_LIBS "-lpthread"
+ ;;
+ esac
+
+ if test "$_libcurl" = "auto"; then
+ _libcurl=no
+
+ cat > $TMPC << EOF
+ #include <curl/curl.h>
+ int main(int argc, char *argv[]) {
+ int x;
+ curl_easy_setopt(NULL,CURLOPT_URL,NULL);
+ x=CURL_ERROR_SIZE;
+ x=CURLOPT_WRITEFUNCTION;
+ x=CURLOPT_WRITEDATA;
+ x=CURLOPT_ERRORBUFFER;
+ x=CURLOPT_STDERR;
+ x=CURLOPT_VERBOSE;
+
+ curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ if (data->features & CURL_VERSION_SSL)
+ return 0;
+ return 1;
+ }
+EOF
+
+ cc_check_no_clean $LIBCURL_CFLAGS $LIBCURL_LIBS
+ if test "$?" -eq 0; then
+ if test -n "$_host"; then
+ # In cross-compiling mode, we cannot run the result, assume SSL is available
+ _libcurl=yes
+ else
+ $TMPO$HOSTEXEEXT
+ if test "$?" -eq 0; then
+ _libcurl=yes
+ else
+ _libcurl="no SSL support"
+ fi
+ fi
+ fi
+ cc_check_clean
+ fi
+
+ if test "$_libcurl" = "yes"; then
+ append_var LIBS "$LIBCURL_LIBS"
+ append_var INCLUDES "$LIBCURL_CFLAGS"
+ fi
+ fi
+
fi
-define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
+
+echocheck "libcurl"
+echo "$_libcurl"
+
+define_in_config_if_yes "$_libcurl" "USE_LIBCURL"
+
+#
+# Check whether to build cloud integration support
+#
+echo_n "Cloud integration... "
+if test "$_cloud" = "no"; then
+ echo "no"
+else
+ _cloud=no
+ if test "$_sdlnet" = "yes"; then
+ _cloud=yes
+ echo_n "local"
+ fi
+ if test "$_libcurl" = "yes"; then
+ if test "$_cloud" = "yes"; then echo_n ", "; fi
+ _cloud=yes
+ echo_n "servers"
+ fi
+ if test "$_cloud" = "no"; then
+ echo_n "no"
+ fi
+ echo # newline
fi
-echo "$_sparkle"
+define_in_config_if_yes $_cloud 'USE_CLOUD'
+
+#
+# Check is NSDockTilePlugIn protocol is supported
+#
+case $_host_os in
+ darwin*)
+ # NSDockTilePlugIn was added in OS X 10.6, so will not be available when compiling on older OS X versions.
+ echocheck "DockTilePlugin"
+ if test "$_osxdockplugin" = auto ; then
+ _osxdockplugin=no
+ cat > $TMPC << EOF
+#include <Cocoa/Cocoa.h>
+@interface ScummVMDockTilePlugIn : NSObject <NSDockTilePlugIn> {
+}
+@end
+EOF
+ cc_check -c -ObjC++ && _osxdockplugin=yes
+ fi
+ define_in_config_if_yes "$_osxdockplugin" 'USE_DOCKTILEPLUGIN'
+ echo "$_osxdockplugin"
+ ;;
+ *)
+ _osxdockplugin=no
+ ;;
+esac
#
# Check for FluidSynth
@@ -3908,10 +4296,7 @@ echocheck "FluidSynth"
append_var FLUIDSYNTH_LIBS "-lfluidsynth"
case $_host_os in
mingw*)
- # NOTE: Windows builds use an older FluidSynth version (1.0.9)
- # which doesn't require glib, to avoid bundling the complete glib
- # libraries with Windows builds.
- FLUIDSYNTH_STATIC_LIBS="$FLUIDSYNTH_LIBS -ldsound -lwinmm"
+ FLUIDSYNTH_STATIC_LIBS="$FLUIDSYNTH_LIBS -lglib-2.0 -lintl -liconv -lws2_32 -lole32 -lshlwapi -lpcre -ldsound -lwinmm"
;;
darwin*)
@@ -4104,113 +4489,115 @@ echocheck "OpenGL"
case $_backend in
openpandora)
- # Only enable OpenGL ES on the OpanPandora if --enable-opengl is passed in explicitly.
- if test "$_opengl" = yes ; then
- _opengl=yes
- _opengles=yes
- OPENGL_LIBS="-lGLES_CM -lEGL -lX11"
- OPENGL_CFLAGS="$OPENGL_LIBS"
- append_var LIBS "$OPENGL_LIBS"
- append_var INCLUDES "$OPENGL_CFLAGS"
+ # Only enable OpenGL ES on the OpanPandora if --opengl-mode=gles is passed in explicitly.
+ if test "$_opengl_mode" = "gles" ; then
+ append_var LIBS "-lGLES_CM -lEGL -lX11"
+ else
+ _opengl_mode=none
fi
;;
esac
-if test "$_opengl" = auto ; then
- _opengl=no
- if test "$_backend" = "sdl" ; then
- # Try different header filenames
- # 1) GL/gl.h This is usually used on POSIX and Windows systems
- # 2) OpenGL/gl.h This is used on Mac OS X
- # 3) GLES/gl.h This is used for OpenGL ES 1.x
- for i in "GL/gl.h" "OpenGL/gl.h" "GLES/gl.h"; do
- # Test the current header for OpenGL
- cat > $TMPC << EOF
-#include <$i>
-#include <stdio.h>
-int main(void) { printf("ANTIVIRUS FALSE POSITIVE WORKAROUND"); return GL_VERSION_1_1; }
-EOF
- cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && break
+if test "$_opengl_mode" = auto ; then
+ case $_backend in
+ sdl)
+ case $_sdlversion in
+ 1.2.*)
+ # Stock SDL 1.2 only supports OpenGL contexts.
+ _opengl_mode=gl
+ ;;
- # Test the current header for OpenGL ES
- cat > $TMPC << EOF
-#include <$i>
-int main(void) { return GL_OES_VERSION_1_1; }
-EOF
- cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break
+ 2.0.*)
+ # SDL2 supports both OpenGL + OpenGL ES contexts.
+ # However, Mac OS X only allows OpenGL context creation at
+ # this time, thus we limit us to OpenGL on that platform.
+ case $_host_os in
+ darwin*)
+ _opengl_mode=gl
+ ;;
+
+ *)
+ _opengl_mode=any
+ ;;
+ esac
+ ;;
+ esac
+ ;;
- # Test the current header for OpenGL ES on SBCs (Raspberry Pi, Cubieboard, etc)
- cat > $TMPC << EOF
-#include <$i>
-int main(void) { return GL_VERSION_ES_CM_1_1; }
-EOF
- cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break
- done
- fi
+ tizen)
+ # Tizen always runs in GLES mode
+ _opengl_mode=gles
+ ;;
+
+ *)
+ _opengl_mode=none
+ ;;
+ esac
fi
-if test "$_opengl" = yes ; then
- # Our simple test case
- cat > $TMPC << EOF
-int main(void) { return 0; }
-EOF
- _opengl=no
- # Try different library names
- if test "$_opengles" = "yes" ; then
- # 1) GLES_CM This is usually used for OpenGL ES 1.1 (Common profile)
- # 2) GLESv1_CM This is used by the Windows Mali OpenGL ES 1.1 Emulator
- # 3) glesv1 This is used by the Linux Mali OpenGL ES 1.1 Emulator
- _opengles=no
- for lib in "-lGLES_CM" "-lGLESv1_CM" "-lglesv1"; do
- if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS $lib
- then
- _opengl=yes
- _opengles=yes
- OPENGL_LIBS="$OPENGL_LIBS $lib"
- break
- fi
- done
- else
- # 1) -framework OpenGL This is used on Mac OS X
- # 2) GL This is usually used on POSIX systems
- # 3) opengl32 This is used on Windows
- #
- # We try "-framework OpenGL" first here to assure it will always be
- # picked up by the configure script on Mac OS X, even when a libGL
- # exists.
- for lib in "-framework OpenGL" "-lGL" "-lopengl32"; do
- if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS $lib
- then
- _opengl=yes
- OPENGL_LIBS="$OPENGL_LIBS $lib"
- break
- fi
- done
- fi
- cc_check_clean
+_opengl=yes
+case $_opengl_mode in
+ auto)
+ # This case should never occur but better safe than sorry.
+ echo "no"
+ _opengl=no
+ ;;
- if test "$_opengl" = yes ; then
- append_var LIBS "$OPENGL_LIBS"
- append_var INCLUDES "$OPENGL_CFLAGS"
- fi
-fi
+ none)
+ echo "no"
+ _opengl=no
+ ;;
-case $_host_os in
- tizen)
- # components live in non-standard locations so just assume sane SDK
- _opengl=yes
- _opengles=yes
+ any)
+ echo "yes (runtime detection)"
+ add_line_to_config_h "#undef USE_GLES_MODE"
;;
-esac
-if test "$_opengles" = "yes" ; then
- echo "yes (OpenGL ES)"
-else
- echo "$_opengl"
-fi
+ gl)
+ echo "yes (OpenGL)"
+ add_line_to_config_h "#define USE_GLES_MODE 0"
+ ;;
+
+ gles)
+ echo "yes (OpenGL ES)"
+ add_line_to_config_h "#define USE_GLES_MODE 1"
+ ;;
+
+ gles2)
+ echo "yes (OpenGL ES 2)"
+ add_line_to_config_h "#define USE_GLES_MODE 2"
+ ;;
+
+ *)
+ echo "invalid mode specification '$_opengl_mode'. Aborting."
+ exit 1
+ ;;
+esac
define_in_config_if_yes "$_opengl" "USE_OPENGL"
-define_in_config_if_yes "$_opengles" "USE_GLES"
+
+#
+# Check for Linux CD-ROM support
+#
+case $_host_os in
+ *linux*)
+ echocheck "Linux CD-ROM"
+ linuxcd=no
+ cat > $TMPC << EOF
+#include <linux/cdrom.h>
+#include <sys/types.h>
+int main(void) {
+ int x = CDROMREADAUDIO;
+ dev_t dev;
+ return major(dev) + x;
+}
+EOF
+ cc_check && linuxcd=yes
+ define_in_config_if_yes "$linuxcd" 'USE_LINUXCD'
+ echo "$linuxcd"
+ ;;
+esac
+
#
# Check for nasm
@@ -4424,6 +4811,10 @@ if test "$_16bit" = yes ; then
echo_n ", 16bit color"
fi
+if test "$_highres" = yes ; then
+ echo_n ", high resolution"
+fi
+
if test "$_savegame_timestamp" = yes ; then
echo_n ", savegame timestamp"
fi
@@ -4437,7 +4828,7 @@ if test "$_build_scalers" = yes ; then
fi
if test "$_mt32emu" = yes ; then
- echo_n ", MT-32 emu"
+ echo_n ", MT-32 emulator"
fi
if test "$_text_console" = yes ; then
@@ -4453,7 +4844,11 @@ if test "$_keymapper" = yes ; then
fi
if test "$_eventrec" = yes ; then
- echo ", event recorder"
+ echo_n ", event recorder"
+fi
+
+if test "$_cloud" = yes ; then
+ echo ", cloud"
else
echo
fi
@@ -4463,6 +4858,14 @@ fi
# after all of CXXFLAGS, LDFLAGS, LIBS etc. have been setup
#
case $_backend in
+ 3ds)
+ if test "$_freetype2" = yes -a "$_png" = yes; then
+ append_var LIBS "-lpng"
+ fi
+ if test "$_tremor" = yes -o "$_flac" = yes; then
+ append_var LIBS "-logg"
+ fi
+ ;;
android)
# ssp at this point so the cxxtests link
if test "$_debug_build" = yes; then
@@ -4487,7 +4890,7 @@ case $_backend in
# -lgcc is carefully placed here - we want to catch
# all toolchain symbols in *our* libraries rather
# than pick up anything unhygenic from the Android libs.
- LIBS="-Wl,-Bstatic $static_libs -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM"
+ LIBS="-Wl,-Bstatic $static_libs -Wl,-Bdynamic -lgcc $system_libs -llog -landroid -lGLESv1_CM"
;;
n64)
# Move some libs down here, otherwise some symbols requires by libvorbis aren't found
@@ -4694,6 +5097,8 @@ STAGINGPATH=$_stagingpath
WIN32PATH=$_win32path
AMIGAOSPATH=$_amigaospath
STATICLIBPATH=$_staticlibpath
+XCODETOOLSPATH=$_xcodetoolspath
+SPARKLEPATH=$_sparklepath
SDLCONFIG=$_sdlconfig
ABI := $ABI