*** empty log message ***

This commit is contained in:
diablo-d3
2001-07-23 02:05:46 +00:00
parent e4f05aac39
commit e14ab41cea
25 changed files with 377 additions and 542 deletions

View File

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

View File

@@ -15,12 +15,8 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <gblhdr.h>
#include <stdio.h>
#include <stdarg.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
//#define DebugDSP1
// uncomment some lines to test

475
zsnes/src/configure vendored
View File

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

View File

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

View File

@@ -16,13 +16,8 @@
//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 BYTE unsigned char

View File

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

138
zsnes/src/gblhdr.h Normal file
View File

@@ -0,0 +1,138 @@
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later
//version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
/*************************************\
* Global Definitions and Headers File *
\*************************************/
// Standard stuff
#include <math.h>
#include <ctype.h>
#include "fcntl.h"
#include <string.h>
#include <errno.h>
// General time.h checking
#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
# if HAVE_SYS_TIME_H
#include <sys/time.h>
# else
#include <time.h>
# endif
#endif
// General dirent.h stuff
#if HAVE_DIRENT_H
#include <dirent.h>
#else
# if HAVE_SYS_NDIR_H
#include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
#include <sys/dir.h>
# endif
# if HAVE_NDIR_H
#include <ndir.h>
# endif
#endif
// General stdc header stuff, including memory.h stuff, like the fact that
// memcpy, and memmove are easily definable...
#ifdef ZDOS
#define STDC_HEADERS
#endif
#ifdef _MSC_VER
#define STDC_HEADERS
#endif
#if STDC_HEADERS
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#else
# ifndef HAVE_MEMCPY
#define memcpy(d, s, n) bcopy ((s), (d), (n))
#define memmove(d, s, n) bcopy ((s), (d), (n))
# endif
#endif
// unistd.h stuff
#if HAVE_UNISTD_H
#include <sys/types.h>
#include <unistd.h>
#endif
// opengl stuff
#ifdef __OPENGL__
#include <GL/gl.h>
#endif
// os specific stuff
#ifdef __QNXNTO__
/* QNX6 has getpagesize() commented out in unistd.h,
however it's a static value that we can just define */
#define getpagesize() 4096
#endif
#ifdef __LINUX__
#include "SDL.h"
#include <sys/mman.h>
#include <limits.h>
#include <glob.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <utime.h>
#include <zlib.h>
#endif
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#include <winsock.h>
#include <winuser.h>
#include <dsound.h>
#include <dinput.h>
#include <direct.h>
#include <sys/stat.h>
#include <zlib.h>
#endif
#ifdef __LINUX__
#ifndef __FreeBSD__
#include <asm/ioctls.h>
#else
#include <sys/filio.h>
#endif
#endif
#ifdef ZDOS
#include <dos.h>
#endif

View File

@@ -1,11 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "SDL.h"
#ifdef __OPENGL__
#include <GL/gl.h>
#endif
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later
//version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "gblhdr.h"
#define BYTE unsigned char
#define WORD unsigned short

View File

@@ -1,3 +1,20 @@
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later
//version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef GL_DRAW_h
#define GL_DRAW_h 1

View File

@@ -15,19 +15,7 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <stdio.h>
#ifdef __FreeBSD__
#include <sys/types.h>
#endif
#include <sys/mman.h>
#include <limits.h>
#include <unistd.h>
#ifdef __QNXNTO__
/* QNX6 has getpagesize() commented out in unistd.h,
however it's a static value that we can just define */
#define getpagesize() 4096
#endif
#include "gblhdr.h"
extern void GuiAsmStart();
extern void GuiAsmEnd();

View File

@@ -1,19 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include "SDL.h"
#include "gblhdr.h"
#include "sw_draw.h"
#include "gl_draw.h"
#ifdef __OPENGL__
#include <GL/gl.h>
#endif
#define BYTE unsigned char
#define WORD unsigned short
#define DWORD unsigned long

View File

@@ -1,8 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "SDL.h"
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later
//version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "gblhdr.h"
#define BYTE unsigned char
#define WORD unsigned short

View File

@@ -1,3 +1,20 @@
//Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later
//version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef SW_DRAW_h
#define SW_DRAW_h 1

View File

@@ -15,9 +15,7 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef __LINUX__
#include <windows.h>
#endif
#include "gblhdr.h"
void ipx_init(){};
void sendpacket(){};

View File

@@ -19,11 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Initial Linux Command Line Parsing by EvilTypeGuy (drevil@warpcore.org) April 2001
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "gblhdr.h"
#define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid())
#define DWORD unsigned long

View File

@@ -80,27 +80,7 @@
// 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
#include <stdio.h>
#include <string.h>
#include <time.h>
#ifdef __LINUX__
#include <sys/time.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/ioctl.h>
#ifndef __FreeBSD__
#include <asm/ioctls.h> // for FIONREAD
#else
#include <sys/filio.h> // for FIONREAD
#endif
#else
#include <windows.h>
#include <winsock.h>
#endif
#include "gblhdr.h"
#ifdef __LINUX__
#define closesocket(A) close(A)

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}
LIBS=-lz -lgcc -lm -lpng
CFLAGS=-D__MSDOS__ -O2
CFLAGS=-D__MSDOS__ -I. -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s
ASM=nasm
ASMFLAGS=-f coff -D__MSDOS__
CC=gcc

View File

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

View File

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

View File

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

View File

@@ -80,10 +80,7 @@
// 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
#include <stdio.h>
#include <time.h>
#include <windows.h>
#include <winsock.h>
#include "../gblhdr.h"
int RecvPtr;
int RecvPtr2;

View File

@@ -15,20 +15,7 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef __LINUX__
#include <utime.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#endif
#include <errno.h>
#include <fcntl.h>
#include "gblhdr.h"
#include "unzip.h"
#define CASESENSITIVITY (0)