aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure162
1 files changed, 148 insertions, 14 deletions
diff --git a/configure b/configure
index 61e1c8800d..5eac08ad6b 100755
--- a/configure
+++ b/configure
@@ -88,7 +88,7 @@ add_engine queen "Flight of the Amazon Queen" yes
add_engine saga "SAGA" yes "ihnm saga2"
add_engine ihnm "IHNM" yes
add_engine saga2 "SAGA 2 games" no
-add_engine sci "SCI" no "sci32"
+add_engine sci "SCI" yes "sci32"
add_engine sci32 "SCI32 games" no
add_engine sky "Beneath a Steel Sky" yes
add_engine sword1 "Broken Sword 1" yes
@@ -110,8 +110,10 @@ _alsa=auto
_zlib=auto
_mpeg2=no
_fluidsynth=auto
-_mt32emu=yes
+_readline=auto
# Default option behaviour yes/no
+_text_console=no
+_mt32emu=yes
_build_hq_scalers=yes
_build_scalers=yes
# Default vkeybd/keymapper options
@@ -265,7 +267,7 @@ find_sdlconfig() {
#
get_system_exe_extension() {
case $1 in
- mingw* | *os2-emx)
+ mingw* | *os2-emx | wince)
_exeext=".exe"
;;
arm-riscos)
@@ -277,7 +279,7 @@ get_system_exe_extension() {
gp2x-linux)
_exeext=".gp2x"
;;
- dreamcast | wii | gamecube | psp)
+ dreamcast | wii | gamecube | nds | psp)
_exeext=".elf"
;;
*)
@@ -551,7 +553,7 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (sdl, morphos, dc, gp2x, gp2xwiz, iphone, wii, psp, null) [sdl]
+ --backend=BACKEND backend to build (sdl, dc, gp2x, gp2xwiz, iphone, morphos, nds, psp, wii, wince, null) [sdl]
Installation directories:
--prefix=DIR use this prefix for installing ScummVM [/usr/local]
@@ -566,7 +568,9 @@ Special configuration feature:
dreamcast for Sega Dreamcast
wii for Nintendo Wii
gamecube for Nintendo Gamecube
+ nds for Nintendo DS
iphone for Apple iPhone
+ wince for Windows CE
psp for PlayStation Portable
Optional Features:
@@ -580,6 +584,7 @@ $engines_help
--disable-mt32emu don't enable the integrated MT-32 emulator
--disable-hq-scalers exclude HQ2x and HQ3x scalers
--disable-scalers exclude scalers
+ --enable-text-console use text console instead of graphical console
Optional Libraries:
--with-alsa-prefix=DIR Prefix where alsa is installed (optional)
@@ -612,6 +617,9 @@ Optional Libraries:
--with-nasm-prefix=DIR Prefix where nasm executable is installed (optional)
--disable-nasm disable assembly language optimizations [autodetect]
+ --with-readline-prefix=DIR Prefix where readline is installed (optional)
+ --disable-readline disable readline support in text console [autodetect]
+
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
@@ -647,6 +655,8 @@ for ac_option in $@; do
--disable-nasm) _nasm=no ;;
--enable-mpeg2) _mpeg2=yes ;;
--disable-fluidsynth) _fluidsynth=no ;;
+ --enable-readline) _readline=yes ;;
+ --disable-readline) _readline=no ;;
--enable-plugins) _dynamic_modules=yes ;;
--default-dynamic) _plugins_default=dynamic ;;
--enable-mt32emu) _mt32emu=yes ;;
@@ -655,6 +665,8 @@ for ac_option in $@; do
--disable-vkeybd) _vkeybd=no ;;
--enable-keymapper) _keymapper=yes ;;
--disable-keymapper) _keymapper=no ;;
+ --enable-text-console) _text_console=yes ;;
+ --disable-text-console) _text_console=no ;;
--with-fluidsynth-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
FLUIDSYNTH_CFLAGS="-I$arg/include"
@@ -700,6 +712,11 @@ for ac_option in $@; do
ZLIB_CFLAGS="-I$arg/include"
ZLIB_LIBS="-L$arg/lib"
;;
+ --with-readline-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ READLINE_CFLAGS="-I$arg/include"
+ READLINE_LIBS="-L$arg/lib"
+ ;;
--backend=*)
_backend=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -804,6 +821,11 @@ iphone)
_host_cpu=arm
_host_alias=arm-apple-darwin9
;;
+wince)
+ _host_os=wince
+ _host_cpu=arm
+ _host_alias=arm-wince-mingw32ce
+ ;;
neuros)
_host_os=linux
_host_cpu=arm
@@ -820,17 +842,22 @@ wii)
_host_cpu=ppc
_host_alias=powerpc-gekko
;;
+gamecube)
+ _host_os=gamecube
+ _host_cpu=ppc
+ _host_alias=powerpc-gekko
+ ;;
+nds)
+ _host_os=nds
+ _host_cpu=arm
+ _host_alias=arm-eabi
+ ;;
psp)
_host_os=psp
_host_cpu=mipsallegrexel
_host_alias=psp
LDFLAGS="$LDFLAGS -L$PSPDEV/psp/sdk/lib -specs=$_srcdir/backends/platform/psp/psp.spec"
;;
-gamecube)
- _host_os=gamecube
- _host_cpu=ppc
- _host_alias=powerpc-gekko
- ;;
*)
if test -n "$_host"; then
guessed_host=`$_srcdir/config.sub $_host`
@@ -867,7 +894,7 @@ esac
# Platform specific sanity checks
#
case $_host_os in
-wii | gamecube)
+wii | gamecube | nds)
if test -z "$DEVKITPRO"; then
echo "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to devkitPRO>"
exit 1
@@ -1147,9 +1174,16 @@ case $_host_os in
CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include"
LDFLAGS="$LDFLAGS -mogc -mcpu=750 -L$DEVKITPRO/libogc/lib/cube"
;;
+ nds)
+ # TODO nds
+ ;;
psp)
CXXFLAGS="$CXXFLAGS -O2 -G0 -I$PSPDEV/psp/sdk/include -D_PSP_FW_VERSION=150"
;;
+ wince)
+ CXXFLAGS="$CXXFLAGS -O3 -march=armv4 -mtune=xscale -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT"
+ CXXFLAGS="$CXXFLAGS -DWIN32 -Dcdecl= -D__cdecl__= -Wno-multichar"
+ ;;
# given this is a shell script assume some type of unix
*)
echo "WARNING: could not establish system type, assuming unix like"
@@ -1191,7 +1225,7 @@ if test -n "$_host"; then
;;
gp2xwiz)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
- DEFINES="$DEFINES -DUNIX -DGP2XWIZ -DNDEBUG -DUSE_ARM_SMUSH_ASM"
+ DEFINES="$DEFINES -DUNIX -DGP2XWIZ -DNDEBUG -DUSE_ARM_SMUSH_ASM -DUSE_ARM_GFX_ASM -DUSE_ARM_SCALER_ASM -DUSE_ARM_COSTUME_ASM"
CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
LDFLAGS="$LDFLAGS"
_endian=little
@@ -1203,13 +1237,16 @@ if test -n "$_host"; then
_ranlib=$_host_alias-ranlib
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_SCALER_ASM = 1'
+ add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
_backend="gp2xwiz"
_build_hq_scalers="no"
_mt32emu="no"
;;
gp2x)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
- DEFINES="$DEFINES -DUNIX -DGP2X -DNDEBUG -DUSE_ARM_SMUSH_ASM"
+ DEFINES="$DEFINES -DUNIX -DGP2X -DNDEBUG -DUSE_ARM_SMUSH_ASM -DUSE_ARM_GFX_ASM -DUSE_ARM_SCALER_ASM -DUSE_ARM_COSTUME_ASM"
CXXFLAGS="$CXXFLAGS -march=armv4t"
LDFLAGS="$LDFLAGS -static"
_endian=little
@@ -1221,6 +1258,9 @@ if test -n "$_host"; then
_ranlib=$_host_alias-ranlib
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_SCALER_ASM = 1'
+ add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
_backend="gp2x"
_build_hq_scalers="no"
_mt32emu="no"
@@ -1284,6 +1324,28 @@ if test -n "$_host"; then
_ranlib=$_host_alias-ranlib
_strip=$_host_alias-strip
;;
+ wince)
+ echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
+ LDFLAGS="$LDFLAGS -Wl,-Map,scummvm.exe.map -Wl,--stack,65536"
+ _endian=little
+ _need_memalign=yes
+ type_1_byte='char'
+ type_2_byte='short'
+ type_4_byte='int'
+ add_line_to_config_mk 'USE_TREMOLO = 1'
+ 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="wince"
+ _ar="$_host_alias-ar cru"
+ _ranlib=$_host_alias-ranlib
+ _strip=$_host_alias-strip
+ _windres=$_host_alias-windres
+ _mt32emu="no"
+ add_line_to_config_mk 'include $(srcdir)/backends/platform/wince/wince.mk'
+ ;;
dreamcast)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE"
@@ -1342,6 +1404,24 @@ if test -n "$_host"; then
add_line_to_config_h "/* #define DEBUG_WII_MEMSTATS */"
add_line_to_config_h "/* #define DEBUG_WII_GDB */"
;;
+ nds)
+ echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
+ # TODO: complete this
+ # TODO: Maybe rename nds -> ds (would be more consistent with other backends)
+ DEFINES="$DEFINES -DUSE_ARM_SMUSH_ASM"
+ _endian=little
+ _need_memalign=yes
+ type_1_byte='char'
+ type_2_byte='short'
+ type_4_byte='int'
+ _backend="nds"
+ _build_hq_scalers="no"
+ _mt32emu="no"
+ add_line_to_config_mk 'include $(srcdir)/backends/platform/ds/ds.mk'
+ # TODO: Enable more ARM optimizations -- requires testing!
+ add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
+ add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
+ ;;
psp)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
_endian=little
@@ -1802,6 +1882,45 @@ echo "$_fluidsynth"
rm -rf $TMPC $TMPO$HOSTEXEEXT $TMPO.dSYM
#
+# Check for readline if text_console is enabled
+#
+echocheck "readline"
+if test "$_text_console" = yes ; then
+ if test "$_readline" = auto ; then
+ _readline=no
+ cat > $TMPC << EOF
+#include <stdio.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+
+int main(void) {
+ char *x = readline("");
+}
+EOF
+ cc_check $LDFLAGS $CXXFLAGS $READLINE_CFLAGS $READLINE_LIBS -lreadline && _readline=yes
+ fi
+ echo "$_readline"
+ rm -rf $TMPC $TMPO$HOSTEXEEXT $TMPO.dSYM
+else
+ _readline=no
+ echo "skipping (text console disabled)"
+fi
+
+if test "$_readline" = yes ; then
+ _def_readline='#define USE_READLINE'
+ LIBS="$LIBS $READLINE_LIBS -lreadline"
+ INCLUDES="$INCLUDES $READLINE_CFLAGS"
+else
+ _def_readline='#undef USE_READLINE'
+fi
+
+if test "$_text_console" = yes ; then
+ _def_text_console='#define USE_TEXT_CONSOLE'
+else
+ _def_text_console='#undef USE_TEXT_CONSOLE'
+fi
+
+#
# Check for nasm
#
if test "$_have_x86" = yes ; then
@@ -1884,6 +2003,10 @@ if test "$_mt32emu" = yes ; then
echo_n ", MT-32 emu"
fi
+if test "$_text_console" = yes ; then
+ echo_n ", text console"
+fi
+
if test "$_vkeybd" = yes ; then
echo_n ", virtual keyboard"
fi
@@ -1925,6 +2048,10 @@ case $_backend in
OBJCFLAGS="$OBJCFLAGS --std=c99"
LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio"
;;
+ wince)
+ INCLUDES="$INCLUDES "'-I$(srcdir) -I$(srcdir)/backends/platform/wince -I$(srcdir)/engines -I$(srcdir)/backends/platform/wince/missing/gcc -I$(srcdir)/backends/platform/wince/CEgui -I$(srcdir)/backends/platform/wince/CEkeys'
+ LIBS="$LIBS -static -lSDL"
+ ;;
dc)
INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include'
LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib'
@@ -1941,6 +2068,9 @@ case $_backend in
;;
esac
;;
+ nds)
+ # TODO nds
+ ;;
psp)
DEFINES="$DEFINES -D__PSP__ -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE"
INCLUDES="$INCLUDES -I$PSPDEV/psp/include/SDL"
@@ -1960,7 +2090,7 @@ if test "$_cxx_major" -ge "3" ; then
case $_host_os in
# newlib-based system include files suppress non-C89 function
# declarations under __STRICT_ANSI__
- mingw* | dreamcast | wii | gamecube | psp | amigaos*)
+ mingw* | dreamcast | wii | gamecube | psp | wince | amigaos*)
CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter"
;;
*)
@@ -2095,6 +2225,10 @@ $_def_alsa
$_def_zlib
$_def_mpeg2
$_def_fluidsynth
+$_def_readline
+
+/* Options */
+$_def_text_console
$_def_mt32emu
/* Plugin settings */