Added --enable-static option to ./configure script. Note that you

must have static versions of all the libraries (like libSDL.a, libz.a,
libpng.a), or else you'll end up with the dynamic version(s) of them... so
you'd have a stella binary that's almost-static.

Also, the only way I could get things to link properly was to include
-lz in the LIBS twice: once before and once after -lpng. Removing either
one causes the link to fail on my Linux box. This could cause issues
for other systems though, am not sure...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@671 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
urchlay 2005-07-18 16:10:52 +00:00
parent 6ae668f236
commit 0bc1dc961a
2 changed files with 31 additions and 3 deletions

23
stella/configure vendored
View File

@ -24,6 +24,7 @@ _build_sound=yes
_build_developer=yes _build_developer=yes
_build_snapshot=yes _build_snapshot=yes
_build_joystick=yes _build_joystick=yes
_build_static=no
# more defaults # more defaults
_ranlib=ranlib _ranlib=ranlib
@ -247,6 +248,7 @@ Optional Features:
--disable-developer disable all developer options (including debugger) --disable-developer disable all developer options (including debugger)
--disable-snapshot disable snapshot support --disable-snapshot disable snapshot support
--disable-joystick disable joystick support --disable-joystick disable joystick support
--enable-static build static binary (if possible)
Optional Libraries: Optional Libraries:
--with-zlib-prefix=DIR Prefix where zlib is installed (optional) --with-zlib-prefix=DIR Prefix where zlib is installed (optional)
@ -286,6 +288,8 @@ for ac_option in $@; do
--disable-png) _png=no ;; --disable-png) _png=no ;;
--enable-nasm) _nasm=yes ;; --enable-nasm) _nasm=yes ;;
--disable-nasm) _nasm=no ;; --disable-nasm) _nasm=no ;;
--enable-static) _build_static=yes ;;
--disable-static) _build_static=no ;;
--with-zlib-prefix=*) --with-zlib-prefix=*)
_prefix=`echo $ac_option | cut -d '=' -f 2` _prefix=`echo $ac_option | cut -d '=' -f 2`
ZLIB_CFLAGS="-I$_prefix/include" ZLIB_CFLAGS="-I$_prefix/include"
@ -632,6 +636,14 @@ else
echo echo
fi fi
if test "$_build_static" = yes ; then
echo_n " Static binary enabled"
echo
else
echo_n " Static binary disabled"
echo
fi
# #
# Now, add the appropriate defines/libraries/headers # Now, add the appropriate defines/libraries/headers
@ -649,7 +661,14 @@ YACC="$SRC/yacc"
INCLUDES="-I$CORE -I$CORE/m6502/src -I$CORE/m6502/src/bspf/src -I$COMMON -I$GUI" INCLUDES="-I$CORE -I$CORE/m6502/src -I$CORE/m6502/src/bspf/src -I$COMMON -I$GUI"
INCLUDES="$INCLUDES `$_sdlconfig --cflags`" INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
LIBS="$LIBS `$_sdlconfig --libs` -lz" if test "$_build_static" = yes ; then
_sdl_conf_libs="--static-libs"
LDFLAGS="-static $LDFLAGS"
else
_sdl_conf_libs="--libs"
fi
LIBS="$LIBS `$_sdlconfig $_sdl_conf_libs` -lz"
case $_host_os in case $_host_os in
unix) unix)
@ -692,7 +711,7 @@ fi
if test "$_build_snapshot" = yes ; then if test "$_build_snapshot" = yes ; then
DEFINES="$DEFINES -DSNAPSHOT_SUPPORT" DEFINES="$DEFINES -DSNAPSHOT_SUPPORT"
LIBS="$LIBS -lpng" LIBS="$LIBS -lpng -lz" # FIXME: -lz included twice
fi fi
if test "$_build_joystick" = yes ; then if test "$_build_joystick" = yes ; then

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: TIADebug.hxx,v 1.9 2005-07-15 18:19:29 stephena Exp $ // $Id: TIADebug.hxx,v 1.10 2005-07-18 16:10:52 urchlay Exp $
//============================================================================ //============================================================================
#ifndef TIA_DEBUG_HXX #ifndef TIA_DEBUG_HXX
@ -25,6 +25,15 @@ class Debugger;
#include "Array.hxx" #include "Array.hxx"
#include "DebuggerSystem.hxx" #include "DebuggerSystem.hxx"
/*
// pointer types for TIADebug instance methods
// (used by IntMethodExpression)
typedef int (TiaDebug::*TIADEBUG_INT_METHOD)();
// call the pointed-to method on the (global) CPU debugger object.
#define CALL_TIADEBUG_METHOD(method) ( ( Debugger::debugger().tiaDebug().*method)() )
*/
class TiaState : public DebuggerState class TiaState : public DebuggerState
{ {
public: public: