dnl
dnl configure.in -- autoconf template for nmh
dnl
-dnl $Id$
-dnl
dnl Move this up a bit
AC_PREREQ(2.61)
-AC_INIT(nmh, m4_normalize(m4_include([VERSION])))
+AC_INIT(mmh, m4_normalize(m4_include([VERSION])))
AC_CONFIG_SRCDIR(h/nmh.h)
AC_CONFIG_HEADER(config.h)
dnl CHECK COMMAND LINE OPTIONS
dnl --------------------------
-dnl Do you want client-side support for apop?
-AC_ARG_ENABLE(apop, AS_HELP_STRING([--enable-apop],
- [enable client-side support for POP3 and APOP]))
-if test x"$enable_apop" = x"yes"; then
- AC_DEFINE(APOP, 1,
- [Define to compile client-side support for apop into inc and msgchk.])dnl
- APOPLIB=md5.o
- enable_pop=yes
-fi
-AC_SUBST(APOPLIB)dnl
-
dnl Do you want to debug nmh?
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[enable nmh code debugging]))
masquerade="draft_from mmailid username_extension"
else
masquerade="$enable_masquerade"
- fi],
- masquerade="draft_from mmailid username_extension")
+ fi], [masquerade="draft_from mmailid username_extension"])
AC_SUBST(masquerade)dnl
dnl Do you want mhe support?
[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_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
- sasl_support=yes
-else
- sasl_support=no
-fi
-
-dnl Do you want client-side support for encryption with TLS?
-AC_ARG_WITH(tls, AS_HELP_STRING([--with-tls], [Enable TLS support]))
-if test x"$with_tls" != x -a x"$with_tls" != x"no"; then
- AC_DEFINE(TLS_SUPPORT, 1, [Support TLS for session encryption.])dnl
- tls_support=yes
-else
- tls_support=no
-fi
-
dnl What should be the default editor?
AC_ARG_WITH(editor,
AS_HELP_STRING([--with-editor=EDITOR],[specify the default editor]))
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 Do you want support for hesiod
-AC_ARG_WITH(hesiod,
- AS_HELP_STRING([--with-hesiod=DIR],[specify location of Hesiod]))
-if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
- AC_DEFINE(HESIOD,1,[Define this to compile support for using Hesiod.])dnl
-fi
-
-dnl After we know if we're including apop and kpop support, do pop stuff
-if test x"$enable_pop" = x"yes"; then
- AC_DEFINE(POP, 1,
- [Define this to compile client-side support for pop into inc and msgchk.])dnl
- POPLIB=popsbr.o
- POPSED='/^%nmhbeginpop%/d;/^%nmhendpop%/d'
-else
- POPSED='/^%nmhbeginpop%/,/^%nmhendpop%/d'
-fi
-AC_SUBST(POPLIB)dnl
-AC_SUBST(POPSED)dnl
-
dnl What method of locking to use?
AC_ARG_WITH(locking,
AS_HELP_STRING([--with-locking=@<:@dot|fcntl|flock|lockf@:>@],
AC_DEFINE(DOT_LOCKING)dnl
fi
-dnl What method of posting should post use?
-AC_ARG_WITH(mts,
- AS_HELP_STRING([--with-mts=@<:@smtp|sendmail@:>@],
- [specify the default mail transport agent/service]))
-
-if test x"$with_mts" = x"smtp"; then
- MTS="smtp"
-elif test x"$with_mts" = x"sendmail"; then
- MTS="sendmail"
-else
- MTS="smtp"
-fi
-AC_SUBST(MTS)dnl
-
-dnl Both the smtp and sendmail mail transport services use the smtp code
-AC_DEFINE(SMTPMTS, 1,
- [Define if you want SMTP (simple mail transport protocol) support.])dnl
-
dnl What should be the default pager?
AC_ARG_WITH(pager,
AS_HELP_STRING([--with-pager=PAGER],[specify the default pager]))
pagerpath="$with_pager"
fi
-dnl What should be the default mail server(s)?
-AC_ARG_WITH(smtpservers,
- AS_HELP_STRING([--with-smtpservers='SMTPSERVER1@<:@ SMTPSERVER2...@:>@'],
- [specify the default SMTP server(s) @<:@localhost@:>@]))
-if test -n "$with_smtpservers"; then
- smtpservers="$with_smtpservers"
-else
- smtpservers="localhost"
-fi
-AC_SUBST(smtpservers)dnl
-
dnl ----------------------------------------------------
-dnl Default location is /usr/local/nmh/{bin,etc,lib,man}
+dnl Default location is /usr/local/mmh/{bin,etc,lib,share/man}
dnl ----------------------------------------------------
-AC_PREFIX_DEFAULT(/usr/local/nmh)
+AC_PREFIX_DEFAULT(/usr/local/mmh)
+
dnl ------------------
dnl CHECK THE COMPILER
fi
-dnl ----------------
-dnl CHECK FOR HESIOD
-dnl ----------------
-if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
- if test x"$with_hesiod" != x"yes"; then
- HESIOD_INCLUDES="-I$with_hesiod/include"
- HESIOD_LIBS="-L$with_hesiod/lib"
- fi
- AC_CHECK_FUNC(res_send,
- [AC_CHECK_LIB(hesiod, hes_resolve,
- [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
- [AC_MSG_ERROR(Hesiod library not found)],
- $HESIOD_LIBS)],
- [AC_CHECK_LIB(hesiod, hes_resolve,
- [HESIOD_LIBS="$HESIOD_LIBS -lhesiod -lresolv"],
- [AC_MSG_ERROR(Hesiod library not found)],
- $HESIOD_LIBS -lresolv)])
-
-fi
-AC_SUBST(HESIOD_INCLUDES)dnl
-AC_SUBST(HESIOD_LIBS)dnl
-
-dnl --------------------
-dnl CHECK FOR CYRUS-SASL
-dnl --------------------
-
-AS_IF([test x"$sasl_support" = x"yes"],[
- AC_CHECK_HEADER([sasl/sasl.h], , [AC_MSG_ERROR([sasl.h not found])])
- AC_CHECK_LIB([sasl2], [sasl_client_new], ,
- [AC_MSG_ERROR([Cyrus SASL library not found])])])
-
-dnl -----------------
-dnl CHECK FOR OPENSSL
-dnl -----------------
-
-AS_IF([test x"$tls_support" = x"yes"],[
- AC_CHECK_HEADER([openssl/ssl.h], , [AC_MSG_ERROR([openssl/ssl.h not found])])
- AC_CHECK_LIB([crypto], [BIO_write], ,
- [AC_MSG_ERROR([OpenSSL crypto library not found])])
- AC_CHECK_LIB([ssl], [SSL_library_init], ,
- [AC_MSG_ERROR([OpenSSL library not found])])])
-
dnl ---------------------
dnl CHECK TERMCAP LIBRARY
dnl ---------------------
dnl OUTPUT MAKEFILES
dnl ----------------
AC_CONFIG_FILES(Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
- mts/Makefile mts/smtp/Makefile \
etc/Makefile docs/Makefile man/Makefile)
AC_CONFIG_COMMANDS([stamp],[test -z "$CONFIG_HEADERS" || echo > stamp-h])
AC_OUTPUT
eval "nmhlib=${libdir}"; eval "nmhlib=${nmhlib}"
eval "nmhman=${mandir}"; eval "nmhman=${nmhman}"
-pop_kinds=no
-if test x"$enable_pop" = x"yes"; then
- pop_kinds="yes ("
-
- if test x"$enable_apop" = x"yes"; then
- pop_kinds="${pop_kinds}APOP "
- fi
-
- pop_kinds="${pop_kinds}POP3)"
-fi
-
echo "
nmh configuration
-----------------
-nmh version : AC_PACKAGE_VERSION
-target os : ${target}
-compiler : ${CC}
-compiler flags : ${CFLAGS}
-linker flags : ${LDFLAGS}
-definitions : ${OURDEFS}
-source code location : ${srcdir}
-binary install path : ${nmhbin}
-library install path : ${nmhlib}
-config files install path : ${nmhsysconf}
-man page install path : ${nmhman}
-backup prefix : ${backup_prefix}
-transport system : ${MTS}
-file locking type : ${LOCKTYPE}
-default smtp servers : ${smtpservers}
-default editor : ${editorpath}
-default pager : ${pagerpath}
-email address masquerading : ${masquerade}
-pop is enabled : ${pop_kinds}
-SASL support : ${sasl_support}
-TLS support : ${tls_support}"
-echo ""
+nmh version : AC_PACKAGE_VERSION
+target os : ${target}
+compiler : ${CC}
+compiler flags : ${CFLAGS}
+linker flags : ${LDFLAGS}
+definitions : ${OURDEFS}
+source code location : ${srcdir}
+
+binary install path : ${nmhbin}
+library install path : ${nmhlib}
+config install path : ${nmhsysconf}
+man page install path : ${nmhman}
+
+default editor : ${editorpath}
+default pager : ${pagerpath}
+sendmail : ${sendmailpath}
+
+backup prefix : ${backup_prefix}
+file locking type : ${LOCKTYPE}
+email address masq. : ${masquerade}
+"