make mdns-external-avahi a conditional compilation
This commit is contained in:
+5
-1
@@ -8,7 +8,7 @@ bin_PROGRAMS = shairport-sync
|
||||
|
||||
# See below for the flags for the test client program
|
||||
|
||||
shairport_sync_SOURCES = shairport.c rtsp.c mdns.c mdns_external.c common.c rtp.c player.c alac.c audio.c loudness.c activity_monitor.c
|
||||
shairport_sync_SOURCES = shairport.c rtsp.c mdns.c common.c rtp.c player.c alac.c audio.c loudness.c activity_monitor.c
|
||||
|
||||
if BUILD_FOR_FREEBSD
|
||||
AM_CXXFLAGS = -I/usr/local/include -Wno-multichar -Wall -Wextra -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
@@ -40,6 +40,10 @@ if USE_TINYSVCMDNS
|
||||
shairport_sync_SOURCES += mdns_tinysvcmdns.c tinysvcmdns.c
|
||||
endif
|
||||
|
||||
if USE_EXTERNAL_MDNS
|
||||
shairport_sync_SOURCES += mdns_external.c
|
||||
endif
|
||||
|
||||
if USE_ALSA
|
||||
shairport_sync_SOURCES += audio_alsa.c
|
||||
endif
|
||||
|
||||
+3
-1
@@ -73,7 +73,6 @@ AC_ARG_WITH([dummy],[ --with-dummy = include the dummy audio back end ],[AC_MSG
|
||||
AM_CONDITIONAL([USE_DUMMY], [test "x$with_dummy" = "xyes" ])
|
||||
|
||||
AC_ARG_WITH([stdout],[ --with-stdout = include the stdout audio back end ],[ AC_MSG_RESULT(>>Including the stdout audio back end) AC_DEFINE([CONFIG_STDOUT], 1, [Needed by the compiler.]) ], )
|
||||
|
||||
AM_CONDITIONAL([USE_STDOUT], [test "x$with_stdout" = "xyes" ])
|
||||
|
||||
AC_ARG_WITH([pipe],[ --with-pipe = include the pipe audio back end ],[ AC_MSG_RESULT(>>Including the pipe audio back end) AC_DEFINE([CONFIG_PIPE], 1, [Needed by the compiler.]) ], )
|
||||
@@ -95,6 +94,9 @@ AC_ARG_WITH([freebsd-service],
|
||||
[ --with-freebsd-service = install a FreeBSD startup script during a make install], , )
|
||||
AM_CONDITIONAL([INSTALL_FREEBSD_SERVICE], [test "x$with_freebsd_service" = "xyes"])
|
||||
|
||||
AC_ARG_WITH([external-mdns],[ --with-external-mdns = support the use of 'avahi-publish-service' or 'mDNSPublish' to advertise the service on Bonjour/ZeroConf ],[ AC_MSG_RESULT(>>Including external mdns support) AC_DEFINE([CONFIG_EXTERNAL_MDNS], 1, [Needed by the compiler.]) ], )
|
||||
AM_CONDITIONAL([USE_EXTERNAL_MDNS], [test "x$with_external_mdns" = "xyes" ])
|
||||
|
||||
# Add the libconfig package
|
||||
if test "x${with_pkg_config}" = xyes ; then
|
||||
PKG_CHECK_MODULES(
|
||||
|
||||
@@ -42,7 +42,10 @@ extern mdns_backend mdns_external_dns_sd;
|
||||
#ifdef CONFIG_TINYSVCMDNS
|
||||
extern mdns_backend mdns_tinysvcmdns;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EXTERNAL_MDNS
|
||||
extern mdns_backend mdns_external_avahi;
|
||||
#endif
|
||||
|
||||
static mdns_backend *mdns_backends[] = {
|
||||
#ifdef CONFIG_AVAHI
|
||||
@@ -55,7 +58,9 @@ static mdns_backend *mdns_backends[] = {
|
||||
#ifdef CONFIG_TINYSVCMDNS
|
||||
&mdns_tinysvcmdns,
|
||||
#endif
|
||||
#ifdef CONFIG_EXTERNAL_MDNS
|
||||
&mdns_external_avahi,
|
||||
#endif
|
||||
NULL};
|
||||
|
||||
void mdns_register(void) {
|
||||
|
||||
Reference in New Issue
Block a user