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
22AC_SUBST ( MONGOC_HAVE_DNSAPI , 0 )
33
44found_resolv="no"
5+ libc_has_resolv="no"
56
6- old_LIBS="$LIBS"
7+ if test "$os_aix" = "yes" -o "$os_freebsd" = "yes"; then
8+ libc_has_resolv="yes"
9+ fi
710
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"
1115fi
1216
1317dnl Thread-safe DNS query function for _mongoc_client_get_srv.
@@ -93,9 +97,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
9397 ] )
9498] )
9599
96- LIBS="$old_LIBS"
100+ if test "$libc_has_resolv" = "no"; then
101+ LIBS="$old_LIBS"
97102
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 11dnl Ignore OpenSSL deprecation warnings on OSX
22AS_IF ( [ test "$os_darwin" = "yes"] ,
33 [ AX_CHECK_COMPILE_FLAG ( [ -Wno-deprecated-declarations] , [ STD_CFLAGS="$STD_CFLAGS -Wno-deprecated-declarations"] ) ] )
4+
45dnl We know there are some cast-align issues on OSX
56AS_IF ( [ test "$os_darwin" = "yes"] ,
67 [ AX_CHECK_COMPILE_FLAG ( [ -Wno-cast-align] , [ STD_CFLAGS="$STD_CFLAGS -Wno-cast-align"] ) ] )
78AS_IF ( [ test "$os_darwin" = "yes"] ,
89 [ AX_CHECK_COMPILE_FLAG ( [ -Wno-unneeded-internal-declaration] , [ STD_CFLAGS="$STD_CFLAGS -Wno-unneeded-internal-declaration"] ) ] )
910AS_IF ( [ test "$os_darwin" = "yes"] ,
1011 [ 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