X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=configure.ac;h=ece809003c256357f9a947036e9bcb760640ffad;hb=731107f0ab2f3878743fea49910478c6b21bde1b;hp=5e9cae266e42188bb9a511d2bb509035e9619488;hpb=305304bcc8a55a2faea31c551ccc66d984e63bd1;p=mmh diff --git a/configure.ac b/configure.ac index 5e9cae2..ece8090 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,12 @@ AC_DEFINE_UNQUOTED([BACKUP_PREFIX], "$backup_prefix", [The prefix that is prepended to the name of message files when they are "removed" by rmm. This should typically be `,' or `#'.])dnl dnl What method of locking to use? +AS_CASE(["$host_os"], + [aix*|cygwin*|linux*], + [default_locktype="fcntl"; default_locking=FCNTL_LOCKING], + [freebsd*], [default_locktype="flock"; default_locking=FLOCK_LOCKING], + [default_locktype="dot"; default_locking=DOT_LOCKING]) + AC_ARG_WITH(locking, AS_HELP_STRING([--with-locking=@<:@dot|fcntl|flock|lockf@:>@], [specify the file locking method])) @@ -88,8 +94,8 @@ elif test x"$with_locking" = x"fcntl"; then LOCKTYPE="fcntl" AC_DEFINE(FCNTL_LOCKING, 1, [Define to use fnctl() based locking.])dnl else - LOCKTYPE="dot" - AC_DEFINE(DOT_LOCKING)dnl + LOCKTYPE="$default_locktype" + AC_DEFINE_UNQUOTED($default_locking, 1)dnl fi dnl Should we use a locking directory? @@ -364,7 +370,7 @@ fi dnl Provide a way for distcheck to disable setgid_mail via dnl DISTCHECK_CONFIGURE_FLAGS. -if test x"$DISABLE_SETGID_MAIL" != x; then +if test x"$DISABLE_SETGID_MAIL" != x -a x"$DISABLE_SETGID_MAIL" != x0; then nmh_cv_dotlockfile_setgid=yes fi