Define NDEBUG for assert() if --enable-debug is not specified.

This commit is contained in:
Juan RP 2013-11-08 09:11:47 +01:00
parent 0909c81cdb
commit 2952c69c7a
2 changed files with 5 additions and 2 deletions

3
configure vendored
View File

@ -199,11 +199,10 @@ fi
if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then
echo "Building with debugging symbols." echo "Building with debugging symbols."
echo "CPPFLAGS += -DDEBUG" >>$CONFIG_MK
echo "CFLAGS += -g" >>$CONFIG_MK echo "CFLAGS += -g" >>$CONFIG_MK
fi fi
echo "CPPFLAGS += -DDEBUG" >>$CONFIG_MK
case "$OS" in case "$OS" in
linux) linux)
echo "CPPFLAGS += -D_XOPEN_SOURCE=700" >>$CONFIG_MK echo "CPPFLAGS += -D_XOPEN_SOURCE=700" >>$CONFIG_MK

View File

@ -27,6 +27,10 @@
#ifndef _XBPS_API_IMPL_H_ #ifndef _XBPS_API_IMPL_H_
#define _XBPS_API_IMPL_H_ #define _XBPS_API_IMPL_H_
#ifndef DEBUG
#define NDEBUG
#endif
#include <assert.h> #include <assert.h>
#include <confuse.h> #include <confuse.h>
#define LIBXBPS_PRIVATE #define LIBXBPS_PRIVATE