From: Damien Riegel Date: Tue, 2 May 2017 01:59:13 +0000 (-0400) Subject: configure: drop need_socket X-Git-Tag: neomutt-20170526~31^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=057a07f8152e45805f2dae3bf0f1b89e611ede67;p=neomutt configure: drop need_socket Socket files are now always integrated in the build. --- diff --git a/Makefile.am b/Makefile.am index a43879ce0..cbf7dafa9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,13 +32,13 @@ distdir = neo$(PACKAGE)-$(VERSION) BUILT_SOURCES = keymap_defs.h keymap_alldefs.h patchlist.c git_ver.h conststrings.c bin_PROGRAMS = mutt $(DOTLOCK_TARGET) $(PGPAUX_TARGET) -mutt_SOURCES = addrbook.c alias.c ascii.c attach.c base64.c bcache.c browser.c buffer.c \ +mutt_SOURCES = account.c addrbook.c alias.c ascii.c attach.c base64.c bcache.c browser.c buffer.c \ buffy.c charset.c color.c commands.c complete.c compose.c compress.c copy.c \ crypt_mod.c crypt_mod.h crypt.c cryptglue.c curs_lib.c curs_main.c \ date.c edit.c editmsg.c enter.c filter.c flags.c from.c getdomain.c \ group.c handler.c hash.c hdrline.c headers.c help.c history.c hook.c \ init.c keymap.c lib.c main.c mbox.c mbyte.c md5.c menu.c mh.c muttlib.c \ - mutt_idna.c mutt_sasl_plain.c mx.c pager.c parse.c pattern.c \ + mutt_idna.c mutt_sasl_plain.c mutt_socket.c mutt_tunnel.c mx.c pager.c parse.c pattern.c \ postpone.c query.c recvattach.c recvcmd.c rfc1524.c rfc2047.c \ rfc2231.c rfc3676.c rfc822.c safe_asprintf.c score.c send.c sendlib.c \ sidebar.c signal.c sort.c status.c system.c thread.c url.c version.c @@ -59,12 +59,12 @@ DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \ AM_CPPFLAGS=-I. -I$(top_srcdir) $(GPGME_CFLAGS) -EXTRA_mutt_SOURCES = account.c browser.h \ +EXTRA_mutt_SOURCES = browser.h \ crypt_gpgme.c crypt_mod_pgp_classic.c crypt_mod_pgp_gpgme.c \ crypt_mod_smime_classic.c crypt_mod_smime_gpgme.c dotlock.c \ gnupgparse.c mbyte.h mutt_idna.c mutt_idna.h \ - mutt_lua.c mutt_sasl.c mutt_notmuch.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \ - mutt_tunnel.c newsrc.c nntp.c pgp.c pgpinvoke.c pgpkey.c pgplib.c \ + mutt_lua.c mutt_sasl.c mutt_notmuch.c mutt_ssl.c mutt_ssl_gnutls.c \ + newsrc.c nntp.c pgp.c pgpinvoke.c pgpkey.c pgplib.c \ pgpmicalg.c pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c \ remailer.h resize.c sha1.c smime.c smtp.c url.h utf8.c wcwidth.c diff --git a/configure.ac b/configure.ac index 51d833bbe..96bc6267a 100644 --- a/configure.ac +++ b/configure.ac @@ -246,8 +246,9 @@ AS_IF([test x$use_smime != "xno"], [ AC_DEFINE(USE_COMPRESSED, 1, [Define to enable compressed folders support.]) AC_DEFINE(USE_IMAP, 1, [Define if you want support for the IMAP protocol.]) -need_socket="yes" AC_DEFINE(USE_SIDEBAR, 1, [Define if you want support for the sidebar.]) +AC_DEFINE(USE_SOCKET,1, + [ Include code for socket support. Set automatically if you enable POP3 or IMAP ]) dnl --enable-lua AS_IF([test x$use_lua = "xyes"], [ @@ -496,8 +497,6 @@ AC_ARG_WITH(domain, AS_HELP_STRING([--with-domain=DOMAIN],[Specify your DNS doma fi fi]) -need_socket="no" - dnl -- socket dependencies -- dnl getaddrinfo/getaddrinfo_a is used by getdomain.c, and requires libnsl and @@ -511,31 +510,22 @@ AS_IF([test x$use_pop = "xyes"], [ AC_DEFINE(USE_POP, 1, [Define if you want support for the POP3 protocol.]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o" need_pop="yes" - need_socket="yes" ]) AS_IF([test x$use_nntp = "xyes"], [ AC_DEFINE(USE_NNTP, 1, [Define if you want support for the NNTP protocol.]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS nntp.o newsrc.o" need_nntp="yes" - need_socket="yes" ]) AS_IF([test x$use_smtp = "xyes"], [ AC_DEFINE(USE_SMTP, 1, [Include internal SMTP relay support]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smtp.o" - need_socket="yes" ]) dnl -- end socket dependencies -- -if test "$need_socket" = "yes"; then - 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 - dnl -- imap dependencies -- AC_ARG_WITH(gss, AS_HELP_STRING([--with-gss@<:@=PFX@:>@],[Compile in GSSAPI authentication for IMAP]), @@ -562,79 +552,71 @@ dnl -- end imap dependencies -- AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl@<:@=PFX@:>@],[Enable TLS support using OpenSSL]), [ if test "$with_ssl" != "no"; then - if test "$need_socket" != "yes"; then - AC_MSG_WARN([SSL support is only useful with POP, IMAP or SMTP support]) - else - if test "$with_ssl" != "yes"; then - LDFLAGS="$LDFLAGS -L$withval/lib" - CPPFLAGS="$CPPFLAGS -I$withval/include" - fi - saved_LIBS="$LIBS" - - crypto_libs="" - AC_CHECK_LIB(z, deflate, [crypto_libs=-lz]) - AC_CHECK_LIB(crypto, X509_STORE_CTX_new, - [crypto_libs="-lcrypto $crypto_libs"], - AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) - AC_CHECK_LIB(ssl, SSL_new,, - AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) - - LIBS="$LIBS $crypto_libs" - AC_CHECK_FUNCS(RAND_status RAND_egd) - AC_CHECK_DECLS([SSL_set_mode, SSL_MODE_AUTO_RETRY],, - AC_MSG_ERROR([Unable to find decent SSL header]), [[#include ]]) - - AC_CHECK_DECL([X509_V_FLAG_PARTIAL_CHAIN], - AC_DEFINE(HAVE_SSL_PARTIAL_CHAIN,1,[ Define if OpenSSL supports partial chains. ]),, - [[#include ]]) - - AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) - AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via OpenSSL. ]) - LIBS="$saved_LIBS" - MUTTLIBS="$MUTTLIBS -lssl $crypto_libs" - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o" - need_ssl=yes + if test "$with_ssl" != "yes"; then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" fi + saved_LIBS="$LIBS" + + crypto_libs="" + AC_CHECK_LIB(z, deflate, [crypto_libs=-lz]) + AC_CHECK_LIB(crypto, X509_STORE_CTX_new, + [crypto_libs="-lcrypto $crypto_libs"], + AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) + AC_CHECK_LIB(ssl, SSL_new,, + AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) + + LIBS="$LIBS $crypto_libs" + AC_CHECK_FUNCS(RAND_status RAND_egd) + AC_CHECK_DECLS([SSL_set_mode, SSL_MODE_AUTO_RETRY],, + AC_MSG_ERROR([Unable to find decent SSL header]), [[#include ]]) + + AC_CHECK_DECL([X509_V_FLAG_PARTIAL_CHAIN], + AC_DEFINE(HAVE_SSL_PARTIAL_CHAIN,1,[ Define if OpenSSL supports partial chains. ]),, + [[#include ]]) + + AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) + AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via OpenSSL. ]) + LIBS="$saved_LIBS" + MUTTLIBS="$MUTTLIBS -lssl $crypto_libs" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o" + need_ssl=yes fi ]) AC_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls@<:@=PFX@:>@],[enable TLS support using gnutls]), [gnutls_prefix="$withval"], [gnutls_prefix="no"]) if test "$gnutls_prefix" != "no" && test x"$need_ssl" != xyes; then - if test "$need_socket" != "yes"; then - AC_MSG_WARN([SSL support is only useful with POP, IMAP or SMTP support]) - else - if test "$gnutls_prefix" != "yes"; then - LDFLAGS="$LDFLAGS -L$gnutls_prefix/lib" - CPPFLAGS="$CPPFLAGS -I$gnutls_prefix/include" - fi - saved_LIBS="$LIBS" - - AC_CHECK_LIB(gnutls, gnutls_check_version, - [dnl GNUTLS found - AC_CHECK_DECLS([GNUTLS_VERIFY_DISABLE_TIME_CHECKS], [], [], - [[#include ]]) - - LIBS="$LIBS -lgnutls" - AC_CHECK_FUNCS(gnutls_priority_set_direct) - AC_CHECK_TYPES([gnutls_certificate_credentials_t, - gnutls_certificate_status_t, - gnutls_datum_t, - gnutls_digest_algorithm_t, - gnutls_session_t, - gnutls_transport_ptr_t, - gnutls_x509_crt_t], [], [], [[#include ]]) - - LIBS="$saved_LIBS" - MUTTLIBS="$MUTTLIBS -lgnutls" - - AC_DEFINE(USE_SSL, 1, [ Define if you want support for SSL. ]) - AC_DEFINE(USE_SSL_GNUTLS, 1, [ Define if you want support for SSL via GNUTLS. ]) - - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o" - need_ssl=yes], - [AC_MSG_ERROR([could not find libgnutls])]) + if test "$gnutls_prefix" != "yes"; then + LDFLAGS="$LDFLAGS -L$gnutls_prefix/lib" + CPPFLAGS="$CPPFLAGS -I$gnutls_prefix/include" fi + saved_LIBS="$LIBS" + + AC_CHECK_LIB(gnutls, gnutls_check_version, + [dnl GNUTLS found + AC_CHECK_DECLS([GNUTLS_VERIFY_DISABLE_TIME_CHECKS], [], [], + [[#include ]]) + + LIBS="$LIBS -lgnutls" + AC_CHECK_FUNCS(gnutls_priority_set_direct) + AC_CHECK_TYPES([gnutls_certificate_credentials_t, + gnutls_certificate_status_t, + gnutls_datum_t, + gnutls_digest_algorithm_t, + gnutls_session_t, + gnutls_transport_ptr_t, + gnutls_x509_crt_t], [], [], [[#include ]]) + + LIBS="$saved_LIBS" + MUTTLIBS="$MUTTLIBS -lgnutls" + + AC_DEFINE(USE_SSL, 1, [ Define if you want support for SSL. ]) + AC_DEFINE(USE_SSL_GNUTLS, 1, [ Define if you want support for SSL via GNUTLS. ]) + + 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) @@ -642,10 +624,6 @@ AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes) AC_ARG_WITH(sasl, AS_HELP_STRING([--with-sasl@<:@=PFX@:>@],[Use SASL network security library]), [ if test "$with_sasl" != "no"; then - if test "$need_socket" != "yes"; then - AC_MSG_ERROR([SASL support is only useful with POP or IMAP support]) - fi - if test "$with_sasl" != "yes"; then CPPFLAGS="$CPPFLAGS -I$with_sasl/include" LDFLAGS="$LDFLAGS -L$with_sasl/lib"