|
|
dnl Mingw, because it doesnt have a standard file tree. Maybe if ming do this | dnl Mingw, because it doesnt have a standard file tree. Maybe if ming do this |
dnl else do -I/usr/include. Or some shit. You figure it out. | dnl else do -I/usr/include. Or some shit. You figure it out. |
| |
LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib" |
|
|
|
dnl -- Same thing here. | dnl -- Same thing here. |
| |
AC_CANONICAL_SYSTEM | AC_CANONICAL_SYSTEM |
|
|
CFLAGS="$CFLAGS -I$opengl_prefix/include" | CFLAGS="$CFLAGS -I$opengl_prefix/include" |
LDFLAGS-"$LDFLAGS -L$opengl_prefix/lib" | LDFLAGS-"$LDFLAGS -L$opengl_prefix/lib" |
fi | fi |
|
if test x$x_libraries != x; then |
LDFLAGS="$LDFLAGS -L$x_libraries" | LDFLAGS="$LDFLAGS -L$x_libraries" |
|
fi |
AC_CHECK_LIB(GL, glGetError,found_opengl="yes",,) | AC_CHECK_LIB(GL, glGetError,found_opengl="yes",,) |
if test x$found_opengl = xyes; then | if test x$found_opengl = xyes; then |
echo checking for OpenGL... yes | echo checking for OpenGL... yes |
|
|
dnl It is actually easier to debug zsnes with no optimization | dnl It is actually easier to debug zsnes with no optimization |
dnl enabled. | dnl enabled. |
| |
CFLAGS="$CFLAGS -DDEBUG -O0 -fno-omit-frame-pointer -ggdb3" |
CFLAGS="$CFLAGS -DDEBUG -fno-omit-frame-pointer -ggdb3" |
NFLAGS="$NFLAGS -DDEBUG -g -s -O1" dnl -O0 doesnt work | NFLAGS="$NFLAGS -DDEBUG -g -s -O1" dnl -O0 doesnt work |
ZSNESEXE="zsnesd" | ZSNESEXE="zsnesd" |
else | else |
AC_MSG_RESULT(no) | AC_MSG_RESULT(no) |
| |
CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations -s" |
|
NFLAGS="$NFLAGS -O1" |
|
ZSNESEXE="zsnes" | ZSNESEXE="zsnes" |
fi |
|
| |
AC_MSG_CHECKING(which processor class to optimize for) |
AC_ARG_ENABLE(release, [ --enable-release Build ultra-optimized binary (zsnes) ],release=$enableval) |
if test x$debug != xyes; then |
AC_MSG_CHECKING(if you want crazy optimizations) |
case "$target" in |
|
i486-*-*) |
if test x$release = xyes; then |
CFLAGS="$CFLAGS -march=i486" |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(486) |
NFLAGS="$NFLAGS -O99999999" |
;; |
else |
i586-*-*) |
AC_MSG_RESULT(no) |
CFLAGS="$CFLAGS -march=pentium" |
NFLAGS="$NFLAGS -O1" |
AC_MSG_RESULT(586) |
fi |
;; |
|
i686-*-*) |
|
CFLAGS="$CFLAGS -march=pentiumpro" |
|
dnl CFLAGS="$CFLAGS -march=pentium3 -mmmx -msse -mfpmath=sse,387" |
|
AC_MSG_RESULT(686) |
|
;; |
|
*) |
|
AC_MSG_RESULT(386) |
|
AC_MSG_WARN(*** This is probably not what you want use --target) |
|
;; |
|
esac |
|
else |
|
AC_MSG_RESULT(no optimization because debug enabled) |
|
fi | fi |
| |
dnl Checks for header files. | dnl Checks for header files. |