--- np2/x11/configure.ac 2011/12/16 10:32:08 1.1 +++ np2/x11/configure.ac 2011/12/22 16:16:34 1.6 @@ -4,9 +4,9 @@ dnl dnl require autoconf 2.59 AC_PREREQ(2.59) -AC_REVISION($Revision: 1.1 $) +AC_REVISION($Revision: 1.6 $) -AC_INIT(Xnp2, 0.83, aw9k-nnk@asahi-net.or.jp, xnp2) +AC_INIT(Xnp2, 0.83-20111222, 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) @@ -86,6 +86,9 @@ AC_ARG_ENABLE(sdl, AC_ARG_ENABLE(sdlmixer, AC_HELP_STRING([--enable-sdlmixer],[Use SDL_mixer library [[default=yes]]]),, [enable_sdlmixer="yes"]) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug],[Enable debugging [[default=no]]]),, + [enable_debug="no"]) dnl dnl Checks for IA-32 CPU emulation @@ -137,11 +140,22 @@ if test x"$enable_sdlmixer" = "xyes"; th fi dnl +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 -Wstack-protector -fstack-protector --param ssp-buffer-size=1" +else + CFLAGS="$CFLAGS -DNDEBUG" +fi +AC_MSG_RESULT($enable_debug) + +dnl dnl Output Makefiles dnl -AC_CONFIG_FILES([ - Makefile - xnp2.1 - xnp2.1j -]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT