mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 19:28:52 +02:00
configure.ac: Add an RB_DEBUG_LEVEL which will always be defined; 0 when RB_DEBUG is not defined.
This commit is contained in:
parent
bd1a66e608
commit
75648c7397
2 changed files with 4 additions and 2 deletions
|
@ -152,10 +152,12 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging suite fo
|
||||||
AC_SUBST(DEBUG, 1)
|
AC_SUBST(DEBUG, 1)
|
||||||
CXXFLAGS+=" -O0 -ggdb"
|
CXXFLAGS+=" -O0 -ggdb"
|
||||||
RB_DEFINE_UNQUOTED([DEBUG], [1], [Not configured for release when lit.])
|
RB_DEFINE_UNQUOTED([DEBUG], [1], [Not configured for release when lit.])
|
||||||
|
RB_DEFINE_UNQUOTED([DEBUG_LEVEL], [1], [Defined to 0 for release; or > 0 otherwise])
|
||||||
], [
|
], [
|
||||||
AC_SUBST(DEBUG, 0)
|
AC_SUBST(DEBUG, 0)
|
||||||
CXXFLAGS+=" -O3"
|
CXXFLAGS+=" -O3"
|
||||||
CPPDEFINE([NDEBUG])
|
CPPDEFINE([NDEBUG])
|
||||||
|
RB_DEFINE_UNQUOTED([DEBUG_LEVEL], [0], [Defined to 0 for release])
|
||||||
])
|
])
|
||||||
|
|
||||||
AM_CONDITIONAL([DEBUG], [[[[ "$DEBUG" = "1" ]]]])
|
AM_CONDITIONAL([DEBUG], [[[[ "$DEBUG" = "1" ]]]])
|
||||||
|
|
|
@ -67,7 +67,7 @@ try
|
||||||
{
|
{
|
||||||
// cores are not dumped without consent of the user to maintain the privacy
|
// cores are not dumped without consent of the user to maintain the privacy
|
||||||
// of cryptographic key material in memory at the time of the crash.
|
// of cryptographic key material in memory at the time of the crash.
|
||||||
if(RB_DEBUG || debugmode)
|
if(RB_DEBUG_LEVEL || debugmode)
|
||||||
enable_coredumps();
|
enable_coredumps();
|
||||||
|
|
||||||
assert(runlevel == runlevel::STOPPED);
|
assert(runlevel == runlevel::STOPPED);
|
||||||
|
@ -100,7 +100,7 @@ try
|
||||||
__VERSION__,
|
__VERSION__,
|
||||||
RB_DATE_CONFIGURED,
|
RB_DATE_CONFIGURED,
|
||||||
__TIMESTAMP__,
|
__TIMESTAMP__,
|
||||||
RB_DEBUG? "(DEBUG MODE)" : "");
|
RB_DEBUG_LEVEL? "(DEBUG MODE)" : "");
|
||||||
|
|
||||||
ircd::set_runlevel(runlevel::READY);
|
ircd::set_runlevel(runlevel::READY);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue