Skip to content

Commit 1772c5c

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 58bc9ea commit 1772c5c

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
@@ -11178,64 +11178,6 @@ else
1117811178
fi
1117911179

1118011180

11181-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRefSockFD" >&5
11182-
$as_echo_n "checking for library containing DNSServiceRefSockFD... " >&6; }
11183-
if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
11184-
$as_echo_n "(cached) " >&6
11185-
else
11186-
ac_func_search_save_LIBS=$LIBS
11187-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11188-
/* end confdefs.h. */
11189-
11190-
/* Override any GCC internal prototype to avoid an error.
11191-
Use char because int might match the return type of a GCC
11192-
builtin and then its argument prototype would still apply. */
11193-
#ifdef __cplusplus
11194-
extern "C"
11195-
#endif
11196-
char DNSServiceRefSockFD ();
11197-
int
11198-
main ()
11199-
{
11200-
return DNSServiceRefSockFD ();
11201-
;
11202-
return 0;
11203-
}
11204-
_ACEOF
11205-
for ac_lib in '' dns_sd; do
11206-
if test -z "$ac_lib"; then
11207-
ac_res="none required"
11208-
else
11209-
ac_res=-l$ac_lib
11210-
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11211-
fi
11212-
if ac_fn_c_try_link "$LINENO"; then :
11213-
ac_cv_search_DNSServiceRefSockFD=$ac_res
11214-
fi
11215-
rm -f core conftest.err conftest.$ac_objext \
11216-
conftest$ac_exeext
11217-
if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
11218-
break
11219-
fi
11220-
done
11221-
if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
11222-
11223-
else
11224-
ac_cv_search_DNSServiceRefSockFD=no
11225-
fi
11226-
rm conftest.$ac_ext
11227-
LIBS=$ac_func_search_save_LIBS
11228-
fi
11229-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRefSockFD" >&5
11230-
$as_echo "$ac_cv_search_DNSServiceRefSockFD" >&6; }
11231-
ac_res=$ac_cv_search_DNSServiceRefSockFD
11232-
if test "$ac_res" != no; then :
11233-
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11234-
11235-
else
11236-
as_fn_error $? "could not find function 'DNSServiceRefSockFD' required for Bonjour" "$LINENO" 5
11237-
fi
11238-
1123911181
fi
1124011182

1124111183
# for contrib/uuid-ossp

configure.in

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

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

13001304
# for contrib/uuid-ossp

0 commit comments

Comments
 (0)