~derks/pandora-build/refactor-on-cement

« back to all changes in this revision

Viewing changes to pandorabuild/tree/m4/pandora_header_assert.m4

  • Committer: BJ Dierkes
  • Date: 2010-05-19 10:32:33 UTC
  • Revision ID: wdierkes@5dollarwhitebox.org-20100519103233-93ols9y1b2588uq1
initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl  Copyright (C) 2009 Sun Microsystems
 
2
dnl This file is free software; Sun Microsystems
 
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
 
 
6
dnl PANDORA_HEADER_ASSERT
 
7
dnl ----------------
 
8
dnl Check whether to enable assertions.
 
9
AC_DEFUN([PANDORA_HEADER_ASSERT],
 
10
[
 
11
  AC_CHECK_HEADERS(assert.h)
 
12
  AC_MSG_CHECKING([whether to enable assertions])
 
13
  AC_ARG_ENABLE([assert],
 
14
    [AS_HELP_STRING([--disable-assert],
 
15
       [Turn off assertions])],
 
16
    [ac_cv_assert="no"],
 
17
    [ac_cv_assert="yes"])
 
18
  AC_MSG_RESULT([$ac_cv_assert])
 
19
 
 
20
  AS_IF([test "$ac_cv_assert" = "no"], 
 
21
    [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])
 
22
])
 
23