From 8e8cb752c09715f43231859169a505aa05ae3f8e Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Sun, 17 Feb 2013 17:30:35 -0500 Subject: Check for res_send and hes_resolve in libc close #71 --- configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7ea77dd..96e8c52 100644 --- a/configure.ac +++ b/configure.ac @@ -172,9 +172,10 @@ if test "$krb5" != no; then AC_DEFINE(HAVE_KRB5, 1, [Define to compile with Kerberos 5 support.]) LIBZEPHYR_LIBS="$LIBZEPHYR_LIBS $KRB5_LIBS" # the zephyr library needs -lresolv if it's built with krb5 - AC_CHECK_LIB(resolv, res_send, LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS", - AC_CHECK_LIB(resolv, __res_send, LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS", - AC_MSG_ERROR(Zephyr requires libresolv along with Kerberos V.))) + AC_CHECK_FUNC(res_send, :, + AC_CHECK_LIB(resolv, res_send, LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS", + AC_CHECK_LIB(resolv, __res_send, LIBZEPHYR_LIBS="-lresolv $LIBZEPHYR_LIBS", + AC_MSG_ERROR(Zephyr requires libresolv along with Kerberos V.)))) case "$target_os" in darwin*) KRB5_LIBS="$KRB5_LIBS -framework Kerberos" ;; esac @@ -192,9 +193,9 @@ if test "$hesiod" != no; then CPPFLAGS="$CPPFLAGS -I$hesiod/include" LDFLAGS="$LDFLAGS -L$hesiod/lib" fi - AC_CHECK_LIB(hesiod, hes_resolve, :, - [AC_MSG_ERROR(Hesiod library not found)],$LIBS) - HESIOD_LIBS="-lhesiod" + AC_CHECK_FUNC(hes_resolve, :, + AC_CHECK_LIB(hesiod, hes_resolve, HESIOD_LIBS="-lhesiod", + [AC_MSG_ERROR(Hesiod library not found)],$LIBS)) AC_DEFINE(HAVE_HESIOD, 1, [Define to compile with Hesiod support.]) fi -- cgit v1.2.3