Commit ba349210 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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.
parent 76b805da
...@@ -14285,6 +14285,9 @@ _ACEOF ...@@ -14285,6 +14285,9 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <resolv.h> #include <resolv.h>
int int
main () main ()
......
...@@ -1011,7 +1011,10 @@ if test "$ac_cv_header_resolv_h" = "yes" ...@@ -1011,7 +1011,10 @@ if test "$ac_cv_header_resolv_h" = "yes"
then then
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="$LIBS -lresolv" 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]) [AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
RESOLVLIBS="-lresolv"]) RESOLVLIBS="-lresolv"])
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment