pandora_header_assert.m4 742 B

1234567891011121314151617181920212223
  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.
  5. dnl PANDORA_HEADER_ASSERT
  6. dnl ----------------
  7. dnl Check whether to enable assertions.
  8. AC_DEFUN([PANDORA_HEADER_ASSERT],
  9. [
  10. AC_CHECK_HEADERS(assert.h)
  11. AC_MSG_CHECKING([whether to enable assertions])
  12. AC_ARG_ENABLE([assert],
  13. [AS_HELP_STRING([--disable-assert],
  14. [Turn off assertions])],
  15. [ac_cv_assert="no"],
  16. [ac_cv_assert="yes"])
  17. AC_MSG_RESULT([$ac_cv_assert])
  18. AS_IF([test "$ac_cv_assert" = "no"],
  19. [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])
  20. ])