X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=configure.in;h=e93e173c9a80ff2211ec6315244e503b20d44d9a;hp=0b2a73c472a3e333f35e540d721ff46dbedd3552;hb=a01a41d031c796b526329a4170eb23f0ac93b949;hpb=27844443b4759689ecbc2eb4519c0fe83ebda473 diff --git a/configure.in b/configure.in index 0b2a73c..e93e173 100644 --- a/configure.in +++ b/configure.in @@ -1,15 +1,9 @@ dnl dnl configure.in -- autoconf template for nmh dnl -dnl $Id$ -dnl -dnl 2.13 definitely chokes; 2.53 is the earliest version I've tested. -dnl 2.58 needed for help string macro but that only affects help output -dnl 2.50 is the major breakpoint between the old autoconf and the new, -dnl so require that. If there are bug reports about 2.50-2.52 not working -dnl we can always move this up a little. -AC_PREREQ(2.50) +dnl Move this up a bit +AC_PREREQ(2.61) AC_INIT(nmh, m4_normalize(m4_include([VERSION]))) AC_CONFIG_SRCDIR(h/nmh.h) @@ -43,17 +37,6 @@ dnl -------------------------- 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])) @@ -70,8 +53,7 @@ AC_ARG_ENABLE(masquerade, 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? @@ -106,16 +88,29 @@ 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=DIR], - [specify location of Cyrus SASL library])) +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 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])) @@ -135,23 +130,6 @@ fi 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 Do you want client-side support for kpop -AC_ARG_WITH(krb4, AS_HELP_STRING([--with-krb4=DIR], - [specify location of Kerberos V4 for KPOP support])) -if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then - enable_pop=yes - AC_DEFINE(KPOP, 1, - [Define to compile client-side support for kpop (kerberized pop) into inc and msgchk.])dnl - AC_DEFINE(KPOP_PRINCIPAL, "pop", [Define this to "pop" when using Kerberos V4])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, @@ -520,14 +498,6 @@ AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \ sighold sigrelse writev lstat uname tzset killpg mkstemp \ getutent nl_langinfo mbtowc wcwidth) -dnl solaris has these in the nsl library -AC_SEARCH_LIBS(gethostbyname, nsl, - [AC_DEFINE(HAVE_GETHOSTBYNAME,1, - [Define to 1 if you have the `gethostbyname' function.])]) -AC_SEARCH_LIBS(sethostent, nsl, - [AC_DEFINE(HAVE_SETHOSTENT,1, - [Define to 1 if you have the `sethostent' function.])]) - dnl sigsetjmp may be a macro AC_MSG_CHECKING(for sigsetjmp) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], @@ -690,88 +660,25 @@ else 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)]) +dnl -------------------- +dnl CHECK FOR CYRUS-SASL +dnl -------------------- -fi -AC_SUBST(HESIOD_INCLUDES)dnl -AC_SUBST(HESIOD_LIBS)dnl - -dnl ---------------------------------- -dnl CHECK FOR KRB4 (Kerberos4 support) -dnl ---------------------------------- -if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then - if test x"$with_krb4" != x"yes"; then - KRB4_INCLUDES="-I$with_krb4/include" - if test -d "$with_krb4/include/kerberosIV"; then - KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV" - fi - KRB4_LIBS="-L$with_krb4/lib" - elif test -d /usr/include/kerberosIV; then - KRB4_INCLUDES="-I/usr/include/kerberosIV" - fi -dnl First, check if we have -lk5crypto, since that means we have a recent krb5 - - AC_CHECK_LIB(k5crypto, krb5_encrypt, - [AC_CHECK_LIB(krb4, krb_rd_req, - [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], - [AC_MSG_ERROR(Kerberos 4 compatibility libraries not found)], - $KRB4_LIBS -ldes425 -lkrb5 -lk5crypto -lcom_err)], - - [AC_CHECK_LIB(krb4, krb_rd_req, - [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"], - [AC_CHECK_LIB(krb, krb_rd_req, - [KRB4_LIBS="$KRB4_LIBS -lkrb -ldes"], - [AC_MSG_ERROR(Kerberos 4 libraries not found)], - $KRB4_LIBS -ldes)], - $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err)], - $KRB4_LIBS) +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])])]) -fi -AC_SUBST(KRB4_INCLUDES)dnl -AC_SUBST(KRB4_LIBS)dnl +dnl ----------------- +dnl CHECK FOR OPENSSL +dnl ----------------- -dnl -------------------- -dnl CHECK FOR CYRUS SASL -dnl -------------------- -if test x"$with_cyrus_sasl" != x -a x"$with_cyrus_sasl" != x"no"; then - if test x"$with_cyrus_sasl" != x"yes"; then - SASL_INCLUDES="-I$with_cyrus_sasl/include" - SASL_LIBS="-L$with_cyrus_sasl/lib" - - dnl Do OS-specific hardcoding of SASL shared library path into executables, - dnl so user isn't forced to set environment variables like Solaris' - dnl LD_LIBRARY_PATH. - case "$target_os" in - solaris*) - SASL_LIBS="$SASL_LIBS -R$with_cyrus_sasl/lib" - ;; - esac - fi - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $SASL_LIBS" - AC_CHECK_LIB(sasl2, sasl_client_new, - [SASL_LIBS="$SASL_LIBS -lsasl2"], - [AC_MSG_ERROR(Cyrus SASL library not found)]) - LDFLAGS="$save_LDFLAGS" -fi -AC_SUBST(SASL_INCLUDES)dnl -AC_SUBST(SASL_LIBS)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 @@ -950,6 +857,8 @@ if test "$nmh_cv_union_wait" = yes; then fi AC_MSG_RESULT($nmh_cv_union_wait) +CHECK_TYPE_STRUCT_DIRENT_D_TYPE() + dnl ------------- dnl CHECK SIGNALS dnl ------------- @@ -1058,11 +967,17 @@ AC_CONFIG_FILES(Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \ AC_CONFIG_COMMANDS([stamp],[test -z "$CONFIG_HEADERS" || echo > stamp-h]) AC_OUTPUT -dnl Umm, what's the point of these assignments?? -- -eval "nmhbin=${bindir}"; eval "nmhbin2=${nmhbin}" -eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf2=${nmhsysconf}" -eval "nmhlib=${libdir}"; eval "nmhlib2=${nmhlib}" -eval "nmhman=${mandir}" +dnl These odd looking assignments are done to expand out unexpanded +dnl variables in bindir et al (for instance mandir is '${datarootdir}/man', +dnl but expanding that gives '${prefix}/share/man', so we need to expand +dnl again to get the final answer. +dnl We only use the expanded versions to print the install paths in +dnl the final summary and should use them nowhere else (see the autoconf +dnl docs for the rationale for bindir etc being unexpanded). +eval "nmhbin=${bindir}"; eval "nmhbin=${nmhbin}" +eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf=${nmhsysconf}" +eval "nmhlib=${libdir}"; eval "nmhlib=${nmhlib}" +eval "nmhman=${mandir}"; eval "nmhman=${nmhman}" pop_kinds=no if test x"$enable_pop" = x"yes"; then @@ -1072,10 +987,6 @@ if test x"$enable_pop" = x"yes"; then pop_kinds="${pop_kinds}APOP " fi - if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then - pop_kinds="${pop_kinds}KPOP " - fi - pop_kinds="${pop_kinds}POP3)" fi @@ -1089,9 +1000,9 @@ compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} definitions : ${OURDEFS} source code location : ${srcdir} -binary install path : ${nmhbin2} -libary install path : ${nmhlib2} -config files install path : ${nmhsysconf2} +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} @@ -1101,5 +1012,6 @@ default editor : ${editorpath} default pager : ${pagerpath} email address masquerading : ${masquerade} pop is enabled : ${pop_kinds} -SASL support : ${sasl_support}" +SASL support : ${sasl_support} +TLS support : ${tls_support}" echo ""