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_TESTS()
19 AC_DEFUN([AA_ARG_ENABLE_TESTS],[
21 AC_ARG_ENABLE([tests],
22 [AS_HELP_STRING([--enable-tests],
23 [build unit tests (enabled by default)])],
24 [aa_cv_enable_tests=$enableval],
25 [aa_cv_enable_tests=yes])
26 AC_CACHE_CHECK([whether to build tests],[aa_cv_enable_tests],
27 [aa_cv_enable_tests=yes])
31 if test x$aa_cv_enable_tests = xyes; then
32 AC_DEFINE([AA_ENABLE_TESTS],[1],[Define to enable unit tests])
34 AM_CONDITIONAL([AA_ENABLE_TESTS],[test x$aa_cv_enable_tests = xyes])