1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

build: Make log-directory configurable indepently of VARDIR

This adds a new configure option "--with-logdir".
logdir defaults to "${localstatedir}/log" .
It is important to have logdir configurable for debian systems,
where localstatedir is set to "/var/lib" and not "/var".

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit b0c6854d1e886456fabdc8f1c3bd21c89311c601)
This commit is contained in:
Mathieu PARENT 2009-02-04 00:15:57 +01:00 committed by Michael Adam
parent 62f27d0cb3
commit f0d585217e
3 changed files with 14 additions and 1 deletions

View File

@ -12,6 +12,7 @@ bindir = @bindir@
sbindir = @sbindir@
mandir = @mandir@
localstatedir = @localstatedir@
logdir = @LOGDIR@
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
srcdir = @srcdir@
etcdir = @sysconfdir@
@ -30,6 +31,7 @@ IPQ_LIBS = @IPQ_LIBS@
CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
-I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
-DLOGDIR=\"$(logdir)\" \
-DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS)
LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@ @CTDB_PCAP_LDFLAGS@

View File

@ -37,6 +37,17 @@ if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
fi
LOGDIR='${localstatedir}/log'
AC_ARG_WITH([logdir],
[ --with-logdir=DIR path to log directory],
LOGDIR=$withval)
if test ! -z "$LOGDIR"; then
if test "$LOGDIR" = "yes" -o "$LOGDIR" = "no"; then
AC_MSG_ERROR([--with-logdir must specify a path])
fi
fi
AC_SUBST(LOGDIR)
AC_CONFIG_HEADER(config.h)
EXTRA_OBJ=""

View File

@ -52,7 +52,7 @@ static struct {
.nlist = ETCDIR "/ctdb/nodes",
.transport = "tcp",
.event_script_dir = ETCDIR "/ctdb/events.d",
.logfile = VARDIR "/log/log.ctdb",
.logfile = LOGDIR "/log.ctdb",
.db_dir = VARDIR "/ctdb",
.db_dir_persistent = VARDIR "/ctdb/persistent",
.script_log_level = DEBUG_ERR,