Removed global header from DOS/Windows port

This commit is contained in:
pagefault
2001-07-23 03:24:33 +00:00
parent b6b4169e16
commit 5022a2e8bb
11 changed files with 456 additions and 156 deletions

View File

@@ -59,21 +59,29 @@ MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${WINDOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${ZIPOBJ} ${MAINOBJ} OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${WINDOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${ZIPOBJ} ${MAINOBJ}
CFLAGS=@CFLAGS@
ASM=@NASMPATH@
ASMFLAGS=@NASMD@
LIBS=@LIBS@
CC=@CC@
INSTALL=@INSTALL@
prefix=@prefix@
.SUFFIXES: .c .cpp .asm .SUFFIXES: .c .cpp .asm
%.o: %.c %.o: %.c
@CC@ @CFLAGS@ -o $@ -c $< ${CC} ${CFLAGS} -o $@ -c $<
%.o: %.cpp %.o: %.cpp
@CPP@ @CFLAGS@ -o $@ -c $< ${PP} ${CFLAGS} -o $@ -c $<
%.o: %.asm %.o: %.asm
@NASMPATH@ @NFLAGS@ -o $@ $< ${ASM} ${ASMFLAGS} -o $@ $<
ALL: @ZSNESEXE@ ALL: @ZSNESEXE@
@ZSNESEXE@: ${OBJS} @ZSNESEXE@: ${OBJS}
@CC@ -o @ZSNESEXE@ ${OBJS} @CFLAGS@ @LDFLAGS@ ${CC} -o @ZSNESEXE@ ${OBJS} ${LIBS}
${ZIPDIR}/zpng.o: ${ZIPDIR}/zpng.c ${ZIPDIR}/zpng.h ${ZIPDIR}/zpng.o: ${ZIPDIR}/zpng.c ${ZIPDIR}/zpng.h
${ZIPDIR}/unzip.o: ${ZIPDIR}/unzip.c ${ZIPDIR}/unzip.h ${ZIPDIR}/unzip.o: ${ZIPDIR}/unzip.c ${ZIPDIR}/unzip.h
@@ -171,8 +179,8 @@ endmem.o: endmem.asm macros.mac
${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac ${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac
install: install:
@INSTALL@ -m 0755 @ZSNESEXE@ @prefix@/bin @INSTALL@ -m 0755 @ZSNESEXE@ ${prefix}/bin
@INSTALL@ -m 0644 linux/zsnes.man @prefix@/man @INSTALL@ -m 0644 linux/zsnes.man ${prefix}/man
clean: clean:
rm -f ${CHIPDIR}/*.o ${CPUDIR}/*.o ${VIDEODIR}/*.o ${GUIDIR}/*.o ${DOSDIR}/*.o ${WINDIR}/*.o ${ZIPDIR}/*.o *.o @ZSNESEXE@ rm -f ${CHIPDIR}/*.o ${CPUDIR}/*.o ${VIDEODIR}/*.o ${GUIDIR}/*.o ${DOSDIR}/*.o ${WINDIR}/*.o ${ZIPDIR}/*.o *.o @ZSNESEXE@

View File

@@ -15,7 +15,7 @@
//along with this program; if not, write to the Free Software //along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "../gblhdr.h" #include <gblhdr.h>
//#define DebugDSP1 //#define DebugDSP1

477
zsnes/src/configure vendored
View File

@@ -25,6 +25,14 @@ ac_help="$ac_help
--without-png Build without PNG screenshot support " --without-png Build without PNG screenshot support "
ac_help="$ac_help ac_help="$ac_help
--enable-debug Build GDB Friendly binary (zsnes-debug) " --enable-debug Build GDB Friendly binary (zsnes-debug) "
ac_help="$ac_help
--enable-force-386 Force 386 Optimization"
ac_help="$ac_help
--enable-force-486 Force 486 Optimization"
ac_help="$ac_help
--enable-force-586 Force Pentium Optimization"
ac_help="$ac_help
--enable-force-686 Force PPro/P2 Optimization"
# Initialize some variables set by options. # Initialize some variables set by options.
# The variables have the same names as the options, with # The variables have the same names as the options, with
@@ -536,11 +544,11 @@ fi
echo -- Where is our compiler, and who are we compiling for? echo -- Where is our compiler, and who are we compiling for?
CFLAGS="-pipe -I." CFLAGS="-pipe"
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:544: checking for $ac_word" >&5 echo "configure:552: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -570,7 +578,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:574: checking for $ac_word" >&5 echo "configure:582: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -621,7 +629,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:625: checking for $ac_word" >&5 echo "configure:633: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -653,7 +661,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:657: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -664,12 +672,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 668 "configure" #line 676 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
@@ -695,12 +703,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:707: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:704: checking whether we are using GNU C" >&5 echo "configure:712: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -709,7 +717,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
@@ -728,7 +736,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:732: checking whether ${CC-cc} accepts -g" >&5 echo "configure:740: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -762,7 +770,7 @@ fi
# Extract the first word of "nasm", so it can be a program name with args. # Extract the first word of "nasm", so it can be a program name with args.
set dummy nasm; ac_word=$2 set dummy nasm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:766: checking for $ac_word" >&5 echo "configure:774: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NASMPATH'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_NASMPATH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -795,7 +803,7 @@ else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
fi fi
NFLAGS="$NFLAGS -w-orphan-labels" NASMD="$NASMD -w-orphan-labels"
ac_aux_dir= ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then if test -f $ac_dir/install-sh; then
@@ -827,7 +835,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:831: checking for a BSD compatible install" >&5 echo "configure:839: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@@ -907,7 +915,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi fi
echo $ac_n "checking host system type""... $ac_c" 1>&6 echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:911: checking host system type" >&5 echo "configure:919: checking host system type" >&5
host_alias=$host host_alias=$host
case "$host_alias" in case "$host_alias" in
@@ -928,7 +936,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6 echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:932: checking target system type" >&5 echo "configure:940: checking target system type" >&5
target_alias=$target target_alias=$target
case "$target_alias" in case "$target_alias" in
@@ -946,7 +954,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6 echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:950: checking build system type" >&5 echo "configure:958: checking build system type" >&5
build_alias=$build build_alias=$build
case "$build_alias" in case "$build_alias" in
@@ -969,21 +977,16 @@ test "$host_alias" != "$target_alias" &&
program_prefix=${target_alias}- program_prefix=${target_alias}-
case "$target" in case "$target" in
*-*-linux*) *-*-linux* | *-*-*bsd*)
CFLAGS="$CFLAGS -D__LINUX__" CFLAGS="$CFLAGS -D__LINUX__"
NFLAGS="$NFLAGS -D__LINUX__ -f elf" NASMD="$NASMD -D__LINUX__ -f elf"
;;
*-*-*bsd*)
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -f elf"
;; ;;
*-*-cygwin* | *-*-*ming*) *-*-cygwin* | *-*-*ming*)
CFLAGS="$CFLAGS -D__LINUX__" CFLAGS="$CFLAGS -D__LINUX__"
NFLAGS="$NFLAGS -D__LINUX__ -f win32" NASMD="$NASMD -D__LINUX__ -f win32"
ZSNESEXE=".exe" ZSNESEXE=".exe"
;; ;;
*) *)
{ echo "configure: error: This Target is Not Supported" 1>&2; exit 1; }
;; ;;
esac esac
@@ -991,7 +994,7 @@ esac
echo -- Do we have X, and where is it? Needed for Mesa Checking echo -- Do we have X, and where is it? Needed for Mesa Checking
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:995: checking how to run the C preprocessor" >&5 echo "configure:998: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@@ -1006,13 +1009,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1010 "configure" #line 1013 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@@ -1023,13 +1026,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1027 "configure" #line 1030 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@@ -1040,13 +1043,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1044 "configure" #line 1047 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@@ -1075,7 +1078,7 @@ echo "$ac_t""$CPP" 1>&6
# Uses ac_ vars as temps to allow command line to override cache and checks. # Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache. # --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6 echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:1079: checking for X" >&5 echo "configure:1082: checking for X" >&5
# Check whether --with-x or --without-x was given. # Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then if test "${with_x+set}" = set; then
@@ -1137,12 +1140,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified. # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1141 "configure" #line 1144 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$x_direct_test_include> #include <$x_direct_test_include>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@@ -1211,14 +1214,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS" LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1215 "configure" #line 1218 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
${x_direct_test_function}() ${x_direct_test_function}()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
# We can link X programs with no special library path. # We can link X programs with no special library path.
@@ -1305,7 +1308,7 @@ else
fi fi
CFLAGS="$CFLAGS -I$x_includes" CFLAGS="$CFLAGS -I$x_includes"
LDFLAGS="$LDFLAGS -L$x_libraries" LIBS="$LIBS -L$x_libraries"
echo -- Where is libSDL and zlib, and do we want/have libPNG and OpenGL support? echo -- Where is libSDL and zlib, and do we want/have libPNG and OpenGL support?
@@ -1351,7 +1354,7 @@ fi
# Extract the first word of "sdl-config", so it can be a program name with args. # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2 set dummy sdl-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1355: checking for $ac_word" >&5 echo "configure:1358: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@@ -1386,7 +1389,7 @@ fi
min_sdl_version=1.2.0 min_sdl_version=1.2.0
echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6 echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6
echo "configure:1390: checking for SDL - version >= $min_sdl_version" >&5 echo "configure:1393: checking for SDL - version >= $min_sdl_version" >&5
no_sdl="" no_sdl=""
if test "$SDL_CONFIG" = "no" ; then if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes no_sdl=yes
@@ -1410,7 +1413,7 @@ echo "configure:1390: checking for SDL - version >= $min_sdl_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c" echo $ac_n "cross compiling; assumed OK... $ac_c"
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1414 "configure" #line 1417 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
@@ -1471,7 +1474,7 @@ int main (int argc, char *argv[])
EOF EOF
if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@@ -1505,7 +1508,7 @@ fi
CFLAGS="$CFLAGS $SDL_CFLAGS" CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS" LIBS="$LIBS $SDL_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1509 "configure" #line 1512 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
@@ -1520,7 +1523,7 @@ int main() {
return 0; return 0;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means" echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** that the run-time linker is not finding SDL or finding the wrong"
@@ -1554,13 +1557,13 @@ rm -f conftest*
rm -f conf.sdltest rm -f conf.sdltest
CFLAGS="$CFLAGS $SDL_CFLAGS" CFLAGS="$CFLAGS $SDL_CFLAGS"
LDFLAGS="$LDFLAGS $SDL_LIBS" LIBS="$LIBS $SDL_LIBS"
echo $ac_n "checking for zlib""... $ac_c" 1>&6 echo $ac_n "checking for zlib""... $ac_c" 1>&6
echo "configure:1561: checking for zlib" >&5 echo "configure:1564: checking for zlib" >&5
with_zlib=no with_zlib=no
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1564 "configure" #line 1567 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <zlib.h> #include <zlib.h>
@@ -1571,7 +1574,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
with_zlib=yes with_zlib=yes
@@ -1583,7 +1586,7 @@ fi
rm -f conftest* rm -f conftest*
if test x$with_zlib = xyes; then if test x$with_zlib = xyes; then
LDFLAGS="$LDFLAGS -lz" LIBS="$LIBS -lz"
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
@@ -1597,11 +1600,11 @@ if test "${with_opengl+set}" = set; then
fi fi
echo $ac_n "checking for OpenGL support""... $ac_c" 1>&6 echo $ac_n "checking for OpenGL support""... $ac_c" 1>&6
echo "configure:1601: checking for OpenGL support" >&5 echo "configure:1604: checking for OpenGL support" >&5
if test x$with_opengl != xno; then if test x$with_opengl != xno; then
with_opengl=no with_opengl=no
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1605 "configure" #line 1608 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <GL/gl.h> #include <GL/gl.h>
@@ -1612,7 +1615,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
with_opengl=yes with_opengl=yes
@@ -1624,9 +1627,9 @@ fi
rm -f conftest* rm -f conftest*
echo "$ac_t""$with_opengl" 1>&6 echo "$ac_t""$with_opengl" 1>&6
if test x$with_opengl = xyes; then if test x$with_opengl = xyes; then
LDFLAGS="$LDFLAGS -lGL" LIBS="$LIBS -lGL"
CFLAGS="$CFLAGS -D__OPENGL__" CFLAGS="$CFLAGS -D__OPENGL__"
NFLAGS="$NFLAGS -D__OPENGL__" NASMD="$NASMD -D__OPENGL__"
GL_DRAW="\${WINDIR}/gl_draw.o" GL_DRAW="\${WINDIR}/gl_draw.o"
fi fi
else else
@@ -1640,11 +1643,11 @@ if test "${enable_png+set}" = set; then
fi fi
echo $ac_n "checking for libPNG support""... $ac_c" 1>&6 echo $ac_n "checking for libPNG support""... $ac_c" 1>&6
echo "configure:1644: checking for libPNG support" >&5 echo "configure:1647: checking for libPNG support" >&5
if test x$with_png != xno; then if test x$with_png != xno; then
with_png=no with_png=no
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1648 "configure" #line 1651 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <png.h> #include <png.h>
@@ -1655,7 +1658,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
with_png=yes with_png=yes
@@ -1667,7 +1670,7 @@ fi
rm -f conftest* rm -f conftest*
echo "$ac_t""$with_png" 1>&6 echo "$ac_t""$with_png" 1>&6
if test x$with_png = xyes; then if test x$with_png = xyes; then
LDFLAGS="$LDFLAGS -lpng" LIBS="$LIBS -lpng"
fi fi
else else
echo "$ac_t""disabled by user" 1>&6 echo "$ac_t""disabled by user" 1>&6
@@ -1681,44 +1684,88 @@ if test "${enable_debug+set}" = set; then
fi fi
echo $ac_n "checking if you want gdb friendly executable""... $ac_c" 1>&6 echo $ac_n "checking if you want gdb friendly executable""... $ac_c" 1>&6
echo "configure:1685: checking if you want gdb friendly executable" >&5 echo "configure:1688: checking if you want gdb friendly executable" >&5
if test x$debug = xyes; then if test x$debug = xyes; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3" CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3"
NFLAGS="$NFLAGS -g -s" NASMD="$NASMD -g -s"
ZSNESEXE="zsnes-debug$ZSNESEXE" ZSNESEXE="zsnes-debug$ZSNESEXE"
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s" CFLAGS="$CFLAGS -s -Os -ffast-math -fomit-frame-pointer -fschedule-insns2"
ZSNESEXE="zsnes$ZSNESEXE" ZSNESEXE="zsnes$ZSNESEXE"
fi fi
# Check whether --enable-force-386 or --disable-force-386 was given.
if test "${enable_force_386+set}" = set; then
enableval="$enable_force_386"
wantforce=386
fi
# Check whether --enable-force-486 or --disable-force-486 was given.
if test "${enable_force_486+set}" = set; then
enableval="$enable_force_486"
wantforce=486
fi
# Check whether --enable-force-586 or --disable-force-586 was given.
if test "${enable_force_586+set}" = set; then
enableval="$enable_force_586"
wantforce=586
fi
# Check whether --enable-force-686 or --disable-force-686 was given.
if test "${enable_force_686+set}" = set; then
enableval="$enable_force_686"
wantforce=668
fi
echo $ac_n "checking which processor class to optimize for""... $ac_c" 1>&6 echo $ac_n "checking which processor class to optimize for""... $ac_c" 1>&6
echo "configure:1702: checking which processor class to optimize for" >&5 echo "configure:1730: checking which processor class to optimize for" >&5
if test x$debug != xyes; then if test x$debug != xyes; then
case "$wantforce" in
386)
echo "$ac_t""forced to 386" 1>&6
CFLAGS="$CFLAGS -march=i386"
;;
486)
echo "$ac_t""forced to 486" 1>&6
CFLAGS="$CFLAGS -march=i486"
;;
586)
echo "$ac_t""forced to Pentium" 1>&6
CFLAGS="$CFLAGS -march=pentium"
;;
686)
echo "$ac_t""forced to PPro/P2" 1>&6
CFLAGS="$CFLAGS -march=pentiumpro"
;;
*)
case "$target" in case "$target" in
i486-*-*) i486-*-*)
CFLAGS="$CFLAGS -march=i486" CFLAGS="$CFLAGS -march=i486"
echo "$ac_t""486" 1>&6 echo "$ac_t""detected 486" 1>&6
;; ;;
i586-*-*) i586-*-*)
CFLAGS="$CFLAGS -march=pentium" CFLAGS="$CFLAGS -march=pentium"
echo "$ac_t""Pentium" 1>&6 echo "$ac_t""detected Pentium" 1>&6
;; ;;
i686-*-*) i686-*-*)
CFLAGS="$CFLAGS -march=pentiumpro" CFLAGS="$CFLAGS -march=pentiumpro"
echo "$ac_t""PPro/P2" 1>&6 echo "$ac_t""detected PPro/P2" 1>&6
;; ;;
*) *)
echo "$ac_t""386" 1>&6 echo "$ac_t""detected 386" 1>&6
echo "configure: warning: *** This is probably not what you want use --target" 1>&2 echo "configure: warning: *** This is probably not what you want use --enable-force-486/586/686" 1>&2
;; ;;
esac esac
;;
esac
else else
echo "$ac_t""no optimization because debug enabled" 1>&6 echo "$ac_t""no optimization because debug enabled" 1>&6
fi fi
@@ -1728,12 +1775,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:1732: checking for $ac_hdr that defines DIR" >&5 echo "configure:1779: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1737 "configure" #line 1784 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <$ac_hdr> #include <$ac_hdr>
@@ -1741,7 +1788,7 @@ int main() {
DIR *dirp = 0; DIR *dirp = 0;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes" eval "ac_cv_header_dirent_$ac_safe=yes"
else else
@@ -1766,7 +1813,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:1770: checking for opendir in -ldir" >&5 echo "configure:1817: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@@ -1774,7 +1821,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS" LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1778 "configure" #line 1825 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@@ -1785,7 +1832,7 @@ int main() {
opendir() opendir()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@@ -1807,7 +1854,7 @@ fi
else else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:1811: checking for opendir in -lx" >&5 echo "configure:1858: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@@ -1815,7 +1862,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS" LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1819 "configure" #line 1866 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@@ -1826,7 +1873,7 @@ int main() {
opendir() opendir()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@@ -1849,12 +1896,12 @@ fi
fi fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1853: checking for ANSI C header files" >&5 echo "configure:1900: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1858 "configure" #line 1905 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
@@ -1862,7 +1909,7 @@ else
#include <float.h> #include <float.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@@ -1879,7 +1926,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1883 "configure" #line 1930 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
@@ -1897,7 +1944,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1901 "configure" #line 1948 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
@@ -1918,7 +1965,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1922 "configure" #line 1969 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1929,7 +1976,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@@ -1952,21 +1999,21 @@ EOF
fi fi
for ac_hdr in fcntl.h limits.h malloc.h sys/ioctl.h unistd.h for ac_hdr in fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1960: checking for $ac_hdr" >&5 echo "configure:2007: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1965 "configure" #line 2012 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@@ -1994,12 +2041,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1998: checking for working const" >&5 echo "configure:2045: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2003 "configure" #line 2050 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
@@ -2048,7 +2095,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
@@ -2069,12 +2116,12 @@ EOF
fi fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:2073: checking for size_t" >&5 echo "configure:2120: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2078 "configure" #line 2125 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
@@ -2102,12 +2149,12 @@ EOF
fi fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:2106: checking whether time.h and sys/time.h may both be included" >&5 echo "configure:2153: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2111 "configure" #line 2158 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
@@ -2116,7 +2163,7 @@ int main() {
struct tm *tp; struct tm *tp;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_time=yes ac_cv_header_time=yes
else else
@@ -2136,39 +2183,239 @@ EOF
fi fi
for ac_hdr in sys/time.h echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
do echo "configure:2188: checking whether struct tm is in sys/time.h or time.h" >&5
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2144: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2149 "configure" #line 2193 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <sys/types.h>
#include <time.h>
int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" if { (eval echo configure:2201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
{ (eval echo configure:2154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes" ac_cv_struct_tm=time.h
else else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest* rm -rf conftest*
eval "ac_cv_header_$ac_safe=no" ac_cv_struct_tm=sys/time.h
fi fi
rm -f conftest* rm -f conftest*
fi fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""$ac_cv_struct_tm" 1>&6
if test $ac_cv_struct_tm = sys/time.h; then
cat >> confdefs.h <<\EOF
#define TM_IN_SYS_TIME 1
EOF
fi
echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
echo "configure:2223: checking whether utime accepts a null argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata; > conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
if test "$cross_compiling" = yes; then
ac_cv_func_utime_null=no
else
cat > conftest.$ac_ext <<EOF
#line 2233 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
main() {
struct stat s, t;
exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
&& t.st_mtime - s.st_mtime < 120));
}
EOF
if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_utime_null=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_func_utime_null=no
fi
rm -fr conftest*
fi
rm -f core core.* *.core
fi
echo "$ac_t""$ac_cv_func_utime_null" 1>&6
if test $ac_cv_func_utime_null = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_UTIME_NULL 1
EOF
fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:2268: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2273 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char vprintf();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif
; return 0; }
EOF
if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF
else
echo "$ac_t""no" 1>&6
fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:2320: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2325 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char _doprnt();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif
; return 0; }
EOF
if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF
else
echo "$ac_t""no" 1>&6
fi
fi
for ac_func in getcwd gethostname mkdir mktime rmdir select socket
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2375: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2380 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1 #define $ac_tr_func 1
EOF EOF
else else
@@ -2349,9 +2596,9 @@ s%@CPP@%$CPP%g
s%@SDL_CONFIG@%$SDL_CONFIG%g s%@SDL_CONFIG@%$SDL_CONFIG%g
s%@SDL_CFLAGS@%$SDL_CFLAGS%g s%@SDL_CFLAGS@%$SDL_CFLAGS%g
s%@SDL_LIBS@%$SDL_LIBS%g s%@SDL_LIBS@%$SDL_LIBS%g
s%@NASMD@%$NASMD%g
s%@ZSNESEXE@%$ZSNESEXE%g s%@ZSNESEXE@%$ZSNESEXE%g
s%@GL_DRAW@%$GL_DRAW%g s%@GL_DRAW@%$GL_DRAW%g
s%@NFLAGS@%$NFLAGS%g
CEOF CEOF
EOF EOF

View File

@@ -15,28 +15,23 @@ dnl See also: remarks supplied in the debug checking area below
AC_INIT(init.asm) AC_INIT(init.asm)
echo -- Where is our compiler, and who are we compiling for? echo -- Where is our compiler, and who are we compiling for?
CFLAGS="-pipe -I." CFLAGS="-pipe"
AC_PROG_CC AC_PROG_CC
AC_PATH_PROG(NASMPATH,nasm,[AC_MSG_ERROR(nasm 0.98 is required)]) AC_PATH_PROG(NASMPATH,nasm,[AC_MSG_ERROR(nasm 0.98 is required)])
NFLAGS="$NFLAGS -w-orphan-labels" NASMD="$NASMD -w-orphan-labels"
AC_PROG_INSTALL AC_PROG_INSTALL
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
case "$target" in case "$target" in
*-*-linux*) *-*-linux* | *-*-*bsd*)
CFLAGS="$CFLAGS -D__LINUX__" CFLAGS="$CFLAGS -D__LINUX__"
NFLAGS="$NFLAGS -D__LINUX__ -f elf" NASMD="$NASMD -D__LINUX__ -f elf"
;;
*-*-*bsd*)
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -f elf"
;; ;;
*-*-cygwin* | *-*-*ming*) *-*-cygwin* | *-*-*ming*)
CFLAGS="$CFLAGS -D__LINUX__" CFLAGS="$CFLAGS -D__LINUX__"
NFLAGS="$NFLAGS -D__LINUX__ -f win32" NASMD="$NASMD -D__LINUX__ -f win32"
ZSNESEXE=".exe" ZSNESEXE=".exe"
;; ;;
*) *)
AC_MSG_ERROR(This Target is Not Supported)
;; ;;
esac esac
@@ -46,7 +41,7 @@ echo -- Do we have X, and where is it? Needed for Mesa Checking
AC_PATH_X AC_PATH_X
CFLAGS="$CFLAGS -I$x_includes" CFLAGS="$CFLAGS -I$x_includes"
LDFLAGS="$LDFLAGS -L$x_libraries" LIBS="$LIBS -L$x_libraries"
dnl Checks for libraries. dnl Checks for libraries.
@@ -54,7 +49,7 @@ echo -- Where is libSDL and zlib, and do we want/have libPNG and OpenGL support?
AM_PATH_SDL(1.2.0,,[AC_MSG_ERROR(SDL >= 1.2.0 is required)]) AM_PATH_SDL(1.2.0,,[AC_MSG_ERROR(SDL >= 1.2.0 is required)])
CFLAGS="$CFLAGS $SDL_CFLAGS" CFLAGS="$CFLAGS $SDL_CFLAGS"
LDFLAGS="$LDFLAGS $SDL_LIBS" LIBS="$LIBS $SDL_LIBS"
AC_MSG_CHECKING(for zlib) AC_MSG_CHECKING(for zlib)
with_zlib=no with_zlib=no
@@ -67,7 +62,7 @@ with_zlib=yes
]) ])
if test x$with_zlib = xyes; then if test x$with_zlib = xyes; then
LDFLAGS="$LDFLAGS -lz" LIBS="$LIBS -lz"
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
@@ -87,9 +82,9 @@ if test x$with_opengl != xno; then
]) ])
AC_MSG_RESULT($with_opengl) AC_MSG_RESULT($with_opengl)
if test x$with_opengl = xyes; then if test x$with_opengl = xyes; then
LDFLAGS="$LDFLAGS -lGL" LIBS="$LIBS -lGL"
CFLAGS="$CFLAGS -D__OPENGL__" CFLAGS="$CFLAGS -D__OPENGL__"
NFLAGS="$NFLAGS -D__OPENGL__" NASMD="$NASMD -D__OPENGL__"
GL_DRAW="\${WINDIR}/gl_draw.o" GL_DRAW="\${WINDIR}/gl_draw.o"
fi fi
else else
@@ -109,7 +104,7 @@ if test x$with_png != xno; then
]) ])
AC_MSG_RESULT($with_png) AC_MSG_RESULT($with_png)
if test x$with_png = xyes; then if test x$with_png = xyes; then
LDFLAGS="$LDFLAGS -lpng" LIBS="$LIBS -lpng"
fi fi
else else
AC_MSG_RESULT(disabled by user) AC_MSG_RESULT(disabled by user)
@@ -125,7 +120,7 @@ if test x$debug = xyes; then
dnl enabled. dnl enabled.
CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3" CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3"
NFLAGS="$NFLAGS -g -s" NASMD="$NASMD -g -s"
ZSNESEXE="zsnes-debug$ZSNESEXE" ZSNESEXE="zsnes-debug$ZSNESEXE"
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
@@ -135,31 +130,55 @@ else
dnl zsnes more easily deal with small instruction caches, and more dnl zsnes more easily deal with small instruction caches, and more
dnl effectivly use branch prediction. dnl effectivly use branch prediction.
CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s" CFLAGS="$CFLAGS -s -Os -ffast-math -fomit-frame-pointer -fschedule-insns2"
ZSNESEXE="zsnes$ZSNESEXE" ZSNESEXE="zsnes$ZSNESEXE"
fi fi
AC_ARG_ENABLE(force-386,[ --enable-force-386 Force 386 Optimization],wantforce=386)
AC_ARG_ENABLE(force-486,[ --enable-force-486 Force 486 Optimization],wantforce=486)
AC_ARG_ENABLE(force-586,[ --enable-force-586 Force Pentium Optimization],wantforce=586)
AC_ARG_ENABLE(force-686,[ --enable-force-686 Force PPro/P2 Optimization],wantforce=668)
AC_MSG_CHECKING(which processor class to optimize for) AC_MSG_CHECKING(which processor class to optimize for)
if test x$debug != xyes; then if test x$debug != xyes; then
case "$wantforce" in
386)
AC_MSG_RESULT(forced to 386)
CFLAGS="$CFLAGS -march=i386"
;;
486)
AC_MSG_RESULT(forced to 486)
CFLAGS="$CFLAGS -march=i486"
;;
586)
AC_MSG_RESULT(forced to Pentium)
CFLAGS="$CFLAGS -march=pentium"
;;
686)
AC_MSG_RESULT(forced to PPro/P2)
CFLAGS="$CFLAGS -march=pentiumpro"
;;
*)
case "$target" in case "$target" in
i486-*-*) i486-*-*)
CFLAGS="$CFLAGS -march=i486" CFLAGS="$CFLAGS -march=i486"
AC_MSG_RESULT(486) AC_MSG_RESULT(detected 486)
;; ;;
i586-*-*) i586-*-*)
CFLAGS="$CFLAGS -march=pentium" CFLAGS="$CFLAGS -march=pentium"
AC_MSG_RESULT(Pentium) AC_MSG_RESULT(detected Pentium)
;; ;;
i686-*-*) i686-*-*)
CFLAGS="$CFLAGS -march=pentiumpro" CFLAGS="$CFLAGS -march=pentiumpro"
AC_MSG_RESULT(PPro/P2) AC_MSG_RESULT(detected PPro/P2)
;; ;;
*) *)
AC_MSG_RESULT(386) AC_MSG_RESULT(detected 386)
AC_MSG_WARN(*** This is probably not what you want use --target) AC_MSG_WARN(*** This is probably not what you want use --enable-force-486/586/686)
;; ;;
esac esac
;;
esac
else else
AC_MSG_RESULT(no optimization because debug enabled) AC_MSG_RESULT(no optimization because debug enabled)
fi fi
@@ -167,18 +186,22 @@ fi
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h unistd.h) AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_HEADER_TIME AC_HEADER_TIME
AC_CHECK_HEADERS(sys/time.h) AC_STRUCT_TM
dnl Checks for library functions. dnl Checks for library functions.
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(getcwd gethostname mkdir mktime rmdir select socket)
AC_SUBST(LIBS)
AC_SUBST(NASMD)
AC_SUBST(ZSNESEXE) AC_SUBST(ZSNESEXE)
AC_SUBST(GL_DRAW) AC_SUBST(GL_DRAW)
AC_SUBST(NFLAGS)
AC_OUTPUT(Makefile) AC_OUTPUT(Makefile)
echo echo
echo You may now type gmake to compile $ZSNESEXE echo You may now type gmake to compile $ZSNESEXE

View File

@@ -16,8 +16,13 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <stdio.h>
#include <time.h>
#include <zlib.h>
#ifdef ZDOS
#include <dos.h>
#endif
#include "gblhdr.h"
#define DWORD unsigned int #define DWORD unsigned int
#define BYTE unsigned char #define BYTE unsigned char

View File

@@ -16,7 +16,8 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "gblhdr.h" #include <stdio.h>
#include <ctype.h>
extern void zstart(void); extern void zstart(void);
extern void DosExit(void); extern void DosExit(void);

View File

@@ -59,7 +59,7 @@ MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o
OBJS=${CHIPSOBJ} ${CPUOBJ} ${DOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ} ${ZIPOBJ} OBJS=${CHIPSOBJ} ${CPUOBJ} ${DOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ} ${ZIPOBJ}
LIBS=-lz -lgcc -lm -lpng LIBS=-lz -lgcc -lm -lpng
CFLAGS=-D__MSDOS__ -I. -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s CFLAGS=-D__MSDOS__ -O2
ASM=nasm ASM=nasm
ASMFLAGS=-f coff -D__MSDOS__ ASMFLAGS=-f coff -D__MSDOS__
CC=gcc CC=gcc

View File

@@ -15,7 +15,13 @@
//along with this program; if not, write to the Free Software //along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "gblhdr.h"
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <memory.h>
#include "fixsin.h" #include "fixsin.h"
extern char *vidbuffer; extern char *vidbuffer;

View File

@@ -16,7 +16,7 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "../gblhdr.h" #include <windows.h>
void ipx_init(){}; void ipx_init(){};
void sendpacket(){}; void sendpacket(){};

View File

@@ -16,7 +16,14 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "../gblhdr.h" #include <windows.h>
#include <stdio.h>
#include <ctype.h>
#include <direct.h>
#include <winuser.h>
#include <dinput.h>
#include <dsound.h>
extern void ImportDirectX(void); extern void ImportDirectX(void);

View File

@@ -80,7 +80,10 @@
// only be done if the requested packet is within the past 64 packets. // only be done if the requested packet is within the past 64 packets.
// In-game chat will be moved to a separate packet in TCP/IP // In-game chat will be moved to a separate packet in TCP/IP
#include "../gblhdr.h" #include <stdio.h>
#include <time.h>
#include <windows.h>
#include <winsock.h>
int RecvPtr; int RecvPtr;
int RecvPtr2; int RecvPtr2;