From 3fda08e40532245ba69e14cdac0623a138b939f9 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 4 Dec 2018 16:55:25 +0100 Subject: [PATCH] Unix: Change debugging options The old behavior was that enabling debugging did many nontrivial changes in BIRD behavior. The patch changes it that these changes are generally independent. Compiling with --enable-debug now just enables compile-time debug macros, but do not automatically activate debug mode (-d) nor local mode (-l). Debug mode with output to file (-D) do not force foreground mode (-f), therefore there is no need for backgroud option (-b), which is removed. Also fixes a bug when the default log target in -D mode was stderr instead of given debug file. --- configure.ac | 11 +++-------- doc/bird.sgml | 10 ++++++---- sysdep/unix/log.c | 38 ++++++++++++++++++++++++-------------- sysdep/unix/main.c | 19 +++---------------- sysdep/unix/unix.h | 2 +- 5 files changed, 37 insertions(+), 43 deletions(-) diff --git a/configure.ac b/configure.ac index 7abf88c8..ae2710f5 100644 --- a/configure.ac +++ b/configure.ac @@ -85,15 +85,10 @@ AC_SUBST([srcdir]) AS_IF([test -z "${runstatedir}"], [runstatedir='${localstatedir}/run']) AC_SUBST([runstatedir]) - -if test "$enable_debug" = yes ; then - CONFIG_FILE="bird.conf" - CONTROL_SOCKET="bird.ctl" -else - CONFIG_FILE="\$(sysconfdir)/bird.conf" - CONTROL_SOCKET="\$(runstatedir)/bird.ctl" -fi +CONFIG_FILE="\$(sysconfdir)/bird.conf" AC_SUBST([CONFIG_FILE]) + +CONTROL_SOCKET="\$(runstatedir)/bird.ctl" AC_SUBST([CONTROL_SOCKET]) AC_SEARCH_LIBS([clock_gettime], [rt posix4], diff --git a/doc/bird.sgml b/doc/bird.sgml index 62cf0768..386d3e8d 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -149,10 +149,10 @@ BIRD executable by configuring out routing protocols you don't use, and use given configuration file instead of /etc/bird.conf. - enable debug messages and run bird in foreground. + enable debug messages to stderr, and run bird in foreground. -