|
|
| version 1.12, 2011/12/24 03:50:53 | version 1.23, 2012/01/24 18:19:56 |
|---|---|
| Line 6 dnl require autoconf 2.59 | Line 6 dnl require autoconf 2.59 |
| AC_PREREQ(2.59) | AC_PREREQ(2.59) |
| AC_REVISION($Revision$) | AC_REVISION($Revision$) |
| AC_INIT(Xnp2,0.83-20111223,nonakap@gmail.com,xnp2) | AC_INIT(Xnp2,0.83-20120124,nonakap@gmail.com,xnp2) |
| AM_INIT_AUTOMAKE([no-define no-dist no-installinfo subdir-objects]) | AM_INIT_AUTOMAKE([no-define no-dist no-installinfo subdir-objects]) |
| AC_CONFIG_SRCDIR([../np2ver.h]) | AC_CONFIG_SRCDIR([../np2ver.h]) |
| AC_CONFIG_HEADERS(config.h) | AC_CONFIG_HEADERS(config.h) |
| Line 46 AC_SYS_LARGEFILE | Line 46 AC_SYS_LARGEFILE |
| dnl | dnl |
| dnl Check GCC | dnl Check GCC |
| dnl | dnl |
| if test x"$GCC" != "xyes"; then | AM_CONDITIONAL(HAVE_GCC,test x"$GCC" = "xyes") |
| AC_MSG_ERROR(This package required GCC.) | |
| fi | |
| dnl | dnl |
| dnl Checks for library functions. | dnl Checks for library functions. |
| Line 83 dnl | Line 81 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"]) |
| AC_ARG_ENABLE(warning, | |
| AC_HELP_STRING([--enable-warning],[Enable warning [default=no]]),, | |
| [enable_warning="no"]) | |
| dnl | dnl |
| dnl Checks for GTK+ | dnl Checks for GTK+ |
| Line 135 if test x"$enable_xf86vidmode" = "xyes"; | Line 136 if test x"$enable_xf86vidmode" = "xyes"; |
| 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>]) |
| Line 147 if test x"$enable_xf86vidmode" = "xyes"; | Line 148 if test x"$enable_xf86vidmode" = "xyes"; |
| fi | fi |
| dnl | dnl |
| dnl Checks for nasm | |
| dnl | |
| AC_CHECK_PROGS(nasm,[nasm nasmw],no) | |
| dnl | |
| dnl Checks for IA-32 CPU emulation | dnl Checks for IA-32 CPU emulation |
| dnl | dnl |
| AC_MSG_CHECKING([whether to use IA-32 emulation]) | AC_MSG_CHECKING([whether to use IA-32 emulation]) |
| Line 161 dnl Checks for debug mode | Line 167 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 -g -DDEBUG -DTRACE" |
| CFLAGS="$CFLAGS -Wall -Wcast-align" | |
| 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 -Wstack-protector -fstack-protector --param ssp-buffer-size=1" | CFLAGS="$CFLAGS -Wstack-protector -fstack-protector --param ssp-buffer-size=1" |
| enable_warning=yes | |
| else | else |
| CFLAGS="$CFLAGS -DNDEBUG" | CFLAGS="$CFLAGS -DNDEBUG" |
| fi | fi |
| AC_MSG_RESULT($enable_debug) | AC_MSG_RESULT($enable_debug) |
| dnl | dnl |
| dnl Checks for warning | |
| dnl | |
| AC_MSG_CHECKING([whether to enable warning]) | |
| if test x"$enable_warning" = "xyes"; then | |
| CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith" | |
| CFLAGS="$CFLAGS -Wreturn-type -Wswitch -Wshadow" | |
| CFLAGS="$CFLAGS -Wcast-qual -Wwrite-strings" | |
| CFLAGS="$CFLAGS -Wextra -Wno-unused-parameter" | |
| CFLAGS="$CFLAGS -Wformat=2" | |
| fi | |
| AC_MSG_RESULT($enable_warning) | |
| dnl | |
| dnl Checks for Xnp2 version | |
| dnl | |
| NP2VER_X11=`echo $PACKAGE_VERSION | $AWK 'BEGIN {FS="-"} NF==2 {print $2}'` | |
| if test x"$NP2VER_X11" != "x"; then | |
| NP2VER_X11="\"-$NP2VER_X11\"" | |
| AC_DEFINE_UNQUOTED(NP2VER_X11,$NP2VER_X11,[Define if Xnp2 version is available]) | |
| fi | |
| dnl | |
| dnl Output Makefiles | dnl Output Makefiles |
| dnl | dnl |
| AC_CONFIG_FILES([Makefile]) | AC_CONFIG_FILES([Makefile]) |