8000 Revert "Allow --with-bonjour to work with non-macOS implementations o… · iCalistus/postgres@9aa6a1b · GitHub
[go: up one dir, main page]

Skip to content

Commit 9aa6a1b

Browse files
committed
Revert "Allow --with-bonjour to work with non-macOS implementations of Bonjour."
Upon further review, our Bonjour code doesn't actually work with the Avahi not-too-compatible compatibility library. While you can get it to work on non-macOS platforms if you link to Apple's own mDNSResponder code, there don't seem to be many people who care about that. Leaving in the AC_SEARCH_LIBS call seems more likely to encourage people to build broken configurations than to do anything very useful. Hence, remove the AC_SEARCH_LIBS call and put in a warning comment instead. Discussion: https://postgr.es/m/2D8331C5-D64F-44C1-8717-63EDC6EAF7EB@brightforge.com
1 parent f57b070 commit 9aa6a1b

File tree

2 files changed

+6
-60
lines changed

2 files changed

+6
-60
lines changed

configure

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9776,64 +9776,6 @@ else
97769776
fi
97779777

97789778

9779-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRefSockFD" >&5
9780-
$as_echo_n "checking for library containing DNSServiceRefSockFD... " >&6; }
9781-
if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
9782-
$as_echo_n "(cached) " >&6
9783-
else
9784-
ac_func_search_save_LIBS=$LIBS
9785-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9786-
/* end confdefs.h. */
9787-
9788-
/* Override any GCC internal prototype to avoid an error.
9789-
Use char because int might match the return type of a GCC
9790-
builtin and then its argument prototype would still apply. */
9791-
#ifdef __cplusplus
9792-
extern "C"
9793-
#endif
9794-
char DNSServiceRefSockFD ();
9795-
int
9796-
main ()
9797-
{
9798-
return DNSServiceRefSockFD ();
9799-
;
9800-
return 0;
9801-
}
9802-
_ACEOF
9803-
for ac_lib in '' dns_sd; do
9804-
if test -z "$ac_lib"; then
9805-
ac_res="none required"
9806-
else
9807-
ac_res=-l$ac_lib
9808-
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9809-
fi
9810-
if ac_fn_c_try_link "$LINENO"; then :
9811-
ac_cv_search_DNSServiceRefSockFD=$ac_res
9812-
fi
9813-
rm -f core conftest.err conftest.$ac_objext \
9814-
conftest$ac_exeext
9815-
if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
9816-
break
9817-
fi
9818-
done
9819-
if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
9820-
9821-
else
9822-
ac_cv_search_DNSServiceRefSockFD=no
9823-
fi
9824-
rm conftest.$ac_ext
9825-
LIBS=$ac_func_search_save_LIBS
9826-
fi
9827-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRefSockFD" >&5
9828-
$as_echo "$ac_cv_search_DNSServiceRefSockFD" >&6; }
9829-
ac_res=$ac_cv_search_DNSServiceRefSockFD
9830-
if test "$ac_res" != no; then :
9831-
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9832-
9833-
else
9834-
as_fn_error $? "could not find function 'DNSServiceRefSockFD' required for Bonjour" "$LINENO" 5
9835-
fi
9836-
98379779
fi
98389780

98399781
# for contrib/uuid-ossp

configure.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,12 @@ fi
11791179

11801180
if test "$with_bonjour" = yes ; then
11811181
AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file <dns_sd.h> is required for Bonjour])])
1182-
AC_SEARCH_LIBS(DNSServiceRefSockFD, dns_sd, [],
1183-
[AC_MSG_ERROR([could not find function 'DNSServiceRefSockFD' required for Bonjour])])
1182+
dnl At some point we might add something like
1183+
dnl AC_SEARCH_LIBS(DNSServiceRegister, dns_sd)
1184+
dnl but right now, what that would mainly accomplish is to encourage
1185+
dnl people to try to use the avahi implementation, which does not work.
1186+
dnl If you want to use Apple's own Bonjour code on another platform,
1187+
dnl just add -ldns_sd to LIBS manually.
11841188
fi
11851189

11861190
# for contrib/uuid-ossp

0 commit comments

Comments
 (0)
0