summaryrefslogtreecommitdiffstats
path: root/config/zfs-build.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/zfs-build.m4')
-rw-r--r--config/zfs-build.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index aa8d3e5ee..823f33266 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -20,16 +20,20 @@ AC_DEFUN([ZFS_AC_DEBUG], [
HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror"
DEBUG_CFLAGS="-DDEBUG -Werror"
DEBUG_STACKFLAGS="-fstack-check"
+ DEBUG_ZFS="_with_debug"
+ AC_DEFINE(ZFS_DEBUG, 1, [zfs debugging enabled])
],
[
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
DEBUG_CFLAGS="-DNDEBUG"
DEBUG_STACKFLAGS=""
+ DEBUG_ZFS="_without_debug"
])
AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(DEBUG_STACKFLAGS)
+ AC_SUBST(DEBUG_ZFS)
AC_MSG_RESULT([$enable_debug])
])