--- np2/x11/configure.ac 2011/12/24 17:48:03 1.14 +++ np2/x11/configure.ac 2012/01/08 07:34:17 1.18 @@ -4,9 +4,9 @@ dnl dnl require autoconf 2.59 AC_PREREQ(2.59) -AC_REVISION($Revision: 1.14 $) +AC_REVISION($Revision: 1.18 $) -AC_INIT(Xnp2,0.83-20111224,nonakap@gmail.com,xnp2) +AC_INIT(Xnp2,0.83-20111229,nonakap@gmail.com,xnp2) AM_INIT_AUTOMAKE([no-define no-dist no-installinfo subdir-objects]) AC_CONFIG_SRCDIR([../np2ver.h]) AC_CONFIG_HEADERS(config.h) @@ -83,20 +83,23 @@ dnl dnl Xnp2 configure options. dnl 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"]) 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"]) 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"]) 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"]) 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"]) +AC_ARG_ENABLE(warning, + AC_HELP_STRING([--enable-warning],[Enable warning [default=no]]),, + [enable_warning="no"]) dnl dnl Checks for GTK+ @@ -161,17 +164,28 @@ dnl Checks for debug mode dnl AC_MSG_CHECKING([whether to enable debugging]) if test x"$enable_debug" = "xyes"; then - CFLAGS="$CFLAGS -DDEBUG -g -O0" - 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 -g -DDEBUG -DTRACE" CFLAGS="$CFLAGS -Wstack-protector -fstack-protector --param ssp-buffer-size=1" + enable_warning=yes else CFLAGS="$CFLAGS -DNDEBUG" fi AC_MSG_RESULT($enable_debug) 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}'`