Set DEBUG/NDEBUG as part of user space build Rules.am

This commit is contained in:
Brian Behlendorf 2009-10-23 11:45:52 -07:00
parent a726b89974
commit ae0967ca15
2 changed files with 27 additions and 21 deletions

View File

@ -4,6 +4,6 @@ DEFAULT_INCLUDES = -I${top_srcdir}
AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -Werror
# Expected defines not covered by zfs_config.h or spl_config.h
AM_CFLAGS += -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT
AM_CFLAGS += -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT $(USERDEBUG)
AM_CFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64
AM_CFLAGS += -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\"

View File

@ -24,15 +24,21 @@ AC_DEFUN([ZFS_AC_DEBUG], [
)
if test "$zfs_ac_debug" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE([DEBUG], [1],
[Define to 1 to enable debug tracing])
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG "
HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG "
USERDEBUG="-DDEBUG"
else
AC_MSG_RESULT([no])
AC_DEFINE([NDEBUG], [1],
[Define to 1 to disable debug tracing])
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
USERDEBUG="-DNDEBUG"
fi
AC_SUBST(USERDEBUG)
])
AC_DEFUN([ZFS_AC_CONFIG_SCRIPT], [