summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2006-05-23 08:41:28 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2006-05-23 08:41:28 +0000
commitde6a9db8d3a687521a89690e395939d6feb24bb1 (patch)
tree8013fa32b5cfa41b6f5bc5495435129f4cc234c7
parent80d766e54fd9505ca009b388593056013f8db4d7 (diff)
move definition of ULOGD_LOGFILE_DEFAULT and ULOGD_CONFIGFILE to Makefile.am,
Set default config and log files based on configure. Note that these defines cannot be placed in config.h, since they depend on the prefix, which must be expanded by make. (Philip Craig)
-rw-r--r--src/Makefile.am4
-rw-r--r--src/ulogd.c10
2 files changed, 3 insertions, 11 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 783f153..8093aef 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,7 @@
-INCLUDES = $(all_includes) -I$(top_srcdir)/include
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include \
+ -DULOGD_CONFIGFILE="\"$(sysconfdir)/ulogd.conf\"" \
+ -DULOGD_LOGFILE_DEFAULT="\"$(localstatedir)/log/ulogd.log\""
sbin_PROGRAMS = ulogd
diff --git a/src/ulogd.c b/src/ulogd.c
index b408fe9..2dc597b 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -69,16 +69,6 @@
#define DEBUGP(format, args...)
#endif
-/* default config parameters, if not changed in configfile */
-#ifndef ULOGD_LOGFILE_DEFAULT
-#define ULOGD_LOGFILE_DEFAULT "/var/log/ulogd.log"
-#endif
-
-/* where to look for the config file */
-#ifndef ULOGD_CONFIGFILE
-#define ULOGD_CONFIGFILE "/usr/local/etc/ulogd.conf"
-#endif
-
#define COPYRIGHT \
"Copyright (C) 2000-2005 Harald Welte <laforge@netfilter.org>\n"