diff --git a/.travis.yml b/.travis.yml index 9fde29b02ae8..5a6d31ed4bbc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ compiler: - clang before_script: - git describe --always --dirty=+ + - sudo sysctl net.ipv6.conf.lo.disable_ipv6=0 - sudo /sbin/ip addr add 10.0.3.0/24 dev lo - sudo /sbin/ip addr add 1.2.3.4/32 dev lo - sudo rm /etc/apt/sources.list.d/travis_ci_zeromq3-source.list diff --git a/configure.ac b/configure.ac index ded82735c2a9..fa51af8fc7ce 100644 --- a/configure.ac +++ b/configure.ac @@ -41,13 +41,9 @@ AS_IF([test "x$enable_hardening" != "xno"], [ AC_LD_RELRO ]) -AC_CHECK_FUNC([socket], [], [ - AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"]) -]) - -AC_CHECK_FUNC([gethostent], [], [ - AC_CHECK_LIB([nsl], [gethostent], [LIBS="-lnsl $LIBS"]) -]) +AC_SEARCH_LIBS([socket], [socket]) +AC_SEARCH_LIBS([gethostent], [nsl]) +AC_SEARCH_LIBS([inet_aton], [resolv]) m4_ifndef([LT_INIT],[ AC_PROG_LIBTOOL([disable-static]) @@ -164,21 +160,20 @@ AM_CONDITIONAL([OS_MACOSX], false) case "$host_os" in solaris2.10) AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6]) - LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread -lrt $LIBS" + LIBS="-lposix4 -lpthread -lrt $LIBS" CXXFLAGS="-D_REENTRANT $CXXFLAGS" ;; - solaris2.8 | solaris2.9 ) AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined]) AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype]) AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6]) - LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS" + LIBS="-lposix4 -lpthread $LIBS" CXXFLAGS="-D_REENTRANT $CXXFLAGS" ;; solaris2.6 | solaris2.7) AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined]) AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype]) - LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS" + LIBS="-lposix4 -lpthread $LIBS" CXXFLAGS="-D_REENTRANT $CXXFLAGS" ;; linux*) @@ -332,17 +327,6 @@ for a in $modules; do if test ${a} = "gpgsql"; then LIBS="$LIBS $LIBCRYPT" - - case "$host_os" in - freebsd*) - ;; - darwin*) - modulelibs="$modulelibs -lresolv" - ;; - *) - modulelibs="$modulelibs -lresolv -lnsl" - ;; - esac fi done