From 2a0c57ac404c335a9af4b1f9c6d5450f6db73c7c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 6 Oct 2003 05:02:59 +0000 Subject: [PATCH] Add --with-debug. --- stepmania/configure.ac | 9 +++++++++ stepmania/src/Makefile.am | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/stepmania/configure.ac b/stepmania/configure.ac index d7669647d5..fd42601142 100644 --- a/stepmania/configure.ac +++ b/stepmania/configure.ac @@ -19,6 +19,15 @@ test "$DEFAULT_CFLAGS" = "yes" && CFLAGS="-Wall -W -Wno-unused -Wno-switch" test "$DEFAULT_CXXFLAGS" = "yes" && CXXFLAGS="-Wall -W -Wno-unused -Wno-switch" test "$DEFAULT_LDFLAGS" = "yes" && LDFLAGS="" +AC_ARG_WITH(debug, AC_HELP_STRING([--with-debug], [Enable debug mode]), with_debug=$withval, with_debug=no) +if test "$with_debug" = "yes"; then + test "$DEFAULT_CFLAGS" = "yes" && CFLAGS="$CFLAGS -g" + test "$DEFAULT_CXXFLAGS" = "yes" && CXXFLAGS="$CXXFLAGS -g" +else + test "$DEFAULT_CFLAGS" = "yes" && CFLAGS="$CFLAGS -O3" + test "$DEFAULT_CXXFLAGS" = "yes" && CXXFLAGS="$CXXFLAGS -O3" +fi + SM_OPENGL AM_PATH_SDL(1.2.6,enable_sdl=yes,enable_sdl=no) diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 1930096ccf..2104409990 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -1,8 +1,8 @@ bin_PROGRAMS = stepmania AM_LDFLAGS = -AM_CXXFLAGS = -O2 -AM_CFLAGS = -O2 +AM_CXXFLAGS = +AM_CFLAGS = if NHAVE_SDL AM_CXXFLAGS += -ISDL-1.2.6/include