From b227669eb3338ad951c81e7efea1c76026b9f661 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Thu, 5 Jan 2012 22:08:23 -0500 Subject: [PATCH] Switch the use of LOCKDIR in acconfig.h to --enable-lockdir. --- acconfig.h | 9 --------- configure.in | 11 +++++++++++ docs/pending-release-notes | 1 + man/mh-tailor.man | 7 +++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/acconfig.h b/acconfig.h index 3649bf3..70c2c6d 100644 --- a/acconfig.h +++ b/acconfig.h @@ -12,15 +12,6 @@ */ /* - * 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" */ - -/* * Define this if your passwords are stored in some type of * distributed name service, such as NIS, or NIS+. */ diff --git a/configure.in b/configure.in index 55e1393..64fcd4f 100644 --- a/configure.in +++ b/configure.in @@ -153,6 +153,17 @@ else AC_DEFINE(DOT_LOCKING)dnl fi +dnl Should we use a locking directory? +AC_ARG_ENABLE([lockdir], [ + AS_HELP_STRING([--enable-lockdir=dir], [Store dot-lock files in "dir"])], [ + AS_IF([test "x$enableval" = xyes],[ + AC_MSG_ERROR([--enable-lockdir requires an argument])]) + AS_IF([test "x$LOCKTYPE" != xdot],[ + AC_MSG_ERROR([Can only use --enable-lockdir with dot locking])]) + AC_DEFINE_UNQUOTED([LOCKDIR], ["$enableval"], + [Directory to store dot-locking lock files]) +]) + dnl What method of posting should post use? AC_ARG_WITH(mts, AS_HELP_STRING([--with-mts=@<:@smtp|sendmail@:>@], diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 7c27535..14ad579 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -7,3 +7,4 @@ Things to add to the release notes for the next full release: garbage collected. - Old code enabled by the UCI preprocessor definition has been garbage-collected. +- LOCKDIR is now configurable via --enable-lockdir diff --git a/man/mh-tailor.man b/man/mh-tailor.man index 15704ee..4a30db1 100644 --- a/man/mh-tailor.man +++ b/man/mh-tailor.man @@ -387,12 +387,11 @@ specifies that a file should be created whose existence means \*(lqlocked\*(rq and whose non-existence means \*(lqunlocked\*(rq. The name of this file is constructed by appending \*(lq.lock\*(rq to the name of the file being -locked. If -.B LOCKDIR -is not specified, lock files will be created +locked. If \*(lq--enable-lockdir=directory\*(rq +is not specified at build time, lock files will be created in the directory where the file being locked resides. Otherwise, lock files will be created in the directory specified by -.BR LOCKDIR . +\*(lq--enable-lockdir\*(rq. .PP Prior to installing .BR nmh , -- 1.7.10.4