Add support for debug messages

Add new DEBUG_LOG macro for debug messages. The messages are enabled
when compiled with --enable-debug and they are printed when the -d
option is used twice.
This commit is contained in:
Miroslav Lichvar
2013-11-26 18:53:10 +01:00
parent 0731cd6950
commit 4bbc5520b8
6 changed files with 42 additions and 5 deletions

7
configure vendored
View File

@@ -115,6 +115,7 @@ For better control, use the options below.
--disable-forcednsretry Don't retry on permanent DNS error
--with-sendmail=PATH Path to sendmail binary [/usr/lib/sendmail]
--enable-trace Enable tracing
--enable-debug Enable debugging support
Fine tuning of the installation directories:
--sysconfdir=DIR chrony.conf location [/etc]
@@ -171,7 +172,7 @@ EXTRA_OBJECTS=""
EXTRA_DEFS=""
SYSDEFS=""
# Support for readline (on by default)
debug=0
feat_readline=1
try_readline=1
try_editline=1
@@ -199,6 +200,9 @@ do
--enable-trace )
add_def TRACEON
;;
--enable-debug )
debug=1
;;
--disable-readline )
feat_readline=0
;;
@@ -616,6 +620,7 @@ if [ "x$SETCHRONYVARDIR" != "x" ]; then
CHRONYVARDIR=$SETCHRONYVARDIR
fi
add_def DEBUG $debug
add_def DEFAULT_CONF_FILE "\"$SYSCONFDIR/chrony.conf\""
add_def MAIL_PROGRAM "\"$mail_program\""