Use good m_ functions, because it smell like a flower, version 2.
[apps/madmutt.git] / configure.ac
index 9867df4..0685e44 100644 (file)
@@ -62,8 +62,6 @@ ac_aux_path_sendmail=/usr/sbin:/usr/lib
 AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, $PATH:$ac_aux_path_sendmail)
 AC_DEFINE_UNQUOTED(SENDMAIL,"$ac_cv_path_SENDMAIL",[ Where to find sendmail on your system. ])
 
-OPS="\$(srcdir)/OPS \$(srcdir)/OPS.PGP \$(srcdir)/OPS.SMIME \$(srcdir)/OPS.CRYPT"
-
 dnl ---------------- gpgme ----------------
 
 AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),[
@@ -77,16 +75,8 @@ AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),[
     fi
 ])
 
-dnl ---------------- mixmaster ----------------
-
-AC_ARG_WITH(mixmaster, AC_HELP_STRING([--with-mixmaster[=PATH]], [Include Mixmaster support]), [
-    MIXMASTER=${withval:-"mixmaster"}
-    OPS="$OPS \$(srcdir)/OPS.MIX"
-    MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS remailer.o"
-    AC_DEFINE_UNQUOTED(MIXMASTER,"$MIXMASTER",[Where to find mixmaster on your system.])
-])
-
-AC_SUBST([OPS])
+AC_PATH_PROG(MIXMASTER, mixmaster, mixmaster)
+AC_DEFINE_UNQUOTED(MIXMASTER,"$MIXMASTER",[Where to find mixmaster on your system.])
 
 AC_PATH_PROG(ISPELL, ispell, no)
 if test $ISPELL != no; then
@@ -250,7 +240,6 @@ if test x$with_homespool != x; then
         relative the the home directory.
         use: configure --with-homespool=FILE
     ])
-    AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
     mutt_cv_setgid=no
 else
     AC_ARG_WITH(mailpath, AC_HELP_STRING([--with-mailpath=DIR], [Directory where spool mailboxes are located]),
@@ -285,9 +274,7 @@ int main (int argc, char **argv)
 }], mutt_cv_worldwrite=yes, mutt_cv_worldwrite=no, mutt_cv_worldwrite=no)])
 
         mutt_cv_setgid=no
-        if test $mutt_cv_worldwrite = yes; then
-                AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
-        else
+        if test $mutt_cv_worldwrite != yes; then
                 AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, mutt_cv_groupwrite, [AC_TRY_RUN([#include <sys/types.h>
 #include <sys/stat.h>
 
@@ -301,7 +288,6 @@ int main (int argc, char **argv)
 }], mutt_cv_groupwrite=yes, mutt_cv_groupwrite=no, mutt_cv_groupwrite=no)])
 
         if test $mutt_cv_groupwrite = yes; then
-            AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
             AC_DEFINE(USE_SETGID,1,[ Define if mutt should run setgid "mail". ])
             mutt_cv_setgid=yes
         fi
@@ -339,8 +325,6 @@ AC_ARG_ENABLE(nntp, AC_HELP_STRING([--enable-nntp],[Enable NNTP support]),[
 ])
 AM_CONDITIONAL(BUILD_NNTP, test x$need_nntp = xyes)
 
-dnl -- end socket dependencies --
-
 AC_MSG_CHECKING([for socklen_t])
 AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_MSG_RESULT([yes]),
         AC_MSG_RESULT([no])
@@ -351,30 +335,18 @@ AC_CHECK_FUNCS(getaddrinfo)
 
 dnl -- imap dependencies --
 
