Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.3] Fix Zeroconf support on *BSD platforms #647

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 13 additions & 22 deletions macros/zeroconf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,19 @@ AC_DEFUN([NETATALK_ZEROCONF], [
fi

# mDNS support using Avahi
AC_CHECK_HEADER(
avahi-client/client.h,
AC_CHECK_LIB(
avahi-client,
avahi_client_new,
AC_DEFINE(USE_ZEROCONF, 1, [Use DNS-SD registration]))
)

case "$ac_cv_lib_avahi_client_avahi_client_new" in
yes)
PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6 ])
PKG_CHECK_MODULES(AVAHI_TPOLL, [ avahi-client >= 0.6.4 ],
[AC_DEFINE(HAVE_AVAHI_THREADED_POLL, 1, [Uses Avahis threaded poll implementation])],
[AC_MSG_WARN(This Avahi implementation is not supporting threaded poll objects. Maybe this is not what you want.)])
ZEROCONF_LIBS="$AVAHI_LIBS"
ZEROCONF_CFLAGS="$AVAHI_CFLAGS"
AC_DEFINE(HAVE_AVAHI, 1, [Use Avahi/DNS-SD registration])
found_zeroconf=yes
;;
esac
CPPFLAGS="$savedcppflags"
LDFLAGS="$savedldflags"
PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6], ac_cv_have_avahi=yes, ac_cv_have_avahi=no)
if test x"$ac_cv_have_avahi" = x"yes" ; then
PKG_CHECK_MODULES(AVAHI_TPOLL, [avahi-client >= 0.6.4],
[AC_DEFINE(HAVE_AVAHI_THREADED_POLL, 1, [Uses Avahis threaded poll implementation])],
[AC_MSG_WARN(This Avahi implementation is not supporting threaded poll objects. Maybe this is not what you want.)])
ZEROCONF_LIBS="$AVAHI_LIBS"
ZEROCONF_CFLAGS="$AVAHI_CFLAGS"
AC_DEFINE(USE_ZEROCONF, 1, [Use DNS-SD registration])
AC_DEFINE(HAVE_AVAHI, 1, [Use Avahi/DNS-SD registration])
found_zeroconf=yes
fi
CPPFLAGS="$savedcppflags"
LDFLAGS="$savedldflags"

# mDNS support using mDNSResponder
if test x"$found_zeroconf" != x"yes" ; then
Expand Down