|
|
| version 1.11, 2011/12/24 03:49:04 | version 1.12, 2011/12/24 03:50:53 |
|---|---|
| Line 74 AC_PATH_X | Line 74 AC_PATH_X |
| AC_PATH_XTRA | AC_PATH_XTRA |
| AC_SUBST(XLIB,"") | AC_SUBST(XLIB,"") |
| if test x"$no_x" != x"yes"; then | if test x"$no_x" != x"yes"; then |
| XLIB="-lX11" | XLIB="-lX11" |
| elif test x"$have_x" = x"no"; then | elif test x"$have_x" = x"no"; then |
| PKG_CHECK_MODULES([X],[x11 xext],[have_x=yes;no_x=no],[have_x=no;no_x=yes]) | PKG_CHECK_MODULES([X],[x11 xext],[have_x=yes;no_x=no],[have_x=no;no_x=yes]) |
| fi | fi |
| dnl | dnl |
| dnl Xnp2 configure options. | dnl Xnp2 configure options. |
| dnl | dnl |
| AC_ARG_ENABLE(sdl, | AC_ARG_ENABLE(sdl, |
| AC_HELP_STRING([--enable-sdl],[Use SDL library [[default=yes]]]),, | AC_HELP_STRING([--enable-sdl],[Use SDL library [[default=yes]]]),, |
| [enable_sdl="yes"]) | [enable_sdl="yes"]) |
| AC_ARG_ENABLE(sdlmixer, | AC_ARG_ENABLE(sdlmixer, |
| AC_HELP_STRING([--enable-sdlmixer],[Use SDL_mixer library [[default=yes]]]),, | AC_HELP_STRING([--enable-sdlmixer],[Use SDL_mixer library [[default=yes]]]),, |
| [enable_sdlmixer="yes"]) | [enable_sdlmixer="yes"]) |
| AC_ARG_ENABLE(xf86vidmode, | AC_ARG_ENABLE(xf86vidmode, |
| AC_HELP_STRING([--enable-xf86vidmode],[Use XF86VidMode extension [[default=yes]]]),, | AC_HELP_STRING([--enable-xf86vidmode],[Use XF86VidMode extension [[default=yes]]]),, |
| [enable_xf86vidmode="yes"]) | [enable_xf86vidmode="yes"]) |
| AC_ARG_ENABLE(ia32, | AC_ARG_ENABLE(ia32, |
| AC_HELP_STRING([--enable-ia32],[Use IA-32 emulation [[default=no]]]),, | AC_HELP_STRING([--enable-ia32],[Use IA-32 emulation [[default=no]]]),, |
| [enable_ia32="no"]) | [enable_ia32="no"]) |
| AC_ARG_ENABLE(debug, | AC_ARG_ENABLE(debug, |
| AC_HELP_STRING([--enable-debug],[Enable debugging [[default=no]]]),, | AC_HELP_STRING([--enable-debug],[Enable debugging [[default=no]]]),, |
| [enable_debug="no"]) | [enable_debug="no"]) |
| dnl | dnl |
| dnl Checks for GTK+ | dnl Checks for GTK+ |
| dnl | dnl |
| AM_PATH_GTK_2_0(2.6.0,, | AM_PATH_GTK_2_0(2.6.0,, |
| AC_MSG_ERROR(Test for GTK failed. See the file 'x11/INSTALL.ja' for help)) | AC_MSG_ERROR(Test for GTK failed. See the file 'x11/INSTALL.ja' for help)) |
| AC_SUBST(GTK_CFLAGS) | AC_SUBST(GTK_CFLAGS) |
| AC_SUBST(GTK_LIBS) | AC_SUBST(GTK_LIBS) |
| AC_DEFINE(USE_GTK2,1,[Define to 1 if you have the GTK+-2.6 (or later) library.]) | AC_DEFINE(USE_GTK2,1,[Define to 1 if you have the GTK+-2 library.]) |
| dnl | dnl |
| dnl Checks for SDL | dnl Checks for SDL |
| dnl | dnl |
| if test x"$enable_sdlmixer" = "xyes"; then | if test x"$enable_sdlmixer" = "xyes"; then |
| AM_PATH_SDL(1.2.0) | AM_PATH_SDL(1.2.0) |
| if test x"$no_sdl" != "xyes"; then | if test x"$no_sdl" != "xyes"; then |
| AC_DEFINE(USE_SDLAUDIO,,[Define if you have the SDL library.]) | AC_DEFINE(USE_SDLAUDIO,,[Define if you have the SDL library.]) |
| fi | fi |
| fi | fi |
| dnl | dnl |
| dnl Checks for SDL_mixer | dnl Checks for SDL_mixer |
| dnl | dnl |
| if test x"$enable_sdlmixer" = "xyes"; then | if test x"$enable_sdlmixer" = "xyes"; then |
| if test x"$no_sdl" != "xyes"; then | if test x"$no_sdl" != "xyes"; then |
| AC_CHECK_LIB(SDL_mixer,Mix_OpenAudio, | AC_CHECK_LIB(SDL_mixer,Mix_OpenAudio, |
| AC_DEFINE(USE_SDLMIXER,,[Define if you have the SDL_mixer library.]) | AC_DEFINE(USE_SDLMIXER,,[Define if you have the SDL_mixer library.]) |
| SDL_LIBS="$SDL_LIBS -lSDL_mixer",,$SDL_LIBS) | SDL_LIBS="$SDL_LIBS -lSDL_mixer",,$SDL_LIBS) |
| fi | fi |
| fi | fi |
| dnl | dnl |
| dnl Checks for XF86VidMode extension | dnl Checks for XF86VidMode extension |
| dnl | dnl |
| if test x"$enable_xf86vidmode" = "xyes"; then | if test x"$enable_xf86vidmode" = "xyes"; then |
| ac_cv_save_cflags=$CFLAGS | ac_cv_save_cflags=$CFLAGS |
| CFLAGS="$CFLAGS $X_CFLAGS" | CFLAGS="$CFLAGS $X_CFLAGS" |
| AC_CHECK_LIB(Xext,XextCreateExtension, | AC_CHECK_LIB(Xext,XextCreateExtension, |
| [XLIB="-lXext $XLIB"],,[$X_LIBS $X_PRE_LIBS $XLIB $X_EXTRA_LIBS]) | [XLIB="-lXext $XLIB"],,[$X_LIBS $X_PRE_LIBS $XLIB $X_EXTRA_LIBS]) |
| AC_CHECK_HEADERS(X11/extensions/xf86vmode.h, | AC_CHECK_HEADERS(X11/extensions/xf86vmode.h, |
| [AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension, | [AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension, |
| [X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm" | [X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm" |
| AC_DEFINE(HAVE_XF86VIDMODE,1,[Define to 1 if you have the libXxf86vm library.])],, | AC_DEFINE(HAVE_XF86VIDMODE,1,[Define to 1 if you have the libXxf86vm library.])],, |
| $X_LIBS $X_PRE_LIBS $XLIB $X_EXTRA_LIBS)], | $X_LIBS $X_PRE_LIBS $XLIB $X_EXTRA_LIBS)], |
| , | , |
| [#include <X11/Xlib.h>]) | [#include <X11/Xlib.h>]) |
| CFLAGS=$ac_cv_save_cflags | CFLAGS=$ac_cv_save_cflags |
| fi | fi |
| dnl | dnl |
| dnl Checks for IA-32 CPU emulation | dnl Checks for IA-32 CPU emulation |
| dnl | dnl |
| AC_MSG_CHECKING([whether to enable IA-32 emulation]) | AC_MSG_CHECKING([whether to use IA-32 emulation]) |
| AM_CONDITIONAL(CPUCORE_IA32,test x"$enable_ia32" = "xyes") | AM_CONDITIONAL(CPUCORE_IA32,test x"$enable_ia32" = "xyes") |
| if test x"$enable_ia32" = "xyes"; then | if test x"$enable_ia32" = "xyes"; then |
| AC_DEFINE(CPUCORE_IA32,,[Define if use IA-32 emulation]) | AC_DEFINE(CPUCORE_IA32,,[Define if use IA-32 emulation]) |
| fi | fi |
| AC_MSG_RESULT($enable_ia32) | AC_MSG_RESULT($enable_ia32) |
| Line 161 dnl Checks for debug mode | Line 161 dnl Checks for debug mode |
| dnl | dnl |
| AC_MSG_CHECKING([whether to enable debugging]) | AC_MSG_CHECKING([whether to enable debugging]) |
| if test x"$enable_debug" = "xyes"; then | if test x"$enable_debug" = "xyes"; then |
| CFLAGS="$CFLAGS -DDEBUG -g -O0" | CFLAGS="$CFLAGS -DDEBUG -g -O0" |
| CFLAGS="$CFLAGS -Wall -Wcast-align" | CFLAGS="$CFLAGS -Wall -Wcast-align" |
| CFLAGS="$CFLAGS -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" | CFLAGS="$CFLAGS -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" |
| CFLAGS="$CFLAGS -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers" | CFLAGS="$CFLAGS -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers" |
| CFLAGS="$CFLAGS -Wstack-protector -fstack-protector --param ssp-buffer-size=1" | CFLAGS="$CFLAGS -Wstack-protector -fstack-protector --param ssp-buffer-size=1" |
| else | else |
| CFLAGS="$CFLAGS -DNDEBUG" | CFLAGS="$CFLAGS -DNDEBUG" |
| fi | fi |
| AC_MSG_RESULT($enable_debug) | AC_MSG_RESULT($enable_debug) |