-AC_ARG_WITH(gss, AC_HELP_STRING([--with-gss[=PFX]], [Compile in GSSAPI authentication for IMAP]),
-    gss_prefix="$withval", gss_prefix="no")
-if test "$gss_prefix" != "no"
-then
-    MUTT_AM_PATH_GSSAPI(gss_prefix)
-    AC_MSG_CHECKING(GSSAPI implementation)
-    AC_MSG_RESULT($GSSAPI_IMPL)
-    if test "$GSSAPI_IMPL" = "none"
-    then
-      AC_CACHE_SAVE
-      AC_MSG_RESULT([GSSAPI libraries not found])
-    fi
-    if test "$GSSAPI_IMPL" = "Heimdal"
-    then
-      AC_DEFINE(HAVE_HEIMDAL,1,[ Define if your GSSAPI implementation is Heimdal ])
+AC_ARG_WITH(gss, AC_HELP_STRING([--with-gss], [Compile in GSSAPI authentication for IMAP]),[
+    if test x$with_gss != xno; then
+        PKG_CHECK_MODULES(GSSAPI,libgssapi,[
+            CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS"
+            MUTTLIBS="$MUTTLIBS $GSSAPI_LIBS"
+            AC_DEFINE(USE_GSS,1,[ Define if you have GSSAPI libraries available ])
+            AC_CHECK_HEADERS(xom.h)
+        ],[
+           AC_MSG_ERROR([could not find libgssapi])
+        ])
     fi
-    CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS"
-    MUTTLIBS="$MUTTLIBS $GSSAPI_LIBS"
-    AC_DEFINE(USE_GSS,1,[ Define if you have GSSAPI libraries available ])
-    need_gss="yes"
-fi
-AM_CONDITIONAL(USE_GSS, test x$need_gss = xyes)
-
-dnl -- end imap dependencies --
+])
 
 AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl[=PFX]], [Compile in SSL support for POP/IMAP]),
 [   if test "$with_ssl" != "no"; then
@@ -435,7 +407,7 @@ AC_ARG_WITH(sasl2, AC_HELP_STRING([--with-sasl2[=PFX]],
 ])
 AM_CONDITIONAL(USE_SASL, test x$need_sasl = xyes)
 
-AC_ARG_WITH(idn, AC_HELP_STRING([--with-idn=[PFX]], [Use GNU libidn for domain names]),[
+AC_ARG_WITH(idn, AC_HELP_STRING([--with-idn], [Use GNU libidn for domain names]),[
     if test x$with_idn != xno ; then
         PKG_CHECK_MODULES(IDN,libidn,[
             if $PKG_CONFIG --atleast-version=0.6; then
@@ -471,11 +443,6 @@ if test x$ac_cv_dirent_d_ino = xyes ; then
 fi
 AC_MSG_RESULT($ac_cv_dirent_d_ino)
 
-AC_ARG_ENABLE(buffy-size, AC_HELP_STRING([--enable-buffy-size], [Use file size attribute instead of access time]),
-        [if test x$enableval = xyes; then
-                AC_DEFINE(BUFFY_SIZE,1,[ Define to enable the "buffy_size" feature. ])
-        fi])
-
 dnl -- start cache --
 AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], [Enable header caching]),
 [if test x$enableval = xyes; then
@@ -645,8 +612,7 @@ fi # libiconv
 
 dnl -- locales --
 
-AC_CHECK_HEADERS(wchar.h)
-AC_CHECK_HEADERS(wctype.h)
+AC_CHECK_HEADERS(locale.h wchar.h wctype.h)
 AC_CHECK_FUNCS(iswalnum iswalpha  iswcntrl iswdigit)
 AC_CHECK_FUNCS(iswgraph iswlower iswprint iswpunct iswspace iswupper)
 AC_CHECK_FUNCS(iswxdigit towupper towlower)
@@ -752,9 +718,9 @@ AC_OUTPUT(Makefile
           lib-mime/Makefile
           lib-crypt/Makefile
           lib-hash/Makefile
+          lib-mx/Makefile
           lib-sys/Makefile
           lib-ui/Makefile
-          lib/Makefile
           imap/Makefile
           pop/Makefile
           nntp/Makefile