From: markus schnalke Date: Tue, 3 Nov 2015 07:47:26 +0000 (+0100) Subject: Re-add --with-lockdir=DIR configure option X-Git-Tag: mmh-0.3~65 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=e48142e43bfeef1a44fb2f7131918b7172cd427e;hp=a1a744d898ec8842871dca302e6ae54d9233413f Re-add --with-lockdir=DIR configure option At the same time eliminate acconfig.h (and thus the autoreconf warning). Include the lock dir string only if we use dot locking. --- diff --git a/INSTALL b/INSTALL index 8e6c177..3944343 100644 --- a/INSTALL +++ b/INSTALL @@ -160,3 +160,13 @@ Options for configure reason not to use dot-locking is if the mail spool directory is not world- or user-writeable, and thus a lock file cannot be created. + +--with-lockdir=DIR + If you have defined "dot" locking, then the default is to + place the lock files in the same directory as the file that + is to be locked. Alternately, if you use this option, you can + specify that all lock files go in the specified directory. + Don't define this unless you know you need it. + + This option is only relevant if "dot" locking is used. + In the other cases, it is ignored. diff --git a/Makefile.in b/Makefile.in index abe21a7..7ec7673 100644 --- a/Makefile.in +++ b/Makefile.in @@ -143,7 +143,7 @@ stamp-h: config.h.in config.status ./config.status config.h stamp config.h.in: stamp-h.in -stamp-h.in: configure.ac acconfig.h +stamp-h.in: configure.ac cd $(srcdir) && autoheader date > $@ diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index 7352240..0000000 --- a/acconfig.h +++ /dev/null @@ -1,25 +0,0 @@ - -/****** BEGIN USER CONFIGURATION SECTION *****/ - -/* - * IMPORTANT: You should no longer need to edit this file to handle - * your operating system. That should be handled and set correctly by - * configure now. - * - * These are slowly being phased out, but currently - * not everyone is auto-configured. Then decide if you - * wish to change the features that are compiled into nmh. - */ - -/* - * If you have defined DOT_LOCKING, then the default is to - * place the lock files in the same directory as the file that - * is to be locked. Alternately, if you define LOCKDIR, you - * can specify that all lock files go in a specific directory. - * Don't define this unless you know you need it. - */ -/* #define LOCKDIR "/usr/spool/locks" */ - - -/***** END USER CONFIGURATION SECTION *****/ -@TOP@ diff --git a/configure.ac b/configure.ac index d32c30b..653acf0 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,19 @@ else AC_DEFINE(DOT_LOCKING)dnl fi +dnl Should we use a locking directory? +AC_ARG_WITH(lockdir, + AS_HELP_STRING([--with-lockdir=dir], [Store dot-lock files in "dir"]), [ + AS_IF([test "x$with_lockdir" = xyes],[ + AC_MSG_ERROR([--with-lockdir requires an argument])]) +]) + +if test x"$with_lockdir" != x; then + LOCKDIR="$with_lockdir" + AC_DEFINE_UNQUOTED(LOCKDIR, ["$with_lockdir"], + [Directory to store dot-locking lock files.])dnl +fi + dnl ---------------------------------------------------- dnl Default location is /usr/local/mmh/{bin,etc,lib,share/man} @@ -560,7 +573,7 @@ eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf=${nmhsysconf}" eval "nmhlib=${libdir}"; eval "nmhlib=${nmhlib}" eval "nmhman=${mandir}"; eval "nmhman=${nmhman}" -echo " +cat < #endif -#ifdef LOCKDIR +#ifdef DOT_LOCKING +# ifdef LOCKDIR char *lockdir = LOCKDIR; +# endif #endif /* Are we using any kernel locking? */