AC_GNU_SOURCE
-ifdef([AC_LIBOBJ], , [define([AC_LIBOBJ], [LIB[]OBJS="$LIBOBJS $1.o"])])
-
ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW zh_CN pt_BR eo gl sv da lt tr ja hu et ca bg"
AC_CANONICAL_HOST
AC_DECL_SYS_SIGLIST
AC_TYPE_PID_T
-dnl AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_FUNCS(fgetpos memmove setegid srand48 strerror)
AC_REPLACE_FUNCS(strcasecmp setenv)
AC_CHECK_HEADERS(getopt.h)
fi
-dnl SCO uses chsize() instead of ftruncate()
-AC_CHECK_FUNCS(ftruncate, , [AC_CHECK_LIB(x, chsize)])
-
-dnl SCO has strftime() in libintl
-AC_CHECK_FUNCS(strftime, , [AC_CHECK_LIB(intl, strftime)])
-
-dnl AIX may not have fchdir()
-AC_CHECK_FUNCS(fchdir, , [mutt_cv_fchdir=no])
-
AC_ARG_WITH(regex, AC_HELP_STRING([--with-regex], [Use the GNU regex library]),
[mutt_cv_regex=yes],
[AC_CHECK_FUNCS(regcomp, mutt_cv_regex=no, mutt_cv_regex=yes)])
if test $mutt_cv_regex = yes; then
AC_DEFINE(USE_GNU_REGEX,1,[ Define if you want to use the included regex.c. ])
- AC_LIBOBJ(regex)
+ LIBOBJS="$LIBOBJS regex.o"
fi
AC_SUBST(DOTLOCK_GROUP)
AC_SUBST(DOTLOCK_PERMISSION)
-need_socket="no"
-
dnl -- socket dependencies --
AC_ARG_ENABLE(pop, AC_HELP_STRING([--enable-pop], [Enable POP3 support]),
AC_DEFINE(USE_POP,1,[ Define if you want support for the POP3 protocol. ])
LIBPOP="-Lpop -lpop"
LIBPOPDEPS="\$(top_srcdir)/pop/pop.h pop/libpop.a"
- need_socket="yes"
need_pop="yes"
need_md5="yes"
fi
LIBIMAP="-Limap -limap"
LIBIMAPDEPS="\$(top_srcdir)/imap/imap.h imap/libimap.a"
need_imap="yes"
- need_socket="yes"
need_md5="yes"
fi
])
LIBNNTP="-Lnntp -lnntp"
LIBNNTPDEPS="\$(top_srcdir)/nntp/nntp.h nntp/libnntp.a"
need_nntp="yes"
- need_socket="yes"
fi
])
AM_CONDITIONAL(BUILD_NNTP, test x$need_nntp = xyes)
dnl -- end socket dependencies --
-if test "$need_socket" = "yes"
-then
- AC_MSG_CHECKING([for socklen_t])
- AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- AC_DEFINE(socklen_t,int, [ Define to 'int' if <sys/socket.h> doesn't have it. ]))
- AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
- AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
- AC_CHECK_FUNCS(getaddrinfo)
- AC_DEFINE(USE_SOCKET,1,
- [ Include code for socket support. Set automatically if you enable POP3 or IMAP ])
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS account.o mutt_socket.o mutt_tunnel.o"
-fi
+AC_MSG_CHECKING([for socklen_t])
+AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE(socklen_t,int, [ Define to 'int' if <sys/socket.h> doesn't have it. ]))
+AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
+AC_CHECK_FUNCS(getaddrinfo)
dnl -- 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
- if test "$need_socket" != "yes"; then
- AC_MSG_ERROR([SSL support is only useful with POP or IMAP support])
- fi
-
if test "$with_ssl" != "yes"
then
LDFLAGS="$LDFLAGS -L$withval/lib"
[gnutls_prefix="$withval"], [gnutls_prefix="no"])
if test "$gnutls_prefix" != "no"
then
- if test "$need_socket" != "yes"
- then
- AC_MSG_ERROR([SSL support is only useful with POP or IMAP support])
- fi
if test x"$need_ssl" = x"yes"
then
AC_MSG_ERROR([Only either OpenSSL or GNUTLS may be used])
# ifndef USE_SSL
# define USE_SSL
# endif
-# ifndef USE_SOCKET
-# define USE_SOCKET
-# endif
# ifndef USE_LIBESMTP
# define USE_LIBESMTP
# endif
** was connection lost.
*/
#endif
-#ifdef USE_SOCKET
{ "net_inc", DT_NUM, R_NONE, UL &NetInc, "10" },
/*
** .pp
** .pp
** See also ``$$read_inc'' and ``$$write_inc''.
*/
-#endif
{"pager", DT_PATH, R_NONE, UL &Pager, "builtin"},
/*
** .pp
** in the mailbox specified by this variable. Also see the ``$$postpone''
** variable.
*/
-#ifdef USE_SOCKET
{"preconnect", DT_STR, R_NONE, UL &Preconnect, "" },
/*
** .pp
** \fBNote:\fP For this example to work, you must be able to log in to the
** remote machine without having to enter a password.
*/
-#endif /* USE_SOCKET */
{"print", DT_QUAD, R_NONE, OPT_PRINT, "ask-no" },
/*
** .pp
** \fBNote\fP: When you delete a message in the trash folder, it is really
** deleted, so that there is no way to recover mail.
*/
-#ifdef USE_SOCKET
{"tunnel", DT_STR, R_NONE, UL &Tunnel, "" },
/*
** .pp
** \fBNote:\fP For this example to work you must be able to log in to the remote
** machine without having to enter a password.
*/
-#endif
{"umask", DT_NUM, R_NONE, UL &Umask, "0077" },
/*
** .pp
{"attachments", parse_attachments, 0 },
{"unattachments",parse_unattachments,0 },
{"unalternates", parse_unalternates, 0},
-#ifdef USE_SOCKET
{"account-hook", mutt_parse_hook, M_ACCOUNTHOOK},
-#endif
{"alias", parse_alias, 0},
{"auto_view", parse_list, UL &AutoViewList},
{"alternative_order", parse_list, UL &AlternativeOrderList},