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:
parent
76b805dad4
commit
ba34921034
|
@ -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"
|
||||||
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"
|
||||||
|
|
Loading…
Reference in New Issue