While trying to compile Mutt on Solaris, I found that since 6837:ce71d168c819
getaddrinfo is used for hostname resolution, which needs socket libs. Please find a patch for inspiration. As far as I can tell, we always need socket libs now, hence I removed the entire conditional. Thanks, Fabian -- Fabian Groffen Gentoo on a different level
# HG changeset patch # Parent b7888124b1c911ee7262b738a7e6ddbc5662dacc configure: drop conditional for socket library checks Since getaddrinfo is now used to determine the local hostname, we always need to check for socket support and necessary libs. I found this on Solaris as it needs -lsocket -lnsl for getaddrinfo. diff -r b7888124b1c9 -r 0123a2f09362 configure.ac --- a/configure.ac Sun Sep 16 09:31:54 2012 +0200 +++ b/configure.ac Mon Aug 29 11:14:09 2016 +0200 @@ -585,16 +585,11 @@ AC_ARG_WITH(domain, AS_HELP_STRING([--wi fi fi]) -need_socket="no" - -dnl -- socket dependencies -- - AC_ARG_ENABLE(pop, AS_HELP_STRING([--enable-pop],[Enable POP3 support]), [ if test x$enableval = xyes ; then 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" need_md5="yes" fi ]) @@ -605,7 +600,6 @@ AC_ARG_ENABLE(imap, AS_HELP_STRING([--en LIBIMAP="-Limap -limap" LIBIMAPDEPS="\$(top_srcdir)/imap/imap.h imap/libimap.a" need_imap="yes" - need_socket="yes" need_md5="yes" fi ]) @@ -615,30 +609,24 @@ AC_ARG_ENABLE(smtp, AS_HELP_STRING([--en [if test $enableval = yes; then AC_DEFINE(USE_SMTP, 1, [Include internal SMTP relay support]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smtp.o" - need_socket="yes" fi]) if test x"$need_imap" = xyes -o x"$need_pop" = xyes ; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS bcache.o" fi -dnl -- end socket dependencies -- - -if test "$need_socket" = "yes" -then - AC_CHECK_HEADERS([sys/select.h]) - 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_CHECK_HEADERS([sys/select.h]) +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" dnl -- imap dependencies --
signature.asc
Description: Digital signature