diff options
author | Karl Ramm <kcr@1ts.org> | 2013-02-17 17:30:35 -0500 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2013-02-17 18:09:35 -0500 |
commit | 8e8cb752c09715f43231859169a505aa05ae3f8e (patch) | |
tree | 53598fc84e36b8330f41d4fc4558a285cf98626e | |
parent | 9ec3d325048ab72c6f6e037820e33aa8538b7b51 (diff) |
Check for res_send and hes_resolve in libc
close #71
-rw-r--r-- | configure.ac | 13 |
1 files changed, 7 insertions, 6 deletions
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 |