From 9322aee188dae2a576ac69ef85ac7f124485381f Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Wed, 24 Dec 2014 20:22:04 +0100 Subject: [PATCH 1/5] Remove hardcoded -lresolv, -lnsl and -lsocket We already check for the functions we need in libnsl and libsocket, and I assume we don't need libresolv --- configure.ac | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index ded82735c2a9..c598352bb5fa 100644 --- a/configure.ac +++ b/configure.ac @@ -164,21 +164,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 +331,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 From 7b7a3af302a6feaa8f0d19952d4d012e3692043c Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 2 Jan 2015 19:53:46 +0100 Subject: [PATCH 2/5] Check for inet_aton in libresolv --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index c598352bb5fa..904f19ebde40 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,10 @@ AC_CHECK_FUNC([gethostent], [], [ AC_CHECK_LIB([nsl], [gethostent], [LIBS="-lnsl $LIBS"]) ]) +AC_CHECK_FUNC([inet_aton], [], [ + AC_CHECK_LIB([resolv], [inet_aton], [LIBS="-lresolv $LIBS"]) +]) + m4_ifndef([LT_INIT],[ AC_PROG_LIBTOOL([disable-static]) ],[ From cb382880c7677c4fdd8e3d374ace2486c4281173 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 2 Jan 2015 19:54:28 +0100 Subject: [PATCH 3/5] Indent --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 904f19ebde40..062de474cab3 100644 --- a/configure.ac +++ b/configure.ac @@ -42,15 +42,15 @@ AS_IF([test "x$enable_hardening" != "xno"], [ ]) AC_CHECK_FUNC([socket], [], [ - AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"]) + AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"]) ]) AC_CHECK_FUNC([gethostent], [], [ - AC_CHECK_LIB([nsl], [gethostent], [LIBS="-lnsl $LIBS"]) + AC_CHECK_LIB([nsl], [gethostent], [LIBS="-lnsl $LIBS"]) ]) AC_CHECK_FUNC([inet_aton], [], [ - AC_CHECK_LIB([resolv], [inet_aton], [LIBS="-lresolv $LIBS"]) + AC_CHECK_LIB([resolv], [inet_aton], [LIBS="-lresolv $LIBS"]) ]) m4_ifndef([LT_INIT],[ From edfa60a3b3447a00fbc939ef46302f317d6c9d29 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 2 Jan 2015 20:05:39 +0100 Subject: [PATCH 4/5] Use AC_SEARCH_LIBS --- configure.ac | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 062de474cab3..fa51af8fc7ce 100644 --- a/configure.ac +++ b/configure.ac @@ -41,17 +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_CHECK_FUNC([inet_aton], [], [ - AC_CHECK_LIB([resolv], [inet_aton], [LIBS="-lresolv $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]) From a2e5c282b9960c761947bf50fdc8bbb5664d8c65 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 19 Jan 2016 21:25:28 +0100 Subject: [PATCH 5/5] Enable IPv6 in Travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) 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