Add two new --enable-debug modes, profile and debugprofile, to generate CPU usage profiles.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3501 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2008-01-16 21:16:11 +00:00
parent d159e46a14
commit ecc82d493e
1 changed files with 5 additions and 1 deletions

View File

@ -155,7 +155,7 @@ fi
# -Wno-unused-label is necessary because flex produces unused labels that we cannot fix
# Add later for stricter checking: -Wextra -Wmissing-declarations -Wstrict-prototypes
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--disable-debug[=yes/relaxed/no]],[Compile debug version [yes]]),
AS_HELP_STRING([--disable-debug[=yes/relaxed/profile/debugprofile/no]],[Compile debug version [yes]]),
[ enable_debug=${enableval} ], [ enable_debug=yes ])
AC_MSG_CHECKING([whether to compile in debug mode])
AC_MSG_RESULT([${enable_debug}])
@ -167,6 +167,10 @@ if test "x$enable_debug" = "xyes" ; then
fi
elif test "x$enable_debug" = "xrelaxed" ; then
WZ_CFLAGS="${WZ_CFLAGS} -g -DDEBUG -Wall -Wextra"
elif test "x$enable_debug" = "xdebugprofile" ; then
WZ_CFLAGS="${WZ_CFLAGS} -g -O0 -DDEBUG -pg -Wall -Wextra"
elif test "x$enable_debug" = "xprofile" ; then
WZ_CFLAGS="${WZ_CFLAGS} -g -Os -DNDEBUG -pg -Wall -Wextra"
else
WZ_CFLAGS="${WZ_CFLAGS} -g -DNDEBUG -Wall"
fi