configure.ac: Fix test for libresolv on Mac OS 10.4.x.

The resolv.h header file won't compile without netinet/in.h being
included first.
This commit is contained in:
Rob Shearman 2009-01-02 12:12:06 +00:00 committed by Alexandre Julliard
parent 76b805dad4
commit ba34921034
2 changed files with 7 additions and 1 deletions

3
configure vendored
View File

@ -14285,6 +14285,9 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <resolv.h>
int
main ()

View File

@ -1011,7 +1011,10 @@ if test "$ac_cv_header_resolv_h" = "yes"
then
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lresolv"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>]],[[res_init();]])],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <resolv.h>]],[[res_init();]])],
[AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
RESOLVLIBS="-lresolv"])
LIBS="$ac_save_LIBS"