endif
SUBDIRS = intl m4 po $(XXXXXXXXXXXX_doc) contrib \
- lib-lib lib-mime lib-crypt lib-hash lib-ui lib \
+ lib-lib lib-mime lib-crypt lib-hash lib-network lib-ui lib \
pop imap $(NNTP_SUBDIR)
BUILT_SOURCES = keymap_defs.h version.h
pager.c pattern.c postpone.c query.c \
recvattach.c recvcmd.c rfc1524.c rfc3676.c \
score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
- thread.c url.c utf8.c wcwidth.c \
- account.c mutt_socket.c mutt_tunnel.c
+ thread.c url.c utf8.c wcwidth.c account.c
madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
-Limap -limap -Lpop -lpop $(LIBNNTP) \
-Llib-lib -llib -Llib-mime -lmime -Llib-crypt -lcrypt -Llib-hash -lhash \
- -Llib-ui -lui \
+ -Llib-network -lnetwork -Llib-ui -lui \
-Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
madmutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
CPPFLAGS=@CPPFLAGS@ -I$(includedir)
EXTRA_madmutt_SOURCES = \
- account.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
- mutt_tunnel.c resize.c dotlock.c remailer.c \
+ account.c mutt_sasl.c resize.c dotlock.c remailer.c \
alias.h browser.h mbyte.h remailer.h url.h state.h \
mutt_idna.h mutt_libesmtp.c sidebar.h state.h
dotlock.h functions.def gen_defs \
recvattach.h handler.h thread.h \
globals.h history.h init.h keymap.h mutt_crypt.h \
- mime.h mutt.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
- mbox.h mh.h mx.h pager.h protos.h rfc1524.h \
+ mime.h mutt.h mutt_sasl.h mbox.h mh.h mx.h pager.h protos.h rfc1524.h \
rfc3676.h sort.h mime.types autogen.sh \
OPS.MIX remailer.c remailer.h browser.h state.h \
mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h madmuttrc.head madmuttrc \
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
- if test "$with_ssl" != "yes"
- then
- LDFLAGS="$LDFLAGS -L$withval/lib"
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- fi
- saved_LIBS="$LIBS"
-
- AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL library]))
- AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL library]), -lcrypto)
+[ if test "$with_ssl" != "no"; then
+ if test "$with_ssl" != "yes"; then
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ fi
+ saved_LIBS="$LIBS"
- AC_CHECK_FUNCS(RAND_status RAND_egd)
+ AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL library]))
+ AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL library]), -lcrypto)
- AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ])
- LIBS="$saved_LIBS"
- MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o"
- need_ssl=yes
+ AC_CHECK_FUNCS(RAND_status RAND_egd)
- fi
+ AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ])
+ LIBS="$saved_LIBS"
+ MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
+ need_ssl=yes
+ fi
])
AC_ARG_WITH([gnutls], AC_HELP_STRING([--with-gnutls], [Enable SSL support using gnutls]),
CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS"
MUTTLIBS="$MUTTLIBS $LIBGNUTLS_LIBS"
AC_DEFINE(USE_GNUTLS, 1, [Define if you want support for SSL via the gnutls library.])
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o"
need_ssl=yes],
[AC_MSG_ERROR([could not find libgnutls])
])
fi
AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes)
+AC_SUBST(MUTT_SSL_OBJECTS)
AC_ARG_WITH(sasl2, AC_HELP_STRING([--with-sasl2[=PFX]],
[Use Cyrus SASL library version 2 for POP/IMAP authentication]),[
saved_LIBS="$LIBS"
- AC_CHECK_LIB(sasl2, sasl_client_init,,
- AC_MSG_ERROR([could not find libsasl2]),)
+ AC_CHECK_LIB(sasl2, sasl_client_init,,AC_MSG_ERROR([could not find libsasl2]))
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl.o"
MUTTLIBS="$MUTTLIBS -lsasl2"
lib-mime/Makefile
lib-crypt/Makefile
lib-hash/Makefile
+ lib-network/Makefile
lib-ui/Makefile
lib/Makefile
imap/Makefile
#include "message.h"
#include "imap_private.h"
#if defined(USE_SSL) || defined(USE_GNUTLS)
-# include "mutt_ssl.h"
+# include <lib-network/mutt_ssl.h>
#endif
#include "buffy.h"
#include <lib-ui/curses.h>
#include "imap.h"
-#include "mutt_socket.h"
+#include <lib-network/mutt_socket.h>
/* -- symbols -- */
#define IMAP_PORT 143
#include "mx.h" /* for M_IMAP */
#include "url.h"
#include "imap_private.h"
-#include "mutt_ssl.h"
+#include <lib-network/mutt_ssl.h>
#include <lib-lib/macros.h>
#include "lib/debug.h"
#include "mutt_idna.h"
#if defined(USE_SSL) || defined(USE_GNUTLS)
-#include "mutt_ssl.h"
+#include <lib-network/mutt_ssl.h>
#endif
#if defined (USE_LIBESMTP) && (defined (USE_SSL) || defined (USE_GNUTLS))
** files when the header cache is in use. This incurs one \fTstat(2)\fP per
** message every time the folder is opened.
*/
-#if HAVE_GDBM || HAVE_DB4
+#if defined(HAVE_GDBM) || defined(HAVE_DB4)
{"header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, "16384"},
/*
** .pp
--- /dev/null
+noinst_LIBRARIES = libnetwork.a
+
+libnetwork_a_SOURCES = mutt_socket.h mutt_tunnel.c mutt_ssl.h \
+ mutt_socket.c mutt_tunnel.h mutt_ssl.c mutt_ssl_gnutls.c
+
+noinst_HEADERS = mutt_socket.h mutt_tunnel.c mutt_ssl.h
+
+-include ../cflags.mk
#include "mutt_socket.h"
-#if defined (USE_SSL) || defined (USE_GNUTLS)
+#if defined(USE_SSL) || defined(USE_GNUTLS)
int mutt_ssl_starttls (CONNECTION * conn);
int mutt_ssl_socket_setup (CONNECTION * conn);
#include "mutt.h"
#include "account.h"
#include "mutt_sasl.h"
-#include "mutt_socket.h"
+#include <lib-network/mutt_socket.h>
#include "lib/debug.h"
#include <sasl/sasl.h>
-#include "mutt_socket.h"
+#include <lib-network/mutt_socket.h>
int mutt_sasl_client_new (CONNECTION *, sasl_conn_t **);
sasl_callback_t *mutt_sasl_get_callbacks (ACCOUNT *);
#ifndef _NNTP_H_
#define _NNTP_H_ 1
-#include "mutt_socket.h"
+#include <lib-network/mutt_socket.h>
#include "mx.h"
#include <time.h>
#include <lib-ui/curses.h>
#include "mx.h"
-#include "mutt_socket.h"
+#include <lib-network/mutt_socket.h>
#define POP_PORT 110
#define POP_SSL_PORT 995
#include "url.h"
#include "pop.h"
#if defined (USE_SSL) || defined (USE_GNUTLS)
-# include "mutt_ssl.h"
+# include <lib-network/mutt_ssl.h>
#endif
#include "lib/debug.h"