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.)
|
2014-02-19 15:34:22 +00:00
|
|
|
# * detect whether the chosen backend is available (e.g. call sdl2-config)
|
2005-06-28 18:56:49 +00:00
|
|
|
# * ....
|
|
|
|
|
|
|
|
|
|
|
|
# use environment vars if set
|
|
|
|
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
|
|
|
|
|
|
|
|
# default option behaviour yes/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=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
_build_sound=yes
|
2016-12-04 19:35:21 +00:00
|
|
|
_build_debugger=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
_build_joystick=yes
|
2005-11-11 21:44:19 +00:00
|
|
|
_build_cheats=yes
|
2019-04-21 22:37:56 +00:00
|
|
|
_build_png=yes
|
2019-04-24 18:06:20 +00:00
|
|
|
_build_zip=yes
|
2005-07-18 16:10:52 +00:00
|
|
|
_build_static=no
|
2006-02-01 13:53:25 +00:00
|
|
|
_build_profile=no
|
2019-03-03 15:40:07 +00:00
|
|
|
_build_debug=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
|
2013-09-27 20:41:24 +00:00
|
|
|
_windowspath=""
|
2014-02-19 15:34:22 +00:00
|
|
|
_sdlconfig=sdl2-config
|
2005-06-28 18:56:49 +00:00
|
|
|
_sdlpath="$PATH"
|
|
|
|
_prefix=/usr/local
|
|
|
|
|
|
|
|
_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"
|
2016-08-24 14:43:30 +00:00
|
|
|
echo "$CXX $TMPC $CXXFLAGS $LDFLAGS -o $TMPO$EXEEXT $@" >> "$TMPLOG"
|
2005-06-28 18:56:49 +00:00
|
|
|
rm -f "$TMPO$EXEEXT"
|
2016-08-24 14:43:30 +00:00
|
|
|
( $CXX "$TMPC" $CXXFLAGS $LDFLAGS -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
|
2005-06-28 18:56:49 +00:00
|
|
|
TMP="$?"
|
|
|
|
echo >> "$TMPLOG"
|
|
|
|
return "$TMP"
|
|
|
|
}
|
|
|
|
|
2012-01-06 22:38:09 +00:00
|
|
|
cc_check_define() {
|
|
|
|
cat > $TMPC << EOF
|
|
|
|
int main(void) {
|
|
|
|
#ifndef $1
|
|
|
|
syntax error
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
cc_check -c
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
echocheck () {
|
|
|
|
echo_n "Checking for $@... "
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check whether the given command is a working C++ compiler
|
|
|
|
#
|
|
|
|
test_compiler ()
|
|
|
|
{
|
|
|
|
cat <<EOF >tmp_cxx_compiler.cpp
|
2016-02-29 22:41:18 +00:00
|
|
|
#include <memory>
|
2005-06-28 18:56:49 +00:00
|
|
|
class Foo {
|
|
|
|
int a;
|
|
|
|
};
|
2016-02-29 22:41:18 +00:00
|
|
|
int main(int argc, char* argv[])
|
2005-06-28 18:56:49 +00:00
|
|
|
{
|
2016-02-29 22:41:18 +00:00
|
|
|
std::shared_ptr<Foo> a = std::make_shared<Foo>();
|
2005-06-28 18:56:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
if test -n "$_host"; then
|
|
|
|
# In cross-compiling mode, we cannot run the result
|
2016-08-24 14:43:30 +00:00
|
|
|
eval "$1 $CXXFLAGS $LDFLAGS -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
|
2016-08-24 14:43:30 +00:00
|
|
|
eval "$1 $CXXFLAGS $LDFLAGS -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
|
|
|
|
}
|
|
|
|
|
2012-01-06 22:38:09 +00:00
|
|
|
# Add a line of data to config.mk.
|
|
|
|
add_line_to_config_mk() {
|
|
|
|
_config_mk_data="$_config_mk_data"'
|
|
|
|
'"$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
#
|
2014-02-19 15:34:22 +00:00
|
|
|
# Determine sdl2-config
|
2005-06-28 18:56:49 +00:00
|
|
|
#
|
|
|
|
# TODO: small bit of code to test sdl useability
|
|
|
|
find_sdlconfig()
|
|
|
|
{
|
2014-02-19 15:34:22 +00:00
|
|
|
echo_n "Looking for sdl2-config... "
|
|
|
|
sdlconfigs="$_sdlconfig"
|
2005-06-28 18:56:49 +00:00
|
|
|
_sdlconfig=
|
2017-01-15 16:58:41 +00:00
|
|
|
|
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
|
2017-01-15 16:58:41 +00:00
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
IFS="$ac_save_ifs"
|
2017-01-15 16:58:41 +00:00
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
if test -z "$_sdlconfig"; then
|
|
|
|
echo "none found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Function to provide echo -n for bourne shells that don't have it
|
|
|
|
#
|
2017-01-15 16:58:41 +00:00
|
|
|
echo_n()
|
|
|
|
{
|
2005-06-28 18:56:49 +00:00
|
|
|
printf "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Greet user
|
|
|
|
#
|
|
|
|
|
|
|
|
echo "Running Stella configure..."
|
|
|
|
echo "Configure run on" `date` > $TMPLOG
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check any parameters we received
|
|
|
|
#
|
|
|
|
|
|
|
|
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-sound enable/disable sound support [enabled]
|
|
|
|
--disable-sound
|
2016-10-30 20:00:08 +00:00
|
|
|
--enable-debugger enable/disable all debugger options [disabled]
|
2006-12-15 16:43:12 +00:00
|
|
|
--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
|
2019-04-21 22:37:56 +00:00
|
|
|
--enable-png enable/disable PNG image support [enabled]
|
|
|
|
--disable-png
|
2019-04-24 18:06:20 +00:00
|
|
|
--enable-zip enable/disable ZIP file support [enabled]
|
|
|
|
--disable-zip
|
2013-09-28 00:51:10 +00:00
|
|
|
--enable-windowed enable/disable windowed rendering modes [enabled]
|
|
|
|
--disable-windowed
|
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
|
2019-03-09 15:52:33 +00:00
|
|
|
--enable-debug build with debugging symbols [disabled]
|
|
|
|
--disable-debug
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
Optional Libraries:
|
2014-02-19 15:34:22 +00:00
|
|
|
--with-sdl-prefix=DIR Prefix where the sdl2-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
|
|
|
|
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-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 ;;
|
2019-04-21 22:37:56 +00:00
|
|
|
--enable-png) _build_png=yes ;;
|
|
|
|
--disable-png) _build_png=no ;;
|
2019-04-24 18:06:20 +00:00
|
|
|
--enable-zip) _build_zip=yes ;;
|
|
|
|
--disable-zip) _build_zip=no ;;
|
2013-09-28 00:51:10 +00:00
|
|
|
--enable-windowed) _build_windowed=yes ;;
|
|
|
|
--disable-windowed) _build_windowed=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 ;;
|
2019-03-03 15:40:07 +00:00
|
|
|
--enable-debug) _build_debug=yes ;;
|
|
|
|
--disable-debug) _build_debug=false ;;
|
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"
|
|
|
|
;;
|
|
|
|
--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
|
|
|
|
# ;;
|
2019-03-09 15:52:33 +00:00
|
|
|
retron77)
|
|
|
|
_host_os=retron77
|
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... "
|
2018-02-04 21:40:31 +00:00
|
|
|
if test -n "$CXX"; then
|
|
|
|
echo $CXX
|
2005-06-28 18:56:49 +00:00
|
|
|
else
|
2018-02-04 21:40:31 +00:00
|
|
|
if test -n "$_host"; then
|
2019-03-09 15:52:33 +00:00
|
|
|
compilers="$_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++ g++ c++"
|
2018-02-04 21:40:31 +00:00
|
|
|
else
|
|
|
|
compilers="g++ c++"
|
|
|
|
fi
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2018-02-04 21:40:31 +00:00
|
|
|
for compiler in $compilers; do
|
|
|
|
if test_compiler "$compiler -std=c++14"; then
|
|
|
|
CXX=$compiler
|
|
|
|
echo $CXX
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z "$CXX"; then
|
|
|
|
echo "none found!"
|
|
|
|
exit 1
|
2005-06-28 18:56:49 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Determine the compiler version
|
|
|
|
|
|
|
|
echocheck "compiler version"
|
|
|
|
|
2016-02-29 22:41:18 +00:00
|
|
|
have_clang=no
|
|
|
|
cc_check_define __clang_version__ && have_clang=yes
|
2017-08-30 21:12:50 +00:00
|
|
|
if test $have_clang = no; then
|
|
|
|
cc_check_define __clang__ && have_clang=yes
|
|
|
|
fi
|
2012-01-06 22:38:09 +00:00
|
|
|
have_gcc=no
|
|
|
|
cc_check_define __GNUC__ && have_gcc=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2016-02-29 22:41:18 +00:00
|
|
|
if test "$have_clang" = yes; then
|
2012-01-06 22:38:09 +00:00
|
|
|
|
2018-09-19 20:23:53 +00:00
|
|
|
clang_minor=$( $CXX -dM -E -x c /dev/null | grep __clang_minor__ | sed -E 's/.* ([0-9]+).*/\1/' )
|
|
|
|
clang_patch=$( $CXX -dM -E -x c /dev/null | grep __clang_patchlevel__ | sed -E 's/.* ([0-9]+).*/\1/' )
|
|
|
|
clang_major=$( $CXX -dM -E -x c /dev/null | grep __clang_major__ | sed -E 's/.* ([0-9]+).*/\1/' )
|
2017-10-12 00:19:31 +00:00
|
|
|
|
|
|
|
cxx_version="$clang_major.$clang_minor.$clang_patch"
|
|
|
|
|
2017-08-30 21:12:50 +00:00
|
|
|
is_xcode=$( $CXX -dM -E -x c /dev/null | grep __apple_build_version__ )
|
|
|
|
|
2017-10-12 00:19:31 +00:00
|
|
|
# Need at least version 8
|
2017-08-30 21:12:50 +00:00
|
|
|
if test -n "$is_xcode"; then
|
|
|
|
cxx_name="XCode $cxx_version"
|
|
|
|
|
|
|
|
if test $clang_major -ge 8; then
|
2012-01-06 22:38:09 +00:00
|
|
|
cxx_version="$cxx_version, ok"
|
|
|
|
cxx_verc_fail=no
|
2017-08-30 21:12:50 +00:00
|
|
|
else
|
2016-02-29 22:41:18 +00:00
|
|
|
cxx_version="$cxx_version, bad"
|
2017-10-12 00:19:31 +00:00
|
|
|
cxx_verc_fail=yes
|
2017-08-30 21:12:50 +00:00
|
|
|
fi
|
2019-03-03 15:40:07 +00:00
|
|
|
|
|
|
|
_make_def_CLANG_WARNINGS='CLANG_WARNINGS = 1'
|
2017-08-30 21:12:50 +00:00
|
|
|
else
|
2017-10-12 00:19:31 +00:00
|
|
|
# Need at least version 3.5
|
|
|
|
if [ $clang_major -ge 4 ] || [ $clang_major -eq 3 -a $clang_minor -ge 5 ]; then
|
|
|
|
cxx_version="$cxx_version, ok"
|
|
|
|
cxx_verc_fail=no
|
|
|
|
else
|
|
|
|
cxx_version="$cxx_version, bad"
|
|
|
|
cxx_verc_fail=yes
|
2017-08-30 21:12:50 +00:00
|
|
|
fi
|
2017-10-16 17:09:40 +00:00
|
|
|
|
|
|
|
# Only clang >= 5.0 supports extra warnings
|
|
|
|
if [ $clang_major -ge 5 ]; then
|
|
|
|
_make_def_CLANG_WARNINGS='CLANG_WARNINGS = 1'
|
|
|
|
fi
|
2017-08-30 21:12:50 +00:00
|
|
|
fi
|
2016-02-29 22:41:18 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS"
|
2019-03-03 15:40:07 +00:00
|
|
|
_make_def_HAVE_CLANG='HAVE_CLANG = 1'
|
2016-02-29 22:41:18 +00:00
|
|
|
add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP'
|
|
|
|
echo "$cxx_version"
|
|
|
|
|
|
|
|
elif test "$have_gcc" = yes; then
|
|
|
|
cxx_name=`( $cc -v ) 2>&1 | tail -n 1 | cut -d ' ' -f 1`
|
|
|
|
cxx_version=`( $CXX -dumpversion ) 2>&1`
|
|
|
|
if test "$?" -gt 0; then
|
|
|
|
cxx_version="not found"
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $cxx_version in
|
2017-04-17 21:22:04 +00:00
|
|
|
4.[7-9]|4.[7-9].[0-9]|4.[7-9].[0-9][-.]*|[5-9]|[5-9].[0-9]|[5-9].[0-9].[0-9]|[5-9].[0-9].[0-9][-.]*)
|
2016-02-29 22:41:18 +00:00
|
|
|
_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
|
|
|
|
_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
|
2012-01-06 22:38:09 +00:00
|
|
|
cxx_version="$cxx_version, ok"
|
|
|
|
cxx_verc_fail=no
|
|
|
|
;;
|
|
|
|
'not found')
|
|
|
|
cxx_verc_fail=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cxx_version="$cxx_version, bad"
|
|
|
|
cxx_verc_fail=yes
|
|
|
|
;;
|
|
|
|
esac
|
2016-02-29 22:41:18 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS"
|
|
|
|
add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP'
|
2012-01-06 22:38:09 +00:00
|
|
|
_make_def_HAVE_GCC='HAVE_GCC = 1'
|
|
|
|
echo "$cxx_version"
|
2016-02-29 22:41:18 +00:00
|
|
|
|
2012-01-06 22:38:09 +00:00
|
|
|
else
|
|
|
|
cxx_version=`( $CXX -version ) 2>&1`
|
|
|
|
if test "$?" -eq 0; then
|
|
|
|
cxx_version="`echo "${cxx_version}" | sed -ne 's/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/gp'`"
|
|
|
|
if test -z "${cxx_version}"; then
|
|
|
|
cxx_version="not found"
|
|
|
|
cxx_verc_fail=yes
|
|
|
|
fi
|
|
|
|
echo non-gcc compiler version ${cxx_version}
|
|
|
|
else
|
|
|
|
cxx_version="not found"
|
2005-06-28 18:56:49 +00:00
|
|
|
cxx_verc_fail=yes
|
2012-01-06 22:38:09 +00:00
|
|
|
echo found non-gcc compiler version ${cxx_version}
|
|
|
|
fi
|
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS"
|
|
|
|
case $_host_os in
|
|
|
|
irix*)
|
|
|
|
case $cxx_version in
|
|
|
|
7.4.4*)
|
|
|
|
# We just assume this is SGI MIPSpro
|
|
|
|
_cxx_major=7
|
|
|
|
_cxx_minor=4
|
|
|
|
cxx_verc_fail=no
|
|
|
|
add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MDupdate "$(*D)/$(DEPDIR)/$(*F).d"'
|
|
|
|
add_line_to_config_mk '-include Makedepend'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cxx_version="$cxx_version, bad"
|
|
|
|
cxx_verc_fail=yes
|
|
|
|
;;
|
|
|
|
esac
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
2012-01-06 22:38:09 +00:00
|
|
|
*)
|
|
|
|
cxx_version="$cxx_version, bad"
|
|
|
|
cxx_verc_fail=yes
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
2012-01-06 22:38:09 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
fi
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
if test "$cxx_verc_fail" = yes ; then
|
|
|
|
echo
|
|
|
|
echo "The version of your compiler is not supported at this time"
|
2017-10-12 00:19:31 +00:00
|
|
|
echo "Please ensure you are using GCC 5.0 / Clang 3.8 or above"
|
2017-01-15 16:58:41 +00:00
|
|
|
exit 1
|
2005-06-28 18:56:49 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Do CXXFLAGS now we know the compiler version
|
|
|
|
#
|
|
|
|
|
|
|
|
if test -n "$_host"; then
|
|
|
|
# Cross-compiling mode - add your target here if needed
|
|
|
|
case "$_host" in
|
2019-03-09 15:52:33 +00:00
|
|
|
retron77)
|
|
|
|
echo "Compiling for $_host, disabling windowed mode, debugger and cheats."
|
|
|
|
_build_windowed=no
|
|
|
|
_build_debugger=no
|
|
|
|
_build_cheats=no
|
|
|
|
;;
|
2008-03-09 14:17:03 +00:00
|
|
|
mingw32-cross)
|
2013-09-27 20:41:24 +00:00
|
|
|
echo "Cross-compiling for Windows using MinGW."
|
2008-03-09 14:17:03 +00:00
|
|
|
DEFINES="$DEFINES -DWIN32"
|
|
|
|
_host_os=win32
|
|
|
|
;;
|
2019-03-10 16:40:43 +00:00
|
|
|
*linux*)
|
|
|
|
echo "Cross-compiling to $_host target"
|
|
|
|
DEFINES="$DEFINES -DUNIX"
|
|
|
|
_host_os=unix
|
|
|
|
;;
|
2005-06-28 18:56:49 +00:00
|
|
|
*)
|
|
|
|
echo "Cross-compiling to unknown target, please add your target to configure."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2017-01-15 16:58:41 +00:00
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
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
|
2014-07-02 12:16:16 +00:00
|
|
|
linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos*)
|
2005-06-28 18:56:49 +00:00
|
|
|
DEFINES="$DEFINES -DUNIX"
|
|
|
|
_host_os=unix
|
|
|
|
;;
|
2017-08-30 21:12:50 +00:00
|
|
|
darwin*)
|
|
|
|
DEFINES="$DEFINES -DUNIX -DDARWIN"
|
|
|
|
_host_os=darwin
|
|
|
|
;;
|
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
|
|
|
|
;;
|
2019-03-09 15:52:33 +00:00
|
|
|
os2*)
|
|
|
|
DEFINES="$DEFINES -DUNIX -DOS2"
|
|
|
|
_host_os=unix
|
|
|
|
;;
|
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"
|
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
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
#
|
|
|
|
# Check for ZLib
|
|
|
|
#
|
2019-04-24 18:06:20 +00:00
|
|
|
echocheck "zlib"
|
|
|
|
if test "$_build_zip" = yes ; then
|
2005-06-28 18:56:49 +00:00
|
|
|
_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
|
2017-01-15 16:58:41 +00:00
|
|
|
|
|
|
|
if test "$_zlib" = yes ; then
|
|
|
|
echo "$_zlib"
|
|
|
|
else
|
2019-04-24 18:06:20 +00:00
|
|
|
echo "disabled"
|
|
|
|
_build_png=no
|
|
|
|
_build_zip=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "disabled"
|
|
|
|
_build_png=no
|
|
|
|
_build_zip=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check for libpng
|
|
|
|
#
|
|
|
|
echocheck "libpng"
|
|
|
|
if test "$_build_png" = yes ; 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 `pkg-config --libs libpng` && _libpng=yes
|
|
|
|
|
|
|
|
if test "$_libpng" = yes ; then
|
|
|
|
echo "$_libpng"
|
|
|
|
else
|
|
|
|
echo "disabled"
|
|
|
|
_build_png=no
|
2017-01-15 16:58:41 +00:00
|
|
|
fi
|
2019-04-24 18:06:20 +00:00
|
|
|
else
|
|
|
|
echo "disabled"
|
|
|
|
_build_png=no
|
2006-12-13 22:46:28 +00:00
|
|
|
fi
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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_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
|
|
|
|
|
2016-12-10 17:08:28 +00:00
|
|
|
if test "$_build_joystick" = yes ; then
|
2005-06-28 18:56:49 +00:00
|
|
|
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
|
|
|
|
|
2019-04-21 22:37:56 +00:00
|
|
|
if test "$_build_png" = yes ; then
|
|
|
|
echo_n " PNG image support enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " PNG image support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2019-04-24 18:06:20 +00:00
|
|
|
if test "$_build_zip" = yes ; then
|
|
|
|
echo_n " ZIP file support enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " ZIP file support disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2013-09-28 00:51:10 +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-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
|
2019-03-03 15:40:07 +00:00
|
|
|
|
|
|
|
_build_debug=yes
|
2006-02-01 13:53:25 +00:00
|
|
|
else
|
|
|
|
echo_n " Profiling disabled"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2019-03-03 15:40:07 +00:00
|
|
|
if test "$_build_debug" = yes ; then
|
|
|
|
echo_n " Debug symbols enabled"
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
echo_n " Debug symbols 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"
|
2016-12-10 17:08:28 +00:00
|
|
|
TIA="$SRC/emucore/tia"
|
2017-09-27 21:42:14 +00:00
|
|
|
TIA_FRAME_MANAGER="$SRC/emucore/tia/frame-manager"
|
2012-02-21 19:19:23 +00:00
|
|
|
TV="$SRC/common/tv_filters"
|
2005-06-28 18:56:49 +00:00
|
|
|
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
|
|
|
|
2017-09-27 21:42:14 +00:00
|
|
|
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI -I$TIA -I$TIA_FRAME_MANAGER"
|
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`"
|
2017-01-15 16:58:41 +00:00
|
|
|
LD=$CXX
|
2017-08-30 21:12:50 +00:00
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
case $_host_os in
|
2005-07-03 14:18:54 +00:00
|
|
|
unix)
|
2018-07-01 23:51:01 +00:00
|
|
|
DEFINES="$DEFINES -DBSPF_UNIX"
|
2005-06-28 18:56:49 +00:00
|
|
|
MODULES="$MODULES $SRC/unix"
|
|
|
|
INCLUDES="$INCLUDES -I$SRC/unix"
|
|
|
|
;;
|
2017-08-30 21:12:50 +00:00
|
|
|
darwin)
|
2018-12-19 15:16:09 +00:00
|
|
|
DEFINES="$DEFINES -DBSPF_UNIX -DMACOS_KEYS"
|
2017-08-30 21:12:50 +00:00
|
|
|
MODULES="$MODULES $SRC/unix"
|
|
|
|
INCLUDES="$INCLUDES -I$SRC/unix"
|
|
|
|
;;
|
2019-03-09 15:52:33 +00:00
|
|
|
retron77)
|
|
|
|
DEFINES="$DEFINES -DBSPF_UNIX -DRETRON77"
|
|
|
|
MODULES="$MODULES $SRC/unix $SRC/unix/r77"
|
|
|
|
INCLUDES="$INCLUDES -I$SRC/unix -I$SRC/unix/r77"
|
|
|
|
;;
|
2005-07-03 14:18:54 +00:00
|
|
|
win32)
|
2018-07-01 23:51:01 +00:00
|
|
|
DEFINES="$DEFINES -DBSPF_WINDOWS"
|
2013-09-27 20:41:24 +00:00
|
|
|
MODULES="$MODULES $SRC/windows"
|
|
|
|
INCLUDES="$INCLUDES -I$SRC/windows"
|
2005-10-22 20:33:57 +00:00
|
|
|
LIBS="$LIBS -lmingw32 -lwinmm"
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
|
|
|
*)
|
2013-09-27 20:59:23 +00:00
|
|
|
echo "WARNING: host system not currently supported"
|
2005-07-03 14:18:54 +00:00
|
|
|
exit
|
2005-06-28 18:56:49 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
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_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
|
|
|
|
2019-04-21 22:37:56 +00:00
|
|
|
if test "$_build_png" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DPNG_SUPPORT"
|
2019-04-24 18:06:20 +00:00
|
|
|
if test "$_libpng" = yes ; then
|
|
|
|
LIBS="$LIBS -lpng"
|
|
|
|
else
|
|
|
|
MODULES="$MODULES $LIBPNG"
|
|
|
|
INCLUDES="$INCLUDES -I$LIBPNG"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$_build_zip" = yes ; then
|
|
|
|
DEFINES="$DEFINES -DZIP_SUPPORT"
|
|
|
|
if test "$_zlib" = yes ; then
|
|
|
|
LIBS="$LIBS -lz"
|
|
|
|
else
|
|
|
|
MODULES="$MODULES $ZLIB"
|
|
|
|
INCLUDES="$INCLUDES -I$ZLIB"
|
|
|
|
fi
|
2019-04-21 22:37:56 +00:00
|
|
|
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
|
|
|
|
2019-03-03 15:40:07 +00:00
|
|
|
if test "$_build_debug" = no ; then
|
|
|
|
_build_debug=
|
|
|
|
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
|
|
|
|
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
|
2013-09-27 20:41:24 +00:00
|
|
|
WINDOWSPATH=$_windowspath
|
2008-03-09 15:30:27 +00:00
|
|
|
STRIP := $_strip
|
2019-03-03 15:40:07 +00:00
|
|
|
LLVM_PROFDATA := llvm-profdata
|
|
|
|
BINARY_LOADER :=
|
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
|
2019-03-03 15:40:07 +00:00
|
|
|
DEBUG := $_build_debug
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2012-01-06 22:38:09 +00:00
|
|
|
$_make_def_HAVE_GCC
|
2019-03-03 15:40:07 +00:00
|
|
|
$_make_def_HAVE_CLANG
|
2017-10-16 17:09:40 +00:00
|
|
|
$_make_def_CLANG_WARNINGS
|
2005-06-28 23:18:16 +00:00
|
|
|
|
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
|
2012-01-06 22:38:09 +00:00
|
|
|
$_config_mk_data
|
2005-06-28 18:56:49 +00:00
|
|
|
EOF
|
2005-06-28 23:18:16 +00:00
|
|
|
|
|
|
|
# This should be taken care of elsewhere, but I'm not sure where
|
2019-03-03 15:40:07 +00:00
|
|
|
rm -f stella-conf stella-conf.cxx
|
2017-08-30 21:12:50 +00:00
|
|
|
|
|
|
|
if test "$_host_os" = darwin; then
|
|
|
|
cat <<EOI
|
|
|
|
|
2019-03-03 15:40:07 +00:00
|
|
|
WARNING: plain UNIX-style builds on macOS without XCode are unsupported. Continue on your own risk...
|
2017-08-30 21:12:50 +00:00
|
|
|
EOI
|
2017-08-30 22:11:16 +00:00
|
|
|
fi
|