~ubuntu-branches/ubuntu/feisty/xfce-mcs-plugins/feisty

« back to all changes in this revision

Viewing changes to m4/debug.m4

  • Committer: Bazaar Package Importer
  • Author(s): Simon Huggins
  • Date: 2004-04-27 22:08:03 UTC
  • Revision ID: james.westby@ubuntu.com-20040427220803-vhxi3wkask9cku5d
Tags: upstream-4.0.5
ImportĀ upstreamĀ versionĀ 4.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl From Benedikt Meurer (benedikt.meurer@unix-ag.uni-siegen.de)
 
2
dnl
 
3
dnl if debug support is requested:
 
4
dnl
 
5
dnl   1) defines DEBUG to 1
 
6
dnl   2) adds requested debug level flags to CFLAGS
 
7
dnl
 
8
 
 
9
AC_DEFUN([BM_DEBUG_SUPPORT],
 
10
[
 
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])
 
15
 
 
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"
 
22
      AC_MSG_RESULT([full])
 
23
    else
 
24
      CFLAGS="$CFLAGS -g -Wall -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
 
25
      AC_MSG_RESULT([yes])
 
26
    fi
 
27
  else
 
28
    AC_MSG_RESULT([no])
 
29
  fi
 
30
 
 
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])
 
37
 
 
38
  AC_MSG_CHECKING([whether to build with profiling support])
 
39
  if test x"$enable_profiling" != x"no"; then
 
40
    CFLAGS="$CFLAGS -pg"
 
41
    AC_MSG_RESULT([yes])
 
42
  else
 
43
    AC_MSG_RESULT([no])
 
44
  fi
 
45
 
 
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])
 
51
 
 
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"
 
55
    AC_MSG_RESULT([no])
 
56
  else
 
57
    AC_MSG_RESULT([yes])
 
58
  fi
 
59
])