Switch the use of LOCKDIR in acconfig.h to --enable-lockdir.
authorKen Hornstein <kenh@pobox.com>
Fri, 6 Jan 2012 03:08:23 +0000 (22:08 -0500)
committerKen Hornstein <kenh@pobox.com>
Fri, 6 Jan 2012 03:13:48 +0000 (22:13 -0500)
acconfig.h
configure.in
docs/pending-release-notes
man/mh-tailor.man

index 3649bf3..70c2c6d 100644 (file)
  */
 
 /*
  */
 
 /*
- * 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+.
  */
  * Define this if your passwords are stored in some type of
  * distributed name service, such as NIS, or NIS+.
  */
index 55e1393..64fcd4f 100644 (file)
@@ -153,6 +153,17 @@ else
   AC_DEFINE(DOT_LOCKING)dnl
 fi
 
   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@:>@],
 dnl What method of posting should post use?
 AC_ARG_WITH(mts,
   AS_HELP_STRING([--with-mts=@<:@smtp|sendmail@:>@],
index 7c27535..14ad579 100644 (file)
@@ -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.
   garbage collected.
 - Old code enabled by the UCI preprocessor definition has been
   garbage-collected.
+- LOCKDIR is now configurable via --enable-lockdir
index 15704ee..4a30db1 100644 (file)
@@ -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
 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
 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 ,
 .PP
 Prior to installing
 .BR nmh ,