changeset 151:e20fe8c9936a

default values for logdir and spooldir we also have defines for LOG_DIR and SPOOL_DIR now
author meillo@marmaro.de
date Wed, 07 Jul 2010 10:32:00 +0200
parents 4aa6b6e18a13
children dfb6143e7832
files config.h.in configure configure.ac man/masqmail.conf.5 src/conf.c
diffstat 5 files changed, 26 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/config.h.in	Tue Jul 06 20:16:33 2010 +0200
+++ b/config.h.in	Wed Jul 07 10:32:00 2010 +0200
@@ -131,6 +131,9 @@
 /* Define to 1 if you have the `vprintf' function. */
 #undef HAVE_VPRINTF
 
+/* The log directory */
+#undef LOG_DIR
+
 /* Name of package */
 #undef PACKAGE
 
@@ -158,6 +161,9 @@
 /* The sbin directory */
 #undef SBINDIR
 
+/* The spool directory */
+#undef SPOOL_DIR
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
--- a/configure	Tue Jul 06 20:16:33 2010 +0200
+++ b/configure	Wed Jul 07 10:32:00 2010 +0200
@@ -1365,7 +1365,7 @@
   --with-glib-static=path  link glib statically (path mandatory!)
   --with-libcrypto         use libcrypto
   --with-liblockfile       use liblock (for Debian)
-  --with-logdir=DIR        set log directory /var/masqmail
+  --with-logdir=DIR        set log directory /var/log/masqmail
   --with-spooldir=DIR      set spool directory /var/spool/masqmail
   --with-confdir           directory for configuration /etc/masqmail
 
@@ -5440,6 +5440,11 @@
 fi
 
 
+cat >>confdefs.h <<_ACEOF
+#define LOG_DIR "${with_logdir}"
+_ACEOF
+
+
 
 
 # Check whether --with-spooldir was given.
@@ -5451,6 +5456,11 @@
 fi
 
 
+cat >>confdefs.h <<_ACEOF
+#define SPOOL_DIR "${with_spooldir}"
+_ACEOF
+
+
 
 
 # Check whether --with-confdir was given.
--- a/configure.ac	Tue Jul 06 20:16:33 2010 +0200
+++ b/configure.ac	Wed Jul 07 10:32:00 2010 +0200
@@ -247,10 +247,11 @@
 
 dnl log and spool directories
 AC_ARG_WITH(logdir,
-	[  --with-logdir=DIR        set log directory [/var/masqmail]],
+	[  --with-logdir=DIR        set log directory [/var/log/masqmail]],
 	,
         with_logdir='/var/log/masqmail/'
 	)
+AC_DEFINE_UNQUOTED(LOG_DIR, "${with_logdir}", [The log directory])
 AC_SUBST(with_logdir)
 
 AC_ARG_WITH(spooldir,
@@ -258,6 +259,7 @@
 	,
 	with_spooldir='/var/spool/masqmail/'
 	)
+AC_DEFINE_UNQUOTED(SPOOL_DIR, "${with_spooldir}", [The spool directory])
 AC_SUBST(with_spooldir)
 
 dnl configuration file
--- a/man/masqmail.conf.5	Tue Jul 06 20:16:33 2010 +0200
+++ b/man/masqmail.conf.5	Wed Jul 07 10:32:00 2010 +0200
@@ -67,9 +67,10 @@
 
 The directory where log are stored, if syslog is not used.
 Debug files are stored in this directory anyways.
-\fI/var/log/masqmail\fR is a common value.
 \fIfile\fR must be an absolute path.
 
+Default: \fI/var/log/masqmail\fR
+
 .TP
 \fBmail_dir = \fIfile\fR
 
@@ -82,9 +83,10 @@
 The directory where masqmail stores its spool files (and later also other stuff).
 It must have a subdirectory \fIinput\fR.
 Masqmail needs read and write permissions for this directory.
-I suggest to use \fI/var/spool/masqmail\fR.
 \fIfile\fR must be an absolute path.
 
+Default: \fI/var/spool/masqmail\fR
+
 .TP
 \fBlock_dir = \fIfile\fR
 
--- a/src/conf.c	Tue Jul 06 20:16:33 2010 +0200
+++ b/src/conf.c	Wed Jul 07 10:32:00 2010 +0200
@@ -432,6 +432,8 @@
 	conf.alias_local_cmp = strcmp;
 	conf.max_defer_time = 86400 * 4;  /* 4 days */
 	conf.max_msg_size = 0; /* no limit on msg size */
+	conf.spool_dir = SPOOL_DIR;
+	conf.log_dir = LOG_DIR;
 
 	if ((in = fopen(filename, "r")) == NULL) {
 		fprintf(stderr, "could not open config file %s: %s\n", filename, strerror(errno));