From a8c1d25f5c5eaa7ee57bb024da35db30f4e1721b Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Sat, 25 Feb 2012 14:24:32 -0700 Subject: [PATCH] Correctly check for -lresolv need by using resolv.h. Doing this with AC_SEARCH_LIBS doesn't work because the res_query is a #define. --- configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 8c0ca3c..f843de5 100644 --- a/configure.ac +++ b/configure.ac @@ -35,8 +35,7 @@ fi AC_MSG_NOTICE([libstrophe will use the $with_parser XML parser]) AC_SEARCH_LIBS([socket], [socket]) -AC_SEARCH_LIBS([res_9_query], [resolv]) -AC_CHECK_HEADERS([arpa/nameser_compat.h]) +AC_LINK_IFELSE([AC_LANG_CALL([#include ], [res_query])], [], [LIBS="$LIBS -lresolv"])AC_CHECK_HEADERS([arpa/nameser_compat.h]) AM_CONDITIONAL([PARSER_EXPAT], [test x$with_parser != xlibxml2]) AC_SUBST(PARSER_NAME)