Source
xxxxxxxxxx
1
1
# LIBRESOLV_CHECK_CONFIG ([DEFAULT-ACTION])
2
2
# ----------------------------------------------------------
3
3
#
4
4
# Checks for DNS functions.
5
5
6
6
AC_DEFUN([LIBRESOLV_TRY_LINK],
7
7
[
8
8
am_save_LIBS="$LIBS"
9
9
LIBS="$LIBS $1"
10
-
AC_TRY_LINK(
11
-
[
10
+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
12
11
#ifdef HAVE_SYS_TYPES_H
13
12
# include <sys/types.h>
14
13
#endif
15
14
#ifdef HAVE_NETINET_IN_H
16
15
# include <netinet/in.h>
17
16
#endif
18
17
#ifdef HAVE_ARPA_NAMESER_H
19
18
# include <arpa/nameser.h>
20
19
#endif
21
20
#ifdef HAVE_RESOLV_H
22
21
# include <resolv.h>
23
22
#endif
24
23
#ifndef C_IN
25
24
# define C_IN ns_c_in
26
25
#endif /* C_IN */
27
26
#ifndef T_SOA
28
27
# define T_SOA ns_t_soa
29
28
#endif /* T_SOA */
30
-
],
31
-
[
29
+
]], [[
32
30
char *buf;
33
31
34
32
res_init();
35
33
res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
36
-
],
37
-
found_resolv="yes"
38
-
RESOLV_LIBS="$1")
34
+
]])],[found_resolv="yes"
35
+
RESOLV_LIBS="$1"],[])
39
36
LIBS="$am_save_LIBS"
40
37
])dnl
41
38
42
39
AC_DEFUN([LIBRESOLV_CHECK_CONFIG],
43
40
[
44
41
AC_MSG_CHECKING(for DNS lookup functions)
45
42
46
43
LIBRESOLV_TRY_LINK([])
47
44
48
45
if test "x$found_resolv" != "xyes"; then