1 dnl Copyright (C) 2007 Sergey Yanovich <ynvich@gmail.com>
3 dnl This program is free software; you can redistribute it and/or modify it
4 dnl under the terms of the GNU General Public License as published by the
5 dnl Free Software Foundation; either version 2 of the License, or (at your
6 dnl option) any later version.
8 dnl This program is distributed in the hope that it will be useful, but
9 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 dnl General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License along
14 dnl with this program; if not, write to the Free Software Foundation, Inc.,
15 dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 dnl AA_ARG_ENABLE_DEBUG()
19 AC_DEFUN([AA_ARG_ENABLE_DEBUG],[
21 AC_ARG_ENABLE([debug],
22 [AS_HELP_STRING([--enable-debug],
23 [build with debug code (enabled by default)])],
24 [aa_cv_enable_debug=$enableval],
25 [aa_cv_enable_debug=yes])
26 AC_CACHE_CHECK([whether to build debug code],[aa_cv_enable_debug],
27 [aa_cv_enable_debug=yes])
31 if test x$aa_cv_enable_debug = xyes; then
32 AC_DEFINE([DEBUG],[1],[Define to enable debug code])