From 44e6fecc3402b23342ff4146fb28f0e7fcf101db Mon Sep 17 00:00:00 2001 From: Ruben Laguna Date: Sun, 8 Mar 2015 11:03:40 +0100 Subject: [PATCH] Add AC_HEADER_ASSERT --- configure.ac | 2 ++ src/main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index d7d483e..3c1cec5 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_PROG_INSTALL AC_PROG_CC_C_O # Need to have per product flags myexecutable_CFLAG AC_PROG_RANLIB # Need for to create libraries: .a + # Checks for libraries. # Found libraries are automatically addded to LIBS @@ -45,6 +46,7 @@ AC_PROG_RANLIB # Need for to create libraries: .a # ]) # Checks for header files. +AC_HEADER_ASSERT # ./configure --disable-assert to define NDEBUG AC_CHECK_HEADER([stdlib.h]) # Check for C11's optional Atomic operations library diff --git a/src/main.c b/src/main.c index 5b72c0e..f29a077 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,7 @@ #include #include "common.h" +#include int main(int argc, char *argv[]) { @@ -13,5 +14,6 @@ int main(int argc, char *argv[]) printf ("PACKAGE_NAME "PACKAGE_NAME "\n"); printf ("PACKAGE_STRING " PACKAGE_STRING "\n"); printf ("PACKAGE_TARNAME " PACKAGE_TARNAME "\n"); + assert( 1 > 0); return 0; }