@@ -7,52 +7,52 @@ old_LIBS="$LIBS"
7
7
LIBS="$LIBS -lresolv"
8
8
9
9
dnl Thread-safe DNS query function for _mongoc_client_get_srv.
10
- dnl Could be a macro, not a function, so check with AC_TRY_LINK .
10
+ dnl Could be a macro, not a function, so check with AC_LINK_IFELSE .
11
11
AC_MSG_CHECKING ( [ for res_nsearch] )
12
- AC_TRY_LINK ( [
12
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
13
13
#include <sys/types.h>
14
14
#include <netinet/in.h>
15
15
#include <arpa/nameser.h>
16
16
#include <resolv.h>
17
- ] , [
17
+ ] ] , [ [
18
18
int len;
19
19
unsigned char reply[ 1024] ;
20
20
res_state statep;
21
21
len = res_nsearch(
22
22
statep, "example.com", ns_c_in, ns_t_srv, reply, sizeof(reply));
23
- ] , [
23
+ ] ] ) ] , [
24
24
AC_MSG_RESULT ( [ yes] )
25
25
AC_SUBST ( MONGOC_HAVE_RES_SEARCH , 0 )
26
26
AC_SUBST ( MONGOC_HAVE_RES_NSEARCH , 1 )
27
27
found_resolv="yes"
28
28
29
29
dnl We have res_nsearch. Call res_ndestroy (BSD/Mac) or res_nclose (Linux)?
30
30
AC_MSG_CHECKING ( [ for res_ndestroy] )
31
- AC_TRY_LINK ( [
31
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
32
32
#include <sys/types.h>
33
33
#include <netinet/in.h>
34
34
#include <arpa/nameser.h>
35
35
#include <resolv.h>
36
- ] , [
36
+ ] ] , [ [
37
37
res_state statep;
38
38
res_ndestroy(statep);
39
- ] , [
39
+ ] ] ) ] , [
40
40
AC_MSG_RESULT ( [ yes] )
41
41
AC_SUBST ( MONGOC_HAVE_RES_NDESTROY , 1 )
42
42
AC_SUBST ( MONGOC_HAVE_RES_NCLOSE , 0 )
43
43
] , [
44
44
AC_MSG_RESULT ( [ no] )
45
45
AC_SUBST ( MONGOC_HAVE_RES_NDESTROY , 0 )
46
46
AC_MSG_CHECKING ( [ for res_nclose] )
47
- AC_TRY_LINK ( [
47
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
48
48
#include <sys/types.h>
49
49
#include <netinet/in.h>
50
50
#include <arpa/nameser.h>
51
51
#include <resolv.h>
52
- ] , [
52
+ ] ] , [ [
53
53
res_state statep;
54
54
res_nclose(statep);
55
- ] , [
55
+ ] ] ) ] , [
56
56
AC_MSG_RESULT ( [ yes] )
57
57
AC_SUBST ( MONGOC_HAVE_RES_NCLOSE , 1 )
58
58
] , [
@@ -68,16 +68,16 @@ AC_TRY_LINK([
68
68
69
69
dnl Thread-unsafe function.
70
70
AC_MSG_CHECKING ( [ for res_search] )
71
- AC_TRY_LINK ( [
71
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
72
72
#include <sys/types.h>
73
73
#include <netinet/in.h>
74
74
#include <arpa/nameser.h>
75
75
#include <resolv.h>
76
- ] , [
76
+ ] ] , [ [
77
77
int len;
78
78
unsigned char reply[ 1024] ;
79
79
len = res_search("example.com", ns_c_in, ns_t_srv, reply, sizeof(reply));
80
- ] , [
80
+ ] ] ) ] , [
81
81
AC_MSG_RESULT ( [ yes] )
82
82
AC_SUBST ( MONGOC_HAVE_RES_SEARCH , 1 )
83
83
found_resolv="yes"
0 commit comments