[libdmapsharing] Favor avahi over dns_sd



commit bfac0ce6dff5967733c1ef71d55b20d8367009f2
Author: W. Michael Petullo <mike flyn org>
Date:   Mon Jul 6 00:16:45 2020 -0500

    Favor avahi over dns_sd
    
    Closes #35.

 configure.ac               | 24 ++++++++++++------------
 libdmapsharing/Makefile.am | 10 +++++-----
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8eae71d..7e0790a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,18 +231,7 @@ if test x"$HAVE_DNS_SD" = xyes; then
 fi
 
 if test x"$WITH_MDNS" = xauto; then
-       if test x"$HAVE_DNS_SD" = xyes; then
-               MDNS_CFLAGS=$DNS_SD_CFLAGS
-               MDNS_LIBS=$DNS_SD_LIBS
-               AC_DEFINE(
-                       WITH_DNS_SD,
-                       1,
-                       [Define if mDNS/DNS-SD implementation uses Apple's DNSSD]
-               )
-               USE_DNS_SD=yes
-               AC_MSG_NOTICE([Detected Apple's DNSSD; using it for mDNS/DNS-SD])
-               HAVE_MDNS=yes
-       elif test x"$HAVE_AVAHI" = xyes; then
+       if test x"$HAVE_AVAHI" = xyes; then
                MDNS_CFLAGS=$AVAHI_CFLAGS
                MDNS_LIBS=$AVAHI_LIBS
                AC_DEFINE(
@@ -260,6 +249,17 @@ if test x"$WITH_MDNS" = xauto; then
                        )
                fi
 
+               HAVE_MDNS=yes
+       elif test x"$HAVE_DNS_SD" = xyes; then
+               MDNS_CFLAGS=$DNS_SD_CFLAGS
+               MDNS_LIBS=$DNS_SD_LIBS
+               AC_DEFINE(
+                       WITH_DNS_SD,
+                       1,
+                       [Define if mDNS/DNS-SD implementation uses Apple's DNSSD]
+               )
+               USE_DNS_SD=yes
+               AC_MSG_NOTICE([Detected Apple's DNSSD; using it for mDNS/DNS-SD])
                HAVE_MDNS=yes
        else
                AC_MSG_ERROR([Must have avahi or dns_sd.h development files installed])
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index 763a630..1c3ff22 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -36,15 +36,15 @@ libdmapsharing_4_0_la_SOURCES += \
        test-dmap-image-record-factory.c
 endif
 
-if USE_DNS_SD
-libdmapsharing_4_0_la_SOURCES += \
-       dmap-mdns-browser-dnssd.c \
-       dmap-mdns-publisher-dnssd.c
-else
+if USE_AVAHI
 libdmapsharing_4_0_la_SOURCES += \
        dmap-mdns-avahi.c \
        dmap-mdns-browser-avahi.c \
        dmap-mdns-publisher-avahi.c
+else
+libdmapsharing_4_0_la_SOURCES += \
+       dmap-mdns-browser-dnssd.c \
+       dmap-mdns-publisher-dnssd.c
 endif
 
 if USE_GSTREAMERAPP


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]