Removed global header from DOS/Windows port
This commit is contained in:
@@ -15,28 +15,23 @@ 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 -I."
|
||||
CFLAGS="-pipe"
|
||||
AC_PROG_CC
|
||||
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_CANONICAL_SYSTEM
|
||||
case "$target" in
|
||||
*-*-linux*)
|
||||
*-*-linux* | *-*-*bsd*)
|
||||
CFLAGS="$CFLAGS -D__LINUX__"
|
||||
NFLAGS="$NFLAGS -D__LINUX__ -f elf"
|
||||
;;
|
||||
*-*-*bsd*)
|
||||
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
|
||||
NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -f elf"
|
||||
NASMD="$NASMD -D__LINUX__ -f elf"
|
||||
;;
|
||||
*-*-cygwin* | *-*-*ming*)
|
||||
CFLAGS="$CFLAGS -D__LINUX__"
|
||||
NFLAGS="$NFLAGS -D__LINUX__ -f win32"
|
||||
NASMD="$NASMD -D__LINUX__ -f win32"
|
||||
ZSNESEXE=".exe"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(This Target is Not Supported)
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -46,7 +41,7 @@ echo -- Do we have X, and where is it? Needed for Mesa Checking
|
||||
|
||||
AC_PATH_X
|
||||
CFLAGS="$CFLAGS -I$x_includes"
|
||||
LDFLAGS="$LDFLAGS -L$x_libraries"
|
||||
LIBS="$LIBS -L$x_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)])
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $SDL_LIBS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
|
||||
AC_MSG_CHECKING(for zlib)
|
||||
with_zlib=no
|
||||
@@ -67,7 +62,7 @@ with_zlib=yes
|
||||
])
|
||||
|
||||
if test x$with_zlib = xyes; then
|
||||
LDFLAGS="$LDFLAGS -lz"
|
||||
LIBS="$LIBS -lz"
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
@@ -87,9 +82,9 @@ if test x$with_opengl != xno; then
|
||||
])
|
||||
AC_MSG_RESULT($with_opengl)
|
||||
if test x$with_opengl = xyes; then
|
||||
LDFLAGS="$LDFLAGS -lGL"
|
||||
LIBS="$LIBS -lGL"
|
||||
CFLAGS="$CFLAGS -D__OPENGL__"
|
||||
NFLAGS="$NFLAGS -D__OPENGL__"
|
||||
NASMD="$NASMD -D__OPENGL__"
|
||||
GL_DRAW="\${WINDIR}/gl_draw.o"
|
||||
fi
|
||||
else
|
||||
@@ -109,7 +104,7 @@ if test x$with_png != xno; then
|
||||
])
|
||||
AC_MSG_RESULT($with_png)
|
||||
if test x$with_png = xyes; then
|
||||
LDFLAGS="$LDFLAGS -lpng"
|
||||
LIBS="$LIBS -lpng"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(disabled by user)
|
||||
@@ -125,7 +120,7 @@ if test x$debug = xyes; then
|
||||
dnl enabled.
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3"
|
||||
NFLAGS="$NFLAGS -g -s"
|
||||
NASMD="$NASMD -g -s"
|
||||
ZSNESEXE="zsnes-debug$ZSNESEXE"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
@@ -135,31 +130,55 @@ else
|
||||
dnl zsnes more easily deal with small instruction caches, and more
|
||||
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"
|
||||
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(486)
|
||||
AC_MSG_RESULT(detected 486)
|
||||
;;
|
||||
i586-*-*)
|
||||
CFLAGS="$CFLAGS -march=pentium"
|
||||
AC_MSG_RESULT(Pentium)
|
||||
AC_MSG_RESULT(detected Pentium)
|
||||
;;
|
||||
i686-*-*)
|
||||
CFLAGS="$CFLAGS -march=pentiumpro"
|
||||
AC_MSG_RESULT(PPro/P2)
|
||||
AC_MSG_RESULT(detected PPro/P2)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(386)
|
||||
AC_MSG_WARN(*** This is probably not what you want use --target)
|
||||
AC_MSG_RESULT(detected 386)
|
||||
AC_MSG_WARN(*** This is probably not what you want use --enable-force-486/586/686)
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_RESULT(no optimization because debug enabled)
|
||||
fi
|
||||
@@ -167,18 +186,22 @@ fi
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
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.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_STRUCT_TM
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user