location a run-time configuration variable.
mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(INTLLIBS)
mutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(INTLDEPS)
-DEFS=-DSHAREDIR=\"$(sharedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
+DEFS=-DSHAREDIR=\"$(sharedir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
INCLUDES=-I. -I$(includedir)
non_us_sources = pgp.c pgpinvoke.c pgpkey.c pgppubring.c sha1dgst.c \
/* use dotlocking to lock mailboxes? */
#undef USE_DOTLOCK
+/* use an external dotlocking program? */
+#undef DL_STANDALONE
+
/* use flock() to lock mailboxes? */
#undef USE_FLOCK
/* Where are the character set definitions located? */
#undef CHARMAPS_DIR
+
fi
fi
-if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno"
+AC_ARG_ENABLE(external_dotlock, [ --enable-external-dotlock Force use of an external dotlock program],
+ [mutt_cv_external_dotlock=yes])
+
+if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" \
+ || test "x$mutt_cv_external_dotlock" = "xyes"
then
- CPPFLAGS="$CPPFLAGS -DDL_STANDALONE -DDOTLOCK=\"\\\"\$(bindir)/mutt_dotlock\\\"\""
+ AC_DEFINE(DL_STANDALONE)
DOTLOCK_TARGET="mutt_dotlock"
else
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o"
CFLAGS="-Wall -pedantic $CFLAGS"
fi
-CFLAGS="-DHAVE_CONFIG_H=1 $CFLAGS"
-
AC_ARG_ENABLE(nfs-fix, [ --enable-nfs-fix Work around an NFS with broken attributes caching ],
[if test x$enableval = xyes; then
AC_DEFINE(NFS_ATTRIBUTE_HACK)
WHERE char Errorbuf[SHORT_STRING];
+#if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
+WHERE char *MuttDotlock;
+#endif
+
WHERE char *AliasFile;
WHERE char *AliasFmt;
WHERE char *AttachSep;
{ "date_format", DT_STR, R_BOTH, UL &DateFmt, UL "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
{ "default_hook", DT_STR, R_NONE, UL &DefaultHook, UL "~f %s !~P | (~P ~C %s)" },
{ "delete", DT_QUAD, R_NONE, OPT_DELETE, M_ASKYES },
+#if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
+ { "dotlock_program", DT_PATH, R_NONE, UL &MuttDotlock, UL BINDIR "/mutt_dotlock" },
+#endif
{ "dsn_notify", DT_STR, R_NONE, UL &DsnNotify, UL "" },
{ "dsn_return", DT_STR, R_NONE, UL &DsnReturn, UL "" },
{ "edit_headers", DT_BOOL, R_NONE, OPTEDITHDRS, 0 },
mutt_quote_filename (f, sizeof (f), path);
snprintf (cmd, sizeof (cmd),
- "%s %s%s%s%s%s%s",
- DOTLOCK,
- flags & DL_FL_TRY ? "-t " : "",
- flags & DL_FL_UNLOCK ? "-u " : "",
- flags & DL_FL_USEPRIV ? "-p " : "",
- flags & DL_FL_FORCE ? "-f " : "",
- flags & DL_FL_RETRY ? r : "",
- f);
+ "%s %s%s%s%s%s%s",
+ NONULL (MuttDotlock),
+ flags & DL_FL_TRY ? "-t " : "",
+ flags & DL_FL_UNLOCK ? "-u " : "",
+ flags & DL_FL_USEPRIV ? "-p " : "",
+ flags & DL_FL_FORCE ? "-f " : "",
+ flags & DL_FL_RETRY ? r : "",
+ f);
return mutt_system (cmd);
}