[
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
DEBUG_CFLAGS="-DDEBUG -Werror"
- ],
- [
+ DEBUG_SPL="_with_debug"
+ ], [
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
DEBUG_CFLAGS="-DNDEBUG"
+ DEBUG_SPL="_without_debug"
])
AC_SUBST(DEBUG_CFLAGS)
+ AC_SUBST(DEBUG_SPL)
AC_MSG_RESULT([$enable_debug])
])
[enable_debug_log=yes])
AS_IF([test "x$enable_debug_log" = xyes],
- [AC_DEFINE([DEBUG_LOG], [1],
+ [
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+ DEBUG_LOG="_with_debug_log"
+ AC_DEFINE([DEBUG_LOG], [1],
[Define to 1 to enable basic debug logging])
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"])
+ ], [
+ DEBUG_LOG="_without_debug_log"
+ ])
+ AC_SUBST(DEBUG_LOG)
AC_MSG_CHECKING([whether basic debug logging is enabled])
AC_MSG_RESULT([$enable_debug_log])
])
[enable_debug_kmem=yes])
AS_IF([test "x$enable_debug_kmem" = xyes],
- [AC_DEFINE([DEBUG_KMEM], [1],
+ [
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+ DEBUG_KMEM="_with_debug_kmem"
+ AC_DEFINE([DEBUG_KMEM], [1],
[Define to 1 to enable basic kmem accounting])
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"])
+ ], [
+ DEBUG_KMEM="_without_debug_kmem"
+ ])
+ AC_SUBST(DEBUG_KMEM)
AC_MSG_CHECKING([whether basic kmem accounting is enabled])
AC_MSG_RESULT([$enable_debug_kmem])
])
[enable_debug_kmem_tracking=no])
AS_IF([test "x$enable_debug_kmem_tracking" = xyes],
- [AC_DEFINE([DEBUG_KMEM_TRACKING], [1],
+ [
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+ DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+ AC_DEFINE([DEBUG_KMEM_TRACKING], [1],
[Define to 1 to enable detailed kmem tracking])
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"])
+ ], [
+ DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+ ])
+ AC_SUBST(DEBUG_KMEM_TRACKING)
AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
AC_MSG_RESULT([$enable_debug_kmem_tracking])
])
CONFIG_KERNEL_TRUE
CONFIG_USER_FALSE
CONFIG_USER_TRUE
+DEBUG_KMEM_TRACKING
+DEBUG_KMEM
+DEBUG_LOG
+DEBUG_SPL
DEBUG_CFLAGS
KERNELCPPFLAGS
KERNELMAKE_PARAMS
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4788: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:4792: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:4791: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:4795: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:4794: output\"" >&5)
+ (eval echo "\"\$as_me:4798: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6000 "configure"' > conftest.$ac_ext
+ echo '#line 6004 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7853: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7857: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7857: \$? = $ac_status" >&5
+ echo "$as_me:7861: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8192: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8196: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8196: \$? = $ac_status" >&5
+ echo "$as_me:8200: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8297: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8301: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8301: \$? = $ac_status" >&5
+ echo "$as_me:8305: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8352: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8356: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8356: \$? = $ac_status" >&5
+ echo "$as_me:8360: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11155 "configure"
+#line 11159 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11251 "configure"
+#line 11255 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
DEBUG_CFLAGS="-DDEBUG -Werror"
+ DEBUG_SPL="_with_debug"
else
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
DEBUG_CFLAGS="-DNDEBUG"
+ DEBUG_SPL="_without_debug"
fi
+
{ $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
$as_echo "$enable_debug" >&6; }
if test "x$enable_debug_log" = xyes; then
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+ DEBUG_LOG="_with_debug_log"
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG_LOG 1
_ACEOF
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+
+else
+
+ DEBUG_LOG="_without_debug_log"
+
fi
+
{ $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5
$as_echo_n "checking whether basic debug logging is enabled... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5
if test "x$enable_debug_kmem" = xyes; then
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+ DEBUG_KMEM="_with_debug_kmem"
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG_KMEM 1
_ACEOF
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+
+else
+
+ DEBUG_KMEM="_without_debug_kmem"
+
fi
+
{ $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
if test "x$enable_debug_kmem_tracking" = xyes; then
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+ DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG_KMEM_TRACKING 1
_ACEOF
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+
+else
+
+ DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+
fi
+
{ $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
DEBUG_CFLAGS="-DDEBUG -Werror"
+ DEBUG_SPL="_with_debug"
else
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
DEBUG_CFLAGS="-DNDEBUG"
+ DEBUG_SPL="_without_debug"
fi
+
{ $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
$as_echo "$enable_debug" >&6; }
if test "x$enable_debug_log" = xyes; then
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+ DEBUG_LOG="_with_debug_log"
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG_LOG 1
_ACEOF
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+
+else
+
+ DEBUG_LOG="_without_debug_log"
+
fi
+
{ $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5
$as_echo_n "checking whether basic debug logging is enabled... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5
if test "x$enable_debug_kmem" = xyes; then
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+ DEBUG_KMEM="_with_debug_kmem"
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG_KMEM 1
_ACEOF
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+
+else
+
+ DEBUG_KMEM="_without_debug_kmem"
+
fi
+
{ $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
if test "x$enable_debug_kmem_tracking" = xyes; then
+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+ DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG_KMEM_TRACKING 1
_ACEOF
- KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+
+else
+
+ DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+
fi
+
{ $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
%define kobj %{require_kobj}
%endif
+# Set using 'rpmbuild ... --with debug ...', defaults to disabled.
+%if %{defined _with_debug}
+ %define kdebug --enable-debug
+%else
+ %if %{defined _without_debug}
+ %define kdebug --disable-debug
+ %else
+ %define kdebug --disable-debug
+ %endif
+%endif
+
+# Set using 'rpmbuild ... --with debug-log ...', defaults to enabled.
+%if %{defined _with_debug_log}
+ %define kdebug_log --enable-debug-log
+%else
+ %if %{defined _without_debug_log}
+ %define kdebug_log --disable-debug-log
+ %else
+ %define kdebug_log --enable-debug-log
+ %endif
+%endif
+
+# Set using 'rpmbuild ... --with debug-kmem ...', defaults to enabled.
+%if %{defined _with_debug_kmem}
+ %define kdebug_kmem --enable-debug-kmem
+%else
+ %if %{defined _without_debug_kmem}
+ %define kdebug_kmem --disable-debug-kmem
+ %else
+ %define kdebug_kmem --enable-debug-kmem
+ %endif
+%endif
+
+# Set using 'rpmbuild ... --with debug-tracking ...', defaults to disabled.
+%if %{defined _with_debug_kmem_tracking}
+ %define kdebug_kmem_tracking --enable-debug-kmem-tracking
+%else
+ %if %{defined _without_debug_kmem_tracking}
+ %define kdebug_kmem_tracking --disable-debug-kmem-tracking
+ %else
+ %define kdebug_kmem_tracking --disable-debug-kmem-tracking
+ %endif
+%endif
+
# SLES:
%if %{defined suse_version}
%if %{undefined kver}
%prep
%setup -n @PACKAGE@-%{version}
%build
-%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \
- --with-config=kernel
+%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} --with-config=kernel \
+ %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking}
make
%install