forked from mirrors/gecko-dev
Bug 1881499 - Move res_ninit check to moz.configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D202421
This commit is contained in:
parent
ac2f2c943a
commit
00c979d8c7
3 changed files with 11 additions and 66 deletions
|
|
@ -42,3 +42,14 @@ set_config(
|
||||||
)
|
)
|
||||||
|
|
||||||
set_config("REALTIME_LIBS", ["-lrt"], when=have_rt_clock_monotonic_support)
|
set_config("REALTIME_LIBS", ["-lrt"], when=have_rt_clock_monotonic_support)
|
||||||
|
|
||||||
|
|
||||||
|
have_res_ninit = try_link(
|
||||||
|
includes=["sys/types.h", "netinet/in.h", "arpa/nameser.h", "resolv.h"],
|
||||||
|
body="int foo = res_ninit(&_res);",
|
||||||
|
check_msg="for res_ninit()",
|
||||||
|
flags=depends(when=building_linux)(["-D_BSD_SOURCE=1"]),
|
||||||
|
when=building_with_gnu_cc & ~target_is_netbsd & ~target_is_openbsd,
|
||||||
|
)
|
||||||
|
|
||||||
|
set_define("HAVE_RES_NINIT", have_res_ninit)
|
||||||
|
|
|
||||||
|
|
@ -605,36 +605,6 @@ dnl Checks for math functions.
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
AC_CHECK_LIB(m, sin)
|
AC_CHECK_LIB(m, sin)
|
||||||
|
|
||||||
AC_CACHE_CHECK(
|
|
||||||
[for res_ninit()],
|
|
||||||
ac_cv_func_res_ninit,
|
|
||||||
[if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then
|
|
||||||
dnl no need for res_ninit() on NetBSD and OpenBSD
|
|
||||||
ac_cv_func_res_ninit=no
|
|
||||||
else
|
|
||||||
AC_TRY_LINK([
|
|
||||||
#ifdef linux
|
|
||||||
#define _BSD_SOURCE 1
|
|
||||||
#endif
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/nameser.h>
|
|
||||||
#include <resolv.h>
|
|
||||||
],
|
|
||||||
[int foo = res_ninit(&_res);],
|
|
||||||
[ac_cv_func_res_ninit=yes],
|
|
||||||
[ac_cv_func_res_ninit=no])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$ac_cv_func_res_ninit" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_RES_NINIT)
|
|
||||||
dnl must add the link line we do something as foolish as this... dougt
|
|
||||||
dnl else
|
|
||||||
dnl AC_CHECK_LIB(bind, res_ninit, AC_DEFINE(HAVE_RES_NINIT),
|
|
||||||
dnl AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT)))
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_LANGINFO_CODESET
|
AM_LANGINFO_CODESET
|
||||||
|
|
||||||
AC_LANG_C
|
AC_LANG_C
|
||||||
|
|
|
||||||
|
|
@ -634,42 +634,6 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl Checks for library functions.
|
|
||||||
dnl ========================================================
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(
|
|
||||||
[for res_ninit()],
|
|
||||||
ac_cv_func_res_ninit,
|
|
||||||
[if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then
|
|
||||||
dnl no need for res_ninit() on NetBSD and OpenBSD
|
|
||||||
ac_cv_func_res_ninit=no
|
|
||||||
else
|
|
||||||
AC_TRY_LINK([
|
|
||||||
#ifdef linux
|
|
||||||
#define _BSD_SOURCE 1
|
|
||||||
#endif
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/nameser.h>
|
|
||||||
#include <resolv.h>
|
|
||||||
],
|
|
||||||
[int foo = res_ninit(&_res);],
|
|
||||||
[ac_cv_func_res_ninit=yes],
|
|
||||||
[ac_cv_func_res_ninit=no])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$ac_cv_func_res_ninit" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_RES_NINIT)
|
|
||||||
dnl must add the link line we do something as foolish as this... dougt
|
|
||||||
dnl else
|
|
||||||
dnl AC_CHECK_LIB(bind, res_ninit, AC_DEFINE(HAVE_RES_NINIT),
|
|
||||||
dnl AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT)))
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_LANG_C
|
|
||||||
|
|
||||||
dnl ===================================================================
|
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl Put your C++ language/feature checks below
|
dnl Put your C++ language/feature checks below
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue