~dave-terei/libmemcached/sasl-fixes

« back to all changes in this revision

Viewing changes to m4/debug.m4

  • Committer: Brian Aker
  • Date: 2012-09-09 01:35:56 UTC
  • mto: This revision was merged to the branch mainline in revision 1065.
  • Revision ID: brian@tangent.org-20120909013556-v7flihagp7zvy3ic
Compiler fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_DEFUN([AX_DEBUG],[
 
2
  AC_ARG_WITH([debug],
 
3
    [AS_HELP_STRING([--with-debug],
 
4
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
 
5
    [with_debug=$withval],
 
6
    [with_debug=no])
 
7
  AS_IF([test "$with_debug" = "yes"],[
 
8
    # Debugging. No optimization.
 
9
    AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
 
10
    AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
 
11
    AC_DEFINE(DEBUG, [ 1 ], [Define to 1 to enable debugging code.])
 
12
  ],[
 
13
    # Optimized version. No debug
 
14
    AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
 
15
    AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
 
16
    AC_DEFINE(DEBUG, [ 0 ], [Define to 1 to enable debugging code.])
 
17
  ])
 
18
])