2005-06-28 18:56:49 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Some things this script could/should do when finished
|
|
|
|
#
|
|
|
|
# * detect whether it's a GNU compiler or not (for compiler settings)
|
|
|
|
# * command line options to...
|
|
|
|
# - override the host settings (for cross compiles
|
|
|
|
# - whether to do a debug build (with -g) or an optimized build (-O3 etc.)
|
|
|
|
# * detect whether the chosen backend is available (e.g. call sdl-config)
|
|
|
|
# * ....
|
|
|
|
|
|
|
|
|
|
|
|
# use environment vars if set
|
|
|
|
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
|
|
|
|
|
|
|
|
# default lib behaviour yes/no/auto
|
2005-06-28 23:18:16 +00:00
|
|
|
_opengl=auto
|
2010-06-11 19:09:20 +00:00
|
|
|
_libpng=auto
|
2005-06-28 18:56:49 +00:00
|
|
|
_zlib=auto
|
|
|
|
|
|
|
|
# default option behaviour yes/no
|
|
|
|
_build_gl=yes
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
_build_windowed=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
_build_sound=yes
|
2006-12-15 16:43:12 +00:00
|
|
|
_build_debugger=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
_build_snapshot=yes
|
|
|
|
_build_joystick=yes
|
2005-11-11 21:44:19 +00:00
|
|
|
_build_cheats=yes
|
2011-04-16 23:39:31 +00:00
|
|
|
_build_thumb=yes
|
2005-07-18 16:10:52 +00:00
|
|
|
_build_static=no
|
2006-02-01 13:53:25 +00:00
|
|
|
_build_profile=no
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
# more defaults
|
|
|
|
_ranlib=ranlib
|
|
|
|
_install=install
|
|
|
|
_ar="ar cru"
|
2008-02-20 00:17:49 +00:00
|
|
|
_strip=strip
|
2005-06-28 18:56:49 +00:00
|
|
|
_mkdir="mkdir -p"
|
|
|
|
_echo=printf
|
|
|
|
_cat=cat
|
|
|
|
_rm="rm -f"
|
|
|
|
_rm_rec="$_rm -r"
|
|
|
|
_zip="zip -q"
|
|
|
|
_cp=cp
|
2005-06-28 23:18:16 +00:00
|
|
|
_win32path=""
|
2008-03-09 15:30:27 +00:00
|
|
|
_windres=windres
|
2005-06-28 18:56:49 +00:00
|
|
|
_sdlconfig=sdl-config
|
|
|
|
_sdlpath="$PATH"
|
|
|
|
_prefix=/usr/local
|
2005-10-29 18:11:29 +00:00
|
|
|
X_LIBS="/usr/X11R6/lib"
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
_srcdir=`dirname $0`
|
|
|
|
|
|
|
|
# TODO: We should really use mktemp(1) to determine a random tmp file name.
|
|
|
|
# However, that tool might not be available everywhere.
|
|
|
|
TMPO=${_srcdir}/stella-conf
|
2005-06-28 23:18:16 +00:00
|
|
|
TMPC=${TMPO}.cxx
|
2005-06-28 18:56:49 +00:00
|
|
|
TMPLOG=${_srcdir}/config.log
|
|
|
|
|
|
|
|
# For cross compiling
|
|
|
|
_host=""
|
|
|
|
_host_cpu=""
|
|
|
|
_host_vendor=""
|
|
|
|
_host_os=""
|
2008-03-09 15:30:27 +00:00
|
|
|
_host_prefix=""
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
cc_check() {
|
|
|
|
echo >> "$TMPLOG"
|
|
|
|
cat "$TMPC" >> "$TMPLOG"
|
|
|
|
echo >> "$TMPLOG"
|
2005-11-19 22:31:51 +00:00
|
|
|
echo "$CXX $TMPC -o $TMPO$EXEEXT $@" >> "$TMPLOG"
|
2005-06-28 18:56:49 +00:00
|
|
|
rm -f "$TMPO$EXEEXT"
|
2005-11-19 22:31:51 +00:00
|
|
|
( $CXX "$TMPC" -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
|
2005-06-28 18:56:49 +00:00
|
|
|
TMP="$?"
|
|
|
|
echo >> "$TMPLOG"
|
|
|
|
return "$TMP"
|
|
|
|
}
|
|
|
|
|
|
|
|
echocheck () {
|
|
|
|
echo_n "Checking for $@... "
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check whether the given command is a working C++ compiler
|
|
|
|
#
|
|
|
|
test_compiler ()
|
|
|
|
{
|
|
|
|
cat <<EOF >tmp_cxx_compiler.cpp
|
|
|
|
class Foo {
|
|
|
|
int a;
|
|
|
|
};
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
Foo *a = new Foo();
|
|
|
|
delete a;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
if test -n "$_host"; then
|
|
|
|
# In cross-compiling mode, we cannot run the result
|
2005-11-19 22:31:51 +00:00
|
|
|
eval "$1 -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
|
2005-06-28 18:56:49 +00:00
|
|
|
else
|
2005-11-19 22:31:51 +00:00
|
|
|
eval "$1 -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
|
2005-06-28 18:56:49 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Determine sdl-config
|
|
|
|
#
|
|
|
|
# TODO: small bit of code to test sdl useability
|
|
|
|
find_sdlconfig()
|
|
|
|
{
|
|
|
|
echo_n "Looking for sdl-config... "
|
|
|
|
sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
|
|
|
|
_sdlconfig=
|
|
|
|
|
2005-11-19 22:31:51 +00:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
|
2005-08-25 15:19:17 +00:00
|
|
|
done=0
|
2005-06-28 18:56:49 +00:00
|
|
|
for path_dir in $_sdlpath; do
|
2005-11-19 22:31:51 +00:00
|
|
|
#reset separator to parse sdlconfigs
|
|
|
|
IFS=":"
|
2005-06-28 18:56:49 +00:00
|
|
|
for sdlconfig in $sdlconfigs; do
|
|
|
|
if test -x "$path_dir/$sdlconfig" ; then
|
|
|
|
_sdlconfig="$path_dir/$sdlconfig"
|
2005-08-25 15:19:17 +00:00
|
|
|
done=1
|
2005-06-28 18:56:49 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2005-08-25 15:19:17 +00:00
|
|
|
if test $done -eq 1 ; then
|
|
|
|
echo $_sdlconfig
|
|
|
|
break
|
|
|
|
fi
|
2005-06-28 18:56:49 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
IFS="$ac_save_ifs"
|
|
|
|
|
|
|
|
if test -z "$_sdlconfig"; then
|
|
|
|
echo "none found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Function to provide echo -n for bourne shells that don't have it
|
|
|
|
#
|
|
|
|
echo_n()
|
|
|
|
{
|
|
|
|
printf "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Greet user
|
|
|
|
#
|
|
|
|
|
|
|
|
echo "Running Stella configure..."
|
|
|
|
echo "Configure run on" `date` > $TMPLOG
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check any parameters we received
|
|
|
|
#
|
|
|
|
# TODO:
|
|
|
|
# * Change --disable-mad / --enable-mad to the way it's done in autoconf:
|
|
|
|
# That is, --without-mad / --with-mad=/prefix/to/mad. Useful for people
|
|
|
|
# who have Mad/Vorbis/ALSA installed in a non-standard locations.
|
|
|
|
#
|
|
|
|
|
|
|
|
for parm in "$@" ; do
|
|
|
|
if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
|
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
Usage: $0 [OPTIONS]...
|
|
|
|
|
|
|
|
Configuration:
|
|
|
|
-h, --help display this help and exit
|
|
|
|
|
|
|
|
Installation directories:
|
2005-10-03 00:53:20 +00:00
|
|
|
--prefix=DIR use this prefix for installing stella [/usr/local]
|
2005-09-30 22:12:18 +00:00
|
|
|
--bindir=DIR directory to install the stella binary [PREFIX/bin]
|
2005-10-03 00:53:20 +00:00
|
|
|
--docdir=DIR directory to install documentation [PREFIX/share/doc/stella]
|
|
|
|
--datadir=DIR directory to install icons/data files [PREFIX/share]
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
Optional Features:
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-gl enable/disable OpenGL rendering support [enabled]
|
|
|
|
--disable-gl
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
--enable-windowed enable/disable windowed rendering modes [enabled]
|
|
|
|
--disable-windowed
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-sound enable/disable sound support [enabled]
|
|
|
|
--disable-sound
|
2006-12-15 16:43:12 +00:00
|
|
|
--enable-debugger enable/disable all debugger options [enabled]
|
|
|
|
--disable-debugger
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-joystick enable/disable joystick support [enabled]
|
|
|
|
--disable-joystick
|
2005-11-11 21:44:19 +00:00
|
|
|
--enable-cheats enable/disable cheatcode support [enabled]
|
|
|
|
--disable-cheats
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-shared build shared binary [enabled]
|
|
|
|
--enable-static build static binary (if possible) [disabled]
|
|
|
|
--disable-static
|
2006-02-01 13:53:25 +00:00
|
|
|
--enable-profile build binary with profiling info [disabled]
|
|
|
|
--disable-profile
|
2010-06-15 17:57:54 +00:00
|
|
|
--force-builtin-libpng force use of built-in libpng library [auto]
|
|
|
|
--force-builtin-zlib force use of built-in zlib library [auto]
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
Optional Libraries:
|
|
|
|
--with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional)
|
2010-06-11 19:09:20 +00:00
|
|
|
--with-libpng-prefix=DIR Prefix where libpng is installed (optional)
|
2008-03-09 15:30:27 +00:00
|
|
|
--with-zlib-prefix=DIR Prefix where zlib is installed (optional)
|
2005-10-29 18:11:29 +00:00
|
|
|
--x-libraries Path to X11 libraries [${X_LIBS}]
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
Some influential environment variables:
|
|
|
|
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
|
|
|
nonstandard directory <lib dir>
|
|
|
|
CXX C++ compiler command
|
|
|
|
CXXFLAGS C++ compiler flags
|
|
|
|
CPPFLAGS C++ preprocessor flags, e.g. -I<include dir> if you have
|
|
|
|
headers in a nonstandard directory <include dir>
|
|
|
|
|
|
|
|
EOF
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
done # for parm in ...
|
|
|
|
|
|
|
|
for ac_option in $@; do
|
|
|
|
case "$ac_option" in
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-gl) _build_gl=yes ;;
|
|
|
|
--disable-gl) _build_gl=no ;;
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
--enable-windowed) _build_windowed=yes ;;
|
|
|
|
--disable-windowed) _build_windowed=no ;;
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-sound) _build_sound=yes ;;
|
|
|
|
--disable-sound) _build_sound=no ;;
|
2006-12-18 16:44:40 +00:00
|
|
|
--enable-debugger) _build_debugger=yes ;;
|
|
|
|
--disable-debugger) _build_debugger=no ;;
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-joystick) _build_joystick=yes ;;
|
|
|
|
--disable-joystick) _build_joystick=no ;;
|
2005-11-11 21:44:19 +00:00
|
|
|
--enable-cheats) _build_cheats=yes ;;
|
|
|
|
--disable-cheats) _build_cheats=no ;;
|
2011-04-16 23:39:31 +00:00
|
|
|
--enable-thumb) _build_thumb=yes ;;
|
|
|
|
--disable-thumb) _build_thumb=no ;;
|
2005-10-24 18:18:30 +00:00
|
|
|
--enable-shared) _build_static=no ;;
|
|
|
|
--enable-static) _build_static=yes ;;
|
|
|
|
--disable-static) _build_static=no ;;
|
2006-02-01 13:53:25 +00:00
|
|
|
--enable-profile) _build_profile=yes ;;
|
|
|
|
--disable-profile) _build_profile=no ;;
|
2010-06-15 17:57:54 +00:00
|
|
|
--force-builtin-libpng) _libpng=no ;;
|
|
|
|
--force-builtin-zlib) _zlib=no ;;
|
2008-03-09 15:30:27 +00:00
|
|
|
--with-sdl-prefix=*)
|
|
|
|
arg=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
_sdlpath="$arg:$arg/bin"
|
|
|
|
;;
|
2010-06-11 19:09:20 +00:00
|
|
|
--with-libpng-prefix=*)
|
|
|
|
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
LIBPNG_CFLAGS="-I$_prefix/include"
|
|
|
|
LIBPNG_LIBS="-L$_prefix/lib"
|
|
|
|
;;
|
2005-06-28 23:18:16 +00:00
|
|
|
--with-zlib-prefix=*)
|
|
|
|
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
ZLIB_CFLAGS="-I$_prefix/include"
|
|
|
|
ZLIB_LIBS="-L$_prefix/lib"
|
|
|
|
;;
|
2005-10-29 18:11:29 +00:00
|
|
|
--x-libraries=*)
|
|
|
|
arg=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
X_LIBS="$arg"
|
|
|
|
;;
|
2005-06-28 23:18:16 +00:00
|
|
|
--host=*)
|
|
|
|
_host=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
--prefix=*)
|
|
|
|
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
|
|
|
--bindir=*)
|
|
|
|
_bindir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2005-09-30 22:12:18 +00:00
|
|
|
--docdir=*)
|
|
|
|
_docdir=`echo $ac_option | cut -d '=' -f 2`
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
2005-10-03 00:53:20 +00:00
|
|
|
--datadir=*)
|
|
|
|
_datadir=`echo $ac_option | cut -d '=' -f 2`
|
|
|
|
;;
|
2005-07-05 19:29:57 +00:00
|
|
|
*)
|
2005-07-06 15:09:16 +00:00
|
|
|
echo "warning: unrecognised option: $ac_option"
|
2005-07-05 19:29:57 +00:00
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
esac;
|
|
|
|
done;
|
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
|
|
|
|
|
|
|
|
case $_host in
|
2008-03-09 15:30:27 +00:00
|
|
|
#linupy)
|
|
|
|
# _host_os=linux
|
|
|
|
# _host_cpu=arm
|
|
|
|
# ;;
|
|
|
|
#arm-riscos-aof)
|
|
|
|
# _host_os=riscos
|
|
|
|
# _host_cpu=arm
|
|
|
|
# ;;
|
|
|
|
#ppc-amigaos)
|
|
|
|
# _host_os=amigaos
|
|
|
|
# _host_cpu=ppc
|
|
|
|
# ;;
|
2006-01-08 02:28:04 +00:00
|
|
|
gp2x)
|
|
|
|
_host_os=gp2x
|
|
|
|
_host_cpu=arm
|
2008-03-09 15:30:27 +00:00
|
|
|
_host_prefix=arm-open2x-linux
|
2006-01-08 02:28:04 +00:00
|
|
|
;;
|
2008-03-09 14:17:03 +00:00
|
|
|
mingw32-cross)
|
|
|
|
_host_os=mingw32msvc
|
|
|
|
_host_cpu=i386
|
2008-03-09 15:30:27 +00:00
|
|
|
_host_prefix=i386-mingw32msvc
|
2008-03-09 14:17:03 +00:00
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
*)
|
|
|
|
guessed_host=`$_srcdir/config.guess`
|
|
|
|
_host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
|
|
|
_host_os=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|
|
|
_host_vendor=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
#
|
|
|
|
# Determine extension used for executables
|
|
|
|
#
|
|
|
|
case $_host_os in
|
2005-11-19 22:31:51 +00:00
|
|
|
mingw* | cygwin* |os2-emx*)
|
2005-06-28 18:56:49 +00:00
|
|
|
EXEEXT=".exe"
|
|
|
|
;;
|
|
|
|
arm-riscos-aof)
|
|
|
|
EXEEXT=",ff8"
|
|
|
|
;;
|
2005-08-25 15:19:17 +00:00
|
|
|
psp)
|
|
|
|
EXEEXT=".elf"
|
|
|
|
;;
|
2006-01-08 02:28:04 +00:00
|
|
|
gp2x)
|
2006-02-15 03:12:12 +00:00
|
|
|
EXEEXT=""
|
2006-01-08 02:28:04 +00:00
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
*)
|
|
|
|
EXEEXT=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-11-19 22:31:51 +00:00
|
|
|
#
|
|
|
|
# Determine separator used for $PATH
|
|
|
|
#
|
|
|
|
case $_host_os in
|
|
|
|
os2-emx* )
|
|
|
|
SEPARATOR=";"
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
SEPARATOR=":"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
#
|
|
|
|
# Determine the C++ compiler
|
|
|
|
#
|
|
|
|
echo_n "Looking for C++ compiler... "
|
|
|
|
if test -n "$_host"; then
|
2008-03-09 15:30:27 +00:00
|
|
|
compilers="$CXX $_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
|
2005-06-28 18:56:49 +00:00
|
|
|
else
|
|
|
|
compilers="$CXX g++ c++"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for compiler in $compilers; do
|
|
|
|
if test_compiler $compiler; then
|
2008-02-20 00:17:49 +00:00
|
|
|
CXX=$compiler
|
|
|
|
echo $CXX
|
|
|
|
break
|
2005-06-28 18:56:49 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z $CXX; then
|
|
|
|
echo "none found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Determine the compiler version
|
|
|
|
|
|
|
|
echocheck "compiler version"
|
|
|
|
|
2005-08-25 15:19:17 +00:00
|
|
|
cxx_name=`( $cc -v ) 2>&1 | tail -n 1 | cut -d ' ' -f 1`
|
2005-06-28 18:56:49 +00:00
|
|
|
cxx_version=`( $CXX -dumpversion ) 2>&1`
|
|
|
|
if test "$?" -gt 0; then
|
|
|
|
cxx_version="not found"
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $cxx_version in
|
2011-10-27 23:07:07 +00:00
|
|
|
2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|3.[0-9].[0-9][-.]*|4.[0-9]|4.[0-9].[0-9]|4.[0-9].[0-9][-.]*)
|
2005-06-28 18:56:49 +00:00
|
|
|
_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
|
|
|
|
_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
|
|
|
|
cxx_version="$cxx_version, ok"
|
|
|
|
cxx_verc_fail=no
|
|
|
|
;;
|
|
|
|
# whacky beos version strings
|
|
|
|
2.9-beos-991026*|2.9-beos-000224*)
|
|
|
|
_cxx_major=2
|
|
|
|
_cxx_minor=95
|
|
|
|
cxx_version="$cxx_version, ok"
|
|
|
|
cxx_verc_fail=no
|
|
|
|
;;
|
|
|
|
3_4)
|
|
|
|
_cxx_major=3
|
|
|
|
_mxx_minor=4
|
|
|
|
;;
|
|
|
|
'not found')
|
|
|
|
cxx_verc_fail=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cxx_version="$cxx_version, bad"
|
|
|
|
cxx_verc_fail=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "$cxx_version"
|
|
|
|
|
|
|
|
if test "$cxx_verc_fail" = yes ; then
|
|
|
|
echo
|
|
|
|
echo "The version of your compiler is not supported at this time"
|
|
|
|
echo "Please ensure you are using GCC 2.95.x or GCC 3.x"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Do CXXFLAGS now we know the compiler version
|
|
|
|
#
|
|
|
|
|
|
|
|
if test "$_cxx_major" -ge "3" ; then
|
2005-06-28 23:18:16 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS"
|
2005-06-28 18:56:49 +00:00
|
|
|
_make_def_HAVE_GCC3='HAVE_GCC3 = 1'
|
|
|
|
fi;
|
|
|
|
|
|
|
|
if test -n "$_host"; then
|
|
|
|
# Cross-compiling mode - add your target here if needed
|
|
|
|
case "$_host" in
|
2008-03-09 15:30:27 +00:00
|
|
|
# linupy|arm-riscos-aof)
|
|
|
|
# echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
|
|
|
# DEFINES="$DEFINES -DUNIX"
|
|
|
|
# _def_endianness='#define SCUMM_LITTLE_ENDIAN'
|
|
|
|
# _def_align='#define SCUMM_NEED_ALIGNMENT'
|
|
|
|
# _def_linupy="#define DLINUPY"
|
|
|
|
# type_1_byte='char'
|
|
|
|
# type_2_byte='short'
|
|
|
|
# type_4_byte='int'
|
|
|
|
# ;;
|
|
|
|
# ppc-amigaos)
|
|
|
|
# echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
|
|
|
|
# _def_endianness='#define SCUMM_BIG_ENDIAN'
|
|
|
|
# _def_align='#define SCUMM_NEED_ALIGNMENT'
|
|
|
|
# type_1_byte='char'
|
|
|
|
# type_2_byte='short'
|
|
|
|
# type_4_byte='long'
|
|
|
|
# CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
|
|
|
|
# LDFLAGS="$LDFLAGS -newlib"
|
|
|
|
# ;;
|
2006-01-08 02:28:04 +00:00
|
|
|
gp2x)
|
2006-09-18 00:08:40 +00:00
|
|
|
echo "Cross-compiling to $_host, forcing static build, and disabling OpenGL."
|
2006-01-08 02:28:04 +00:00
|
|
|
_build_static=yes
|
|
|
|
_build_gl=no
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
_build_windowed=no
|
2006-01-08 02:28:04 +00:00
|
|
|
;;
|
2008-03-09 14:17:03 +00:00
|
|
|
mingw32-cross)
|
|
|
|
echo "Cross-compiling for Win32 using MinGW."
|
|
|
|
DEFINES="$DEFINES -DWIN32"
|
|
|
|
_host_os=win32
|
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
*)
|
|
|
|
echo "Cross-compiling to unknown target, please add your target to configure."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
else
|
|
|
|
#
|
|
|
|
# Determine build settings
|
|
|
|
#
|
|
|
|
# TODO - also add an command line option to override this?!?
|
|
|
|
echo_n "Checking hosttype... "
|
|
|
|
echo $_host_os
|
|
|
|
case $_host_os in
|
2010-11-15 21:47:07 +00:00
|
|
|
linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.3 | sunos* | hpux* | beos*)
|
2005-06-28 18:56:49 +00:00
|
|
|
DEFINES="$DEFINES -DUNIX"
|
|
|
|
_host_os=unix
|
|
|
|
;;
|
2005-06-28 23:18:16 +00:00
|
|
|
irix*)
|
|
|
|
DEFINES="$DEFINES -DUNIX"
|
|
|
|
_ranlib=:
|
|
|
|
_host_os=unix
|
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
mingw*)
|
|
|
|
DEFINES="$DEFINES -DWIN32"
|
|
|
|
_host_os=win32
|
|
|
|
;;
|
2005-06-28 23:18:16 +00:00
|
|
|
cygwin*)
|
|
|
|
DEFINES="$DEFINES -mno-cygwin -DWIN32"
|
|
|
|
LIBS="$LIBS -mno-cygwin -lmingw32 -lwinmm"
|
|
|
|
_host_os=win32
|
|
|
|
;;
|
2005-11-19 22:31:51 +00:00
|
|
|
os2*)
|
|
|
|
DEFINES="$DEFINES -DUNIX -DOS2"
|
|
|
|
_host_os=unix
|
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
# given this is a shell script assume some type of unix
|
|
|
|
*)
|
|
|
|
echo "WARNING: could not establish system type, assuming unix like"
|
|
|
|
DEFINES="$DEFINES -DUNIX"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2008-03-09 15:30:27 +00:00
|
|
|
# Cross-compilers use their own commands for the following functions
|
|
|
|
if test -n "$_host_prefix"; then
|
|
|
|
_strip="$_host_prefix-$_strip"
|
|
|
|
_windres="$_host_prefix-$_windres"
|
Some configure work:
- removed TEXTURES_ARE_DIRTY logic, and just recreate the GL textures
when a screenmode changes
- enable checking for machine type and if nasm is available
- logic to enable scaler mode only when in OpenGL mode (still not complete
and defaults to off)
First pass at adding scaler code to OpenGL. Still much work TODO,
but the C version is working correctly (asm is causing crashes,
haven't figured out why). GL quad coordinates aren't properly
set yet, so the image always appears in the upper left corner, and
is not scaled to the window size. CPU usage is also quite high,
but I'm on a 1GHz laptop with i950 GL, so that may explain it.
Fixed long-standing bug in software rendering, where switching to a
lower-res screen while a message is being displayed would cause a
segfault.
Large refactoring of mainSDL. Specifically, OSystem now owns all
the subsystems except for Settings, taking responsibility for creating
and destroying them.
Properties fixes for 'Tomarc the Barbarian' and 'Gyruss'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-10-22 18:58:46 +00:00
|
|
|
fi
|
|
|
|
|
2010-06-11 19:09:20 +00:00
|
|
|
#
|
|
|
|
# Check for libpng
|
|
|
|
#
|
|
|
|
echocheck "libpng"
|
|
|
|
if test "$_libpng" = auto ; then
|
|
|
|
_libpng=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <png.h>
|
|
|
|
int main(void) { return printf("%s\n", PNG_HEADER_VERSION_STRING); }
|
|
|
|
EOF
|
|
|
|
cc_check $LDFLAGS $CXXFLAGS $LIBPNG_CFLAGS $LIBPNG_LIBS -lpng && _libpng=yes
|
|
|
|
fi
|
|
|
|
if test "$_libpng" = yes ; then
|
|
|
|
echo "$_libpng"
|
|
|
|
else
|
|
|
|
echo "none found, using built-in version"
|
|
|
|
fi
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
#
|
|
|
|
# Check for ZLib
|
|
|
|
#
|
|
|
|
echocheck "zlib"
|
|
|
|
if test "$_zlib" = auto ; then
|
|
|
|
_zlib=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <string.h>
|
|
|
|
#include <zlib.h>
|
2005-06-28 23:18:16 +00:00
|
|
|
int main(void) { return strcmp(ZLIB_VERSION, zlibVersion()); }
|
2005-06-28 18:56:49 +00:00
|
|
|
EOF
|
2005-06-28 23:18:16 +00:00
|
|
|
cc_check $LDFLAGS $CXXFLAGS $ZLIB_CFLAGS $ZLIB_LIBS -lz && _zlib=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
fi
|
2006-12-13 22:46:28 +00:00
|
|
|
if test "$_zlib" = yes ; then
|
|
|
|
echo "$_zlib"
|
|
|
|
else
|
2010-01-29 23:37:33 +00:00
|
|
|
echo "none found, using built-in version"
|
2006-12-13 22:46:28 +00:00
|
|
|
fi
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check for GL
|
|
|
|
#
|
|
|
|
echocheck "opengl"
|
|
|
|
if test "$_opengl" = auto ; then
|
|
|
|
_opengl=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <string.h>
|
|
|
|
#include <GL/gl.h>
|
2006-01-14 23:50:43 +00:00
|
|
|
#include <GL/glu.h>
|
2005-06-28 18:56:49 +00:00
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check $LDFLAGS $CXXFLAGS && _opengl=yes
|
|
|
|
fi
|
|
|
|
echo "$_opengl"
|
|
|
|
|
|
|
|
#
|
|
|
|
# figure out installation directories
|
|
|
|
#
|
|
|
|
test -z "$_bindir" && _bindir="$_prefix/bin"
|
2005-09-30 22:12:18 +00:00
|
|
|
test -z "$_docdir" && _docdir="$_prefix/share/doc/stella"
|
2005-10-03 00:53:20 +00:00
|
|
|
test -z "$_datadir" && _datadir="$_prefix/share"
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo_n "Summary:"
|
|
|
|
echo
|
|
|
|
|
|
|
|
if test "$_build_gl" = "yes" ; then
|
|
|
|
if test "$_opengl" = "yes" ; then
|
|
|
|
echo_n " OpenGL rendering enabled"
|
|
|
|
echo
|
|
|
|
else
|
2006-01-14 21:36:29 +00:00
|
|
|
echo_n " OpenGL rendering disabled (missing OpenGL headers)"
|
2005-06-28 18:56:49 +00:00
|
|
|
echo
|
|
|
|
_build_gl=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo_n " OpenGL rendering disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
if test "$_build_windowed" = "yes" ; then
|
|
|
|
echo_n " Windowed rendering modes enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Windowed rendering modes disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
if test "$_build_sound" = "yes" ; then
|
|
|
|
echo_n " Sound support enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Sound support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2006-12-15 16:43:12 +00:00
|
|
|
if test "$_build_debugger" = "yes" ; then
|
|
|
|
echo_n " Debugger support enabled"
|
2005-06-28 18:56:49 +00:00
|
|
|
echo
|
|
|
|
else
|
2006-12-15 16:43:12 +00:00
|
|
|
echo_n " Debugger support disabled"
|
2005-06-28 18:56:49 +00:00
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$_build_snapshot" = "yes" ; then
|
2006-11-09 03:06:42 +00:00
|
|
|
echo_n " Snapshot support enabled"
|
|
|
|
echo
|
2005-06-28 18:56:49 +00:00
|
|
|
else
|
|
|
|
echo_n " Snapshot support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$_build_joystick" = yes ; then
|
|
|
|
echo_n " Joystick support enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Joystick support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2005-11-11 21:44:19 +00:00
|
|
|
if test "$_build_cheats" = yes ; then
|
|
|
|
echo_n " Cheatcode support enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Cheatcode support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2011-04-16 23:39:31 +00:00
|
|
|
if test "$_build_thumb" = yes ; then
|
|
|
|
echo_n " Thumb ARM emulation support enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Thumb ARM emulation support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2005-07-18 16:10:52 +00:00
|
|
|
if test "$_build_static" = yes ; then
|
|
|
|
echo_n " Static binary enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Static binary disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2006-02-01 13:53:25 +00:00
|
|
|
if test "$_build_profile" = yes ; then
|
|
|
|
echo_n " Profiling enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Profiling disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
#
|
|
|
|
# Now, add the appropriate defines/libraries/headers
|
|
|
|
#
|
|
|
|
echo
|
|
|
|
find_sdlconfig
|
|
|
|
|
|
|
|
SRC="src"
|
|
|
|
CORE="$SRC/emucore"
|
|
|
|
COMMON="$SRC/common"
|
|
|
|
GUI="$SRC/gui"
|
|
|
|
DBG="$SRC/debugger"
|
2005-08-30 17:51:26 +00:00
|
|
|
DBGGUI="$SRC/debugger/gui"
|
2005-07-01 04:22:37 +00:00
|
|
|
YACC="$SRC/yacc"
|
2005-11-11 21:44:19 +00:00
|
|
|
CHEAT="$SRC/cheat"
|
2010-06-11 19:09:20 +00:00
|
|
|
LIBPNG="$SRC/libpng"
|
2010-01-29 23:37:33 +00:00
|
|
|
ZLIB="$SRC/zlib"
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2009-11-22 02:32:20 +00:00
|
|
|
INCLUDES="-I$CORE -I$COMMON -I$GUI"
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
|
2005-07-18 16:10:52 +00:00
|
|
|
if test "$_build_static" = yes ; then
|
|
|
|
_sdl_conf_libs="--static-libs"
|
|
|
|
LDFLAGS="-static $LDFLAGS"
|
|
|
|
else
|
|
|
|
_sdl_conf_libs="--libs"
|
|
|
|
fi
|
|
|
|
|
2010-01-29 23:37:33 +00:00
|
|
|
LIBS="$LIBS `$_sdlconfig $_sdl_conf_libs`"
|
2005-08-25 15:19:17 +00:00
|
|
|
LD=$CXX
|
2005-06-28 18:56:49 +00:00
|
|
|
case $_host_os in
|
2005-07-03 14:18:54 +00:00
|
|
|
unix)
|
2005-06-28 18:56:49 +00:00
|
|
|
DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
|
|
|
|
MODULES="$MODULES $SRC/unix"
|
|
|
|
INCLUDES="$INCLUDES -I$SRC/unix"
|
2010-08-11 21:53:19 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check for X11
|
|
|
|
#
|
|
|
|
_x11=no
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
int main(void) { return 0; }
|
|
|
|
EOF
|
|
|
|
cc_check $LDFLAGS $CXXFLAGS -lX11 && _x11=yes
|
|
|
|
if test "$_x11" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DHAVE_X11"
|
|
|
|
LIBS="$LIBS -lX11"
|
|
|
|
fi
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
2005-07-03 14:18:54 +00:00
|
|
|
win32)
|
2005-06-28 18:56:49 +00:00
|
|
|
DEFINES="$DEFINES -DBSPF_WIN32 -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
|
|
|
|
MODULES="$MODULES $SRC/win32"
|
|
|
|
INCLUDES="$INCLUDES -I$SRC/win32"
|
2005-10-22 20:33:57 +00:00
|
|
|
LIBS="$LIBS -lmingw32 -lwinmm"
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
2006-01-08 02:28:04 +00:00
|
|
|
gp2x)
|
2006-09-18 00:08:40 +00:00
|
|
|
# -O3 hangs the GP2X, do not use.
|
2006-11-29 00:24:57 +00:00
|
|
|
CXXFLAGS="-O2 -finline-functions -mtune=arm920t"
|
2006-01-08 02:28:04 +00:00
|
|
|
DEFINES="$DEFINES -DBSPF_GP2X -DGP2X -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
|
|
|
|
MODULES="$MODULES $SRC/gp2x"
|
2006-11-29 00:24:57 +00:00
|
|
|
INCLUDES="$INCLUDES -I$SRC/gp2x $ZLIB_CFLAGS"
|
2006-11-09 07:58:39 +00:00
|
|
|
|
2006-01-08 02:28:04 +00:00
|
|
|
_ranlib="arm-linux-ranlib"
|
|
|
|
_ar="arm-linux-ar cru"
|
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
*)
|
|
|
|
echo "WARNING: host system not currenty supported"
|
2005-07-03 14:18:54 +00:00
|
|
|
exit
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2010-06-11 19:09:20 +00:00
|
|
|
if test "$_libpng" = yes ; then
|
|
|
|
LIBS="$LIBS -lpng"
|
|
|
|
else
|
|
|
|
MODULES="$MODULES $LIBPNG"
|
|
|
|
INCLUDES="$INCLUDES -I$LIBPNG"
|
|
|
|
fi
|
|
|
|
|
2010-01-29 23:37:33 +00:00
|
|
|
if test "$_zlib" = yes ; then
|
|
|
|
LIBS="$LIBS -lz"
|
|
|
|
else
|
|
|
|
MODULES="$MODULES $ZLIB"
|
|
|
|
INCLUDES="$INCLUDES -I$ZLIB"
|
|
|
|
fi
|
|
|
|
|
Some configure work:
- removed TEXTURES_ARE_DIRTY logic, and just recreate the GL textures
when a screenmode changes
- enable checking for machine type and if nasm is available
- logic to enable scaler mode only when in OpenGL mode (still not complete
and defaults to off)
First pass at adding scaler code to OpenGL. Still much work TODO,
but the C version is working correctly (asm is causing crashes,
haven't figured out why). GL quad coordinates aren't properly
set yet, so the image always appears in the upper left corner, and
is not scaled to the window size. CPU usage is also quite high,
but I'm on a 1GHz laptop with i950 GL, so that may explain it.
Fixed long-standing bug in software rendering, where switching to a
lower-res screen while a message is being displayed would cause a
segfault.
Large refactoring of mainSDL. Specifically, OSystem now owns all
the subsystems except for Settings, taking responsibility for creating
and destroying them.
Properties fixes for 'Tomarc the Barbarian' and 'Gyruss'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-10-22 18:58:46 +00:00
|
|
|
if test "$_build_gl" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DDISPLAY_OPENGL"
|
|
|
|
fi
|
|
|
|
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
if test "$_build_windowed" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DWINDOWED_SUPPORT"
|
|
|
|
fi
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
if test "$_build_sound" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DSOUND_SUPPORT"
|
|
|
|
fi
|
|
|
|
|
2006-12-15 16:43:12 +00:00
|
|
|
if test "$_build_debugger" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DDEBUGGER_SUPPORT"
|
2005-08-30 17:51:26 +00:00
|
|
|
MODULES="$MODULES $DBG $DBGGUI $YACC"
|
|
|
|
INCLUDES="$INCLUDES -I$DBG -I$DBGGUI -I$YACC"
|
2005-06-28 18:56:49 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$_build_snapshot" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DSNAPSHOT_SUPPORT"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$_build_joystick" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DJOYSTICK_SUPPORT"
|
|
|
|
fi
|
|
|
|
|
2005-11-11 21:44:19 +00:00
|
|
|
if test "$_build_cheats" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DCHEATCODE_SUPPORT"
|
|
|
|
MODULES="$MODULES $CHEAT"
|
|
|
|
INCLUDES="$INCLUDES -I$CHEAT"
|
|
|
|
fi
|
|
|
|
|
2011-04-16 23:39:31 +00:00
|
|
|
if test "$_build_thumb" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DTHUMB_SUPPORT"
|
|
|
|
fi
|
|
|
|
|
2006-02-01 13:53:25 +00:00
|
|
|
if test "$_build_profile" = no ; then
|
|
|
|
_build_profile=
|
|
|
|
fi
|
2005-11-11 21:44:19 +00:00
|
|
|
|
Some configure work:
- removed TEXTURES_ARE_DIRTY logic, and just recreate the GL textures
when a screenmode changes
- enable checking for machine type and if nasm is available
- logic to enable scaler mode only when in OpenGL mode (still not complete
and defaults to off)
First pass at adding scaler code to OpenGL. Still much work TODO,
but the C version is working correctly (asm is causing crashes,
haven't figured out why). GL quad coordinates aren't properly
set yet, so the image always appears in the upper left corner, and
is not scaled to the window size. CPU usage is also quite high,
but I'm on a 1GHz laptop with i950 GL, so that may explain it.
Fixed long-standing bug in software rendering, where switching to a
lower-res screen while a message is being displayed would cause a
segfault.
Large refactoring of mainSDL. Specifically, OSystem now owns all
the subsystems except for Settings, taking responsibility for creating
and destroying them.
Properties fixes for 'Tomarc the Barbarian' and 'Gyruss'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-10-22 18:58:46 +00:00
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
echo "Creating config.mak"
|
|
|
|
cat > config.mak << EOF
|
|
|
|
# -------- Generated by configure -----------
|
|
|
|
|
|
|
|
CXX := $CXX
|
|
|
|
CXXFLAGS := $CXXFLAGS
|
2005-08-25 15:19:17 +00:00
|
|
|
LD := $LD
|
2005-06-28 18:56:49 +00:00
|
|
|
LIBS += $LIBS
|
|
|
|
RANLIB := $_ranlib
|
|
|
|
INSTALL := $_install
|
|
|
|
AR := $_ar
|
|
|
|
MKDIR := $_mkdir
|
|
|
|
ECHO := $_echo
|
|
|
|
CAT := $_cat
|
|
|
|
RM := $_rm
|
|
|
|
RM_REC := $_rm_rec
|
|
|
|
ZIP := $_zip
|
|
|
|
CP := $_cp
|
|
|
|
WIN32PATH=$_win32path
|
2008-03-09 15:30:27 +00:00
|
|
|
STRIP := $_strip
|
|
|
|
WINDRES := $_windres
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
MODULES += $MODULES
|
|
|
|
MODULE_DIRS += $MODULE_DIRS
|
|
|
|
EXEEXT := $EXEEXT
|
|
|
|
|
|
|
|
PREFIX := $_prefix
|
|
|
|
BINDIR := $_bindir
|
2005-09-30 22:12:18 +00:00
|
|
|
DOCDIR := $_docdir
|
2005-10-03 00:53:20 +00:00
|
|
|
DATADIR := $_datadir
|
2006-02-01 13:53:25 +00:00
|
|
|
PROFILE := $_build_profile
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
$_make_def_HAVE_GCC3
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
INCLUDES += $INCLUDES
|
2005-06-28 23:18:16 +00:00
|
|
|
OBJS += $OBJS
|
2005-06-28 18:56:49 +00:00
|
|
|
DEFINES += $DEFINES
|
|
|
|
LDFLAGS += $LDFLAGS
|
|
|
|
EOF
|
2005-06-28 23:18:16 +00:00
|
|
|
|
|
|
|
# This should be taken care of elsewhere, but I'm not sure where
|
|
|
|
rm -f stella-conf*
|