]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-dnssd.m4
Fix ippfind _regtype
[thirdparty/cups.git] / config-scripts / cups-dnssd.m4
index 426637a20e74cf120a8b5ab0dff17ada7bab0f45..31062f9ec78637419aaecdc155fdb6159d805ea8 100644 (file)
@@ -1,15 +1,13 @@
 dnl
-dnl "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $"
+dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
 dnl
-dnl   DNS Service Discovery (aka Bonjour) stuff for CUPS.
+dnl Copyright 2007-2017 by Apple Inc.
 dnl
-dnl   Copyright 2007-2012 by Apple Inc.
-dnl
-dnl   These coded instructions, statements, and computer programs are the
-dnl   property of Apple Inc. and are protected by Federal copyright
-dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-dnl   which should have been included with this file.  If this file is
-dnl   file is missing or damaged, see the license at "http://www.cups.org/".
+dnl These coded instructions, statements, and computer programs are the
+dnl property of Apple Inc. and are protected by Federal copyright
+dnl law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+dnl which should have been included with this file.  If this file is
+dnl missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
 AC_ARG_ENABLE(avahi, [  --disable-avahi         disable DNS Service Discovery support using Avahi])
@@ -23,14 +21,18 @@ AC_ARG_WITH(dnssd-includes, [  --with-dnssd-includes   set directory for DNS Ser
 
 DNSSDLIBS=""
 DNSSD_BACKEND=""
+IPPFIND_BIN=""
+IPPFIND_MAN=""
 
-if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
+if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$host_os_name != xdarwin; then
        AC_MSG_CHECKING(for Avahi)
        if $PKGCONFIG --exists avahi-client; then
                AC_MSG_RESULT(yes)
                CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`"
                DNSSDLIBS="`$PKGCONFIG --libs avahi-client`"
                DNSSD_BACKEND="dnssd"
+               IPPFIND_BIN="ippfind"
+               IPPFIND_MAN="ippfind.\$(MAN1EXT)"
                AC_DEFINE(HAVE_AVAHI)
        else
                AC_MSG_RESULT(no)
@@ -39,12 +41,14 @@ fi
 
 if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
        AC_CHECK_HEADER(dns_sd.h, [
-               case "$uname" in
-                       Darwin*)
-                               # Darwin and MacOS X...
+               case "$host_os_name" in
+                       darwin*)
+                               # Darwin and macOS...
                                AC_DEFINE(HAVE_DNSSD)
                                DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
                                DNSSD_BACKEND="dnssd"
+                               IPPFIND_BIN="ippfind"
+                               IPPFIND_MAN="ippfind.\$(MAN1EXT)"
                                ;;
                        *)
                                # All others...
@@ -61,6 +65,8 @@ if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
                                        AC_DEFINE(HAVE_DNSSD)
                                        DNSSDLIBS="-ldns_sd"
                                        DNSSD_BACKEND="dnssd",
+                                       IPPFIND_BIN="ippfind"
+                                       IPPFIND_MAN="ippfind.\$(MAN1EXT)"
                                        AC_MSG_RESULT(no))
                                LIBS="$SAVELIBS"
                                ;;
@@ -70,7 +76,5 @@ fi
 
 AC_SUBST(DNSSDLIBS)
 AC_SUBST(DNSSD_BACKEND)
-
-dnl
-dnl End of "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $".
-dnl
+AC_SUBST(IPPFIND_BIN)
+AC_SUBST(IPPFIND_MAN)