File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
scripts/autotools/libmongoc Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,16 @@ dnl Disable Windows DNSAPI
2
2
AC_SUBST ( MONGOC_HAVE_DNSAPI , 0 )
3
3
4
4
found_resolv="no"
5
+ libc_has_resolv="no"
5
6
6
- old_LIBS="$LIBS"
7
+ if test "$os_aix" = "yes" -o "$os_freebsd" = "yes"; then
8
+ libc_has_resolv="yes"
9
+ fi
7
10
8
- dnl Link libresolv for detection (note: on AIX, resolv functions are in libc)
9
- if test "$os_aix" != "yes"; then
10
- LIBS="$LIBS -lresolv"
11
+ dnl Temporarily link libresolv for detection if necessary
12
+ if test "$libc_has_resolv" = "no"; then
13
+ old_LIBS="$LIBS"
14
+ LIBS="$LIBS -lresolv"
11
15
fi
12
16
13
17
dnl Thread-safe DNS query function for _mongoc_client_get_srv.
@@ -93,9 +97,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
93
97
] )
94
98
] )
95
99
96
- LIBS="$old_LIBS"
100
+ if test "$libc_has_resolv" = "no"; then
101
+ LIBS="$old_LIBS"
97
102
98
- dnl Link libresolv if needed (note: on AIX, resolv functions are in libc)
99
- AS_IF ( [ test "$found_resolv" = "yes" -a "$os_aix" != "yes" ] , [
100
- PHP_ADD_LIBRARY( [ resolv ] ,, [ MONGODB_SHARED_LIBADD ] )
101
- ] )
103
+ AS_IF ( [ test "$found_resolv" = "yes" ] , [
104
+ PHP_ADD_LIBRARY( [ resolv ] ,, [ MONGODB_SHARED_LIBADD ] )
105
+ ] )
106
+ fi
Original file line number Diff line number Diff line change 1
1
dnl Ignore OpenSSL deprecation warnings on OSX
2
2
AS_IF ( [ test "$os_darwin" = "yes"] ,
3
3
[ AX_CHECK_COMPILE_FLAG ( [ -Wno-deprecated-declarations] , [ STD_CFLAGS="$STD_CFLAGS -Wno-deprecated-declarations"] ) ] )
4
+
4
5
dnl We know there are some cast-align issues on OSX
5
6
AS_IF ( [ test "$os_darwin" = "yes"] ,
6
7
[ AX_CHECK_COMPILE_FLAG ( [ -Wno-cast-align] , [ STD_CFLAGS="$STD_CFLAGS -Wno-cast-align"] ) ] )
7
8
AS_IF ( [ test "$os_darwin" = "yes"] ,
8
9
[ AX_CHECK_COMPILE_FLAG ( [ -Wno-unneeded-internal-declaration] , [ STD_CFLAGS="$STD_CFLAGS -Wno-unneeded-internal-declaration"] ) ] )
9
10
AS_IF ( [ test "$os_darwin" = "yes"] ,
10
11
[ AX_CHECK_COMPILE_FLAG ( [ -Wno-error=unused-command-line-argument] , [ STD_CFLAGS="$STD_CFLAGS -Wno-error=unused-command-line-argument"] ) ] )
12
+
13
+ dnl Enable non-standard features on FreeBSD with __BSD_VISIBLE=1
14
+ if test "$os_freebsd" = "yes"; then
15
+ PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -D__BSD_VISIBLE=1"
16
+ fi
You can’t perform that action at this time.
0 commit comments