1
dnl From Benedikt Meurer (benedikt.meurer@unix-ag.uni-siegen.de)
3
dnl if debug support is requested:
5
dnl 1) defines DEBUG to 1
6
dnl 2) adds requested debug level flags to CFLAGS
9
AC_DEFUN([BM_DEBUG_SUPPORT],
11
AC_ARG_ENABLE([debug],
12
AC_HELP_STRING([--enable-debug[=yes|no|full]], [Build with debugging support])
13
AC_HELP_STRING([--disable-debug], [Include no debugging support [default]]),
14
[], [enable_debug=no])
16
AC_MSG_CHECKING([whether to build with debugging support])
17
if test x"$enable_debug" != x"no"; then
18
AC_DEFINE(DEBUG, 1, Define for debugging support)
19
if test x"$enable_debug" = x"full"; then
20
AC_DEFINE(DEBUG_TRACE, 1, Define for tracing support)
21
CFLAGS="$CFLAGS -g3 -Wall -Werror -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
24
CFLAGS="$CFLAGS -g -Wall -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
31
AC_ARG_ENABLE([profiling],
32
AC_HELP_STRING([--enable-profiling],
33
[Generate extra code to write profile information])
34
AC_HELP_STRING([--disable-profiling],
35
[No extra code for profiling (default)]),
36
[], [enable_profiling=no])
38
AC_MSG_CHECKING([whether to build with profiling support])
39
if test x"$enable_profiling" != x"no"; then
46
AC_ARG_ENABLE([asserts],
47
AC_HELP_STRING([--enable-asserts], [Enable assert statements (default)])
48
AC_HELP_STRING([--disable-asserts],
49
[Disable assert statements (USE WITH CARE!!!)]),
50
[], [enable_asserts=yes])
52
AC_MSG_CHECKING([whether to enable assert statements])
53
if test x"$enable_asserts" != x"yes"; then
54
CFLAGS="$CFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"