- add logging to the AC_TRY_LINK test for libresolv, so that we can see if

it succeeds or not
This commit is contained in:
Nalin Dahyabhai 2006-07-07 18:11:59 +00:00
parent f63f35ea9e
commit 83f10797ff
1 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@ Try to correctly find res_mkquery in libresolv, even in cases where a
preprocessor-based rename in <resolv.h> may screw us up.
--- hesiod-3.1.0/configure.in 2006-03-30 11:22:11.000000000 -0500
+++ hesiod-3.1.0/configure.in 2006-03-30 13:31:02.000000000 -0500
@@ -12,7 +12,11 @@
@@ -12,7 +12,14 @@
AC_EGREP_HEADER(pw_change, pwd.h, AC_DEFINE(HAVE_PW_CHANGE))
AC_EGREP_HEADER(pw_expire, pwd.h, AC_DEFINE(HAVE_PW_EXPIRE))
@ -10,7 +10,10 @@ preprocessor-based rename in <resolv.h> may screw us up.
+AC_CHECK_FUNC(res_mkquery, :, [AC_CHECK_LIB(resolv, res_mkquery,,[
+saveLIBS="$LIBS"
+LIBS="-lresolv $LIBS"
+AC_TRY_LINK([#include <resolv.h>],[res_mkquery(0,NULL,0,0,NULL,0,NULL,NULL,0);],[AC_DEFINE(HAVE_RES_MKQUERY,1,[Define if your libresolv provides res_mkquery.])],[LIBS="$saveLIBS"])
+AC_MSG_CHECKING([if res_mkquery is provided by libresolv])
+AC_TRY_LINK([#include <resolv.h>],[res_mkquery(0,NULL,0,0,NULL,0,NULL,NULL,0);],[AC_DEFINE(HAVE_RES_MKQUERY,1,[Define if your libresolv provides res_mkquery.])
+AC_MSG_RESULT(yes)],[LIBS="$saveLIBS"
+AC_MSG_RESULT(no)])
+])])
AC_CONFIG_HEADER(config.h)