1
# ===========================================================================
2
# https://github.com/BrianAker/ddm4/
3
# ===========================================================================
15
# Copyright (C) 2012 Brian Aker
16
# All rights reserved.
18
# Redistribution and use in source and binary forms, with or without
19
# modification, are permitted provided that the following conditions are
22
# * Redistributions of source code must retain the above copyright
23
# notice, this list of conditions and the following disclaimer.
25
# * Redistributions in binary form must reproduce the above
26
# copyright notice, this list of conditions and the following disclaimer
27
# in the documentation and/or other materials provided with the
30
# * The names of its contributors may not be used to endorse or
31
# promote products derived from this software without specific prior
34
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
37
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
39
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
40
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
41
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
42
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49
AC_ARG_ENABLE([debug],
50
[AS_HELP_STRING([--enable-debug],
51
[Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],[
53
dnl Debugging. No optimization.
54
AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
55
AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
56
AC_DEFINE(DEBUG, [ 1 ], [Define to 1 to enable debugging code.])
59
dnl Optimized version. No debug
60
AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
61
AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
62
AC_DEFINE(DEBUG, [ 0 ], [Define to 1 to enable debugging code.])
65
AC_MSG_CHECKING([for debug])
66
AC_MSG_RESULT([$ax_enable_debug])