Merging bzr://gaz.tangent.org/libmemcached/build2/ to Build branch
[m6w6/libmemcached] / m4 / pandora_header_assert.m4
index eb5d15b90542a70e2f6c2f26395d7c01fc16e83b..2fdf9d4ca12f9423236b3a77487436a082f076ea 100644 (file)
@@ -1,5 +1,5 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
+dnl  Copyright (C) 2009 Sun Microsystems, Inc.
+dnl This file is free software; Sun Microsystems, Inc.
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
@@ -8,6 +8,7 @@ dnl ----------------
 dnl Check whether to enable assertions.
 AC_DEFUN([PANDORA_HEADER_ASSERT],
 [
+  AC_CHECK_HEADERS(assert.h)
   AC_MSG_CHECKING([whether to enable assertions])
   AC_ARG_ENABLE([assert],
     [AS_HELP_STRING([--disable-assert],
@@ -16,8 +17,7 @@ AC_DEFUN([PANDORA_HEADER_ASSERT],
     [ac_cv_assert="yes"])
   AC_MSG_RESULT([$ac_cv_assert])
 
-  AS_IF([test "$ac_cv_assert" = "yes"], 
-    [AC_CHECK_HEADERS(assert.h)],
+  AS_IF([test "$ac_cv_assert" = "no"], 
     [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])
 ])