-dnl -------------------------
-dnl CHECK COMMAND LINE OPTION
-dnl -------------------------
-dnl What method of posting should post use?
-undefine([mts])dnl
-AC_ARG_WITH(mts,
-[ --with-mts=MTS specify the mail transport agent])
-
-if test x$with_mts = xsmtp; then
- MTS="smtp"
- MTSLIB="mts/smtp/libsmtp.a"
- AC_DEFINE(SMTPMTS)dnl
-elif test x$with_mts = xsendmail; then
- MTS="sendmail"
- MTSLIB="mts/sendmail/libsend.a"
- AC_DEFINE(SENDMTS)dnl
+dnl --------------------------
+dnl CHECK COMMAND LINE OPTIONS
+dnl --------------------------
+
+dnl Do you want to debug nmh?
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],[enable nmh code debugging]))
+dnl The old redundant --enable-nmh-debug is deprecated and undocumented.
+if test x"$enable_nmh_debug" = x"yes"; then
+ enable_debug=yes
+fi
+
+dnl Allow users to send email from addresses other than their default?
+AC_ARG_ENABLE(masquerade,
+ AS_HELP_STRING([--enable-masquerade='draft_from mmailid username_extension'],
+ [enable up to 3 types of address masquerading]),
+ [if test x"$enable_masquerade" = x"yes"; then
+ masquerade="draft_from mmailid username_extension"
+ else
+ masquerade="$enable_masquerade"
+ fi], [masquerade="draft_from mmailid username_extension"])
+AC_SUBST(masquerade)dnl
+
+dnl Do you want mhe support?
+AC_ARG_ENABLE(mhe,
+ AS_HELP_STRING([--disable-mhe],[disable mhe support]))
+
+dnl mhe support is on by default, so define it unless --disable-mhe or the
+dnl deprecated, undocumented --disable-nmh-mhe are specified.
+if test x"$enable_mhe" != x"no" -a x"$enable_nmh_mhe" != x"no"; then
+ AC_DEFINE(MHE, 1,
+ [Define to compile in support for the Emacs front-end mh-e.])dnl
+fi
+
+dnl Do you want client-side support for pop?
+AC_ARG_ENABLE(pop,
+ AS_HELP_STRING([--enable-pop], [enable client-side support for plain POP3]))
+dnl The old redundant --enable-nmh-pop is deprecated and undocumented.
+if test x"$enable_nmh_pop" = x"yes"; then
+ enable_pop=yes
+fi
+
+dnl Do you want to disable use of locale functions
+AH_TEMPLATE([LOCALE],
+[Undefine if you don't want locale features. By default this is defined.])
+AC_ARG_ENABLE([locale],
+AC_HELP_STRING([--disable-locale], [turn off locale features]),
+[if test x$enableval = xyes; then
+ AC_DEFINE(LOCALE)
+fi],
+AC_DEFINE(LOCALE)
+)
+
+dnl Do you want client-side support for using SASL for authentication?
+dnl Note that this code will be enabled for both POP and SMTP
+AC_ARG_WITH(cyrus-sasl, AS_HELP_STRING([--with-cyrus-sasl],
+ [Enable SASL support via the Cyrus SASL library]))
+if test x"$with_cyrus_sasl" != x -a x"$with_cyrus_sasl" != x"no"; then
+ AC_DEFINE(CYRUS_SASL, 1,
+ [Define to use the Cyrus SASL library for authentication of POP and SMTP.])dnl
+ if test x"$with_cyrus_sasl" != xyes; then
+ AC_MSG_WARN([Arguments to --with-cyrus-sasl now ignored])
+ AC_MSG_WARN([Please pass the appropriate arguments to CPPFLAGS/LDFLAGS])
+ fi
+ sasl_support=yes