1 dnl Copyright (C) 2009 Sun Microsystems, Inc.
2 dnl This file is free software; Sun Microsystems, Inc.
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 dnl PANDORA_HEADER_ASSERT
8 dnl Check whether to enable assertions.
9 AC_DEFUN([PANDORA_HEADER_ASSERT],
11 AC_CHECK_HEADERS(assert.h)
12 AC_MSG_CHECKING([whether to enable assertions])
13 AC_ARG_ENABLE([assert],
14 [AS_HELP_STRING([--enable-assert],
15 [Turn on assertions])],
18 AC_MSG_RESULT([$ac_cv_assert])
20 AS_IF([test "$ac_cv_assert" = "no"],
21 [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])