From a4d46e8c3cacf03c82e48a71c6f8104c6ff8f709 Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 3 Jul 2010 07:52:46 +0000 Subject: [PATCH] Check for c-ares 1.5.0 or later in configure There was an API change to the callback type of ares_gethostbyname() in 1.5.0, so znc won't compile with anything older than that. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2055 726aef4b-f618-498e-8847-2d620e286838 --- configure | 16 ++++++++-------- configure.in | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 093c5a7c..1b971dac 100755 --- a/configure +++ b/configure @@ -3119,12 +3119,12 @@ if test -n "$c_ares_CFLAGS"; then pkg_cv_c_ares_CFLAGS="$c_ares_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcares") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcares >= 1.5.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_c_ares_CFLAGS=`$PKG_CONFIG --cflags "libcares" 2>/dev/null` + pkg_cv_c_ares_CFLAGS=`$PKG_CONFIG --cflags "libcares >= 1.5.0" 2>/dev/null` else pkg_failed=yes fi @@ -3135,12 +3135,12 @@ if test -n "$c_ares_LIBS"; then pkg_cv_c_ares_LIBS="$c_ares_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcares") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcares >= 1.5.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_c_ares_LIBS=`$PKG_CONFIG --libs "libcares" 2>/dev/null` + pkg_cv_c_ares_LIBS=`$PKG_CONFIG --libs "libcares >= 1.5.0" 2>/dev/null` else pkg_failed=yes fi @@ -3160,9 +3160,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - c_ares_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcares" 2>&1` + c_ares_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcares >= 1.5.0" 2>&1` else - c_ares_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcares" 2>&1` + c_ares_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcares >= 1.5.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$c_ares_PKG_ERRORS" >&5 diff --git a/configure.in b/configure.in index a60b934c..865aafa8 100644 --- a/configure.in +++ b/configure.in @@ -166,7 +166,7 @@ if test "x$ARES" != "xno"; then Disabling c-ares may result in a slight performance decrease but will not have any other side-effects], [pkg-config was not found and thus c-ares was disabled]) else - PKG_CHECK_MODULES([c_ares], [libcares],, ARES=no) + PKG_CHECK_MODULES([c_ares], [libcares >= 1.5.0],, ARES=no) if test "x$ARES" = "xno" ; then ZNC_AUTO_FAIL([ARES],