diff options
author | Marek Kasik <mkasik@redhat.com> | 2013-03-04 14:29:24 +0100 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2013-03-04 14:30:49 +0100 |
commit | eed9e72e831e54f4a405474316835685f3a61e79 (patch) | |
tree | 4b3451f58d8458c7f16996237184c42cc127eb62 /configure.ac | |
parent | bfb327deda4983adb3f2d317d4b763e59e5f109e (diff) | |
download | gtk+-eed9e72e831e54f4a405474316835685f3a61e79.tar.gz |
printing: List Avahi printers
Show printers advertised by avahi on local network. CUPS
backend now looks for _ipps._tcp and _ipp._tcp services
offered by avahi. If it finds such a service (printer)
it requests its attributes through IPP_GET_PRINTER_ATTRIBUTES
ipp request and adds it to the list of printers. Such printer
behaves like a remote printer then.
If an avahi printer is a default printer then it is considered
default by the backend only if there is no local or remote
default printer.
This functionality is enabled when building Gtk+ with CUPS 1.6
or later because it replaces browsing protocol removed in CUPS 1.6.
https://bugzilla.gnome.org/show_bug.cgi?id=688956
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 8d74b190e1..31c41be585 100644 --- a/configure.ac +++ b/configure.ac @@ -1421,7 +1421,7 @@ else $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then AC_DEFINE(HAVE_CUPS_API_1_6, 1, [Define to 1 if CUPS 1.6 API is available]) - + have_cups_api_1_6=yes fi AC_SUBST(CUPS_API_MAJOR) @@ -1452,6 +1452,45 @@ else fi fi +# Check for Avahi flags +AC_ARG_ENABLE(avahi-browsing, + [AS_HELP_STRING([--disable-avahi-browsing], + [disable avahi browsing of printers])],, + [enable_avahi_browsing=auto]) + +have_avahi_browsing=no +if test "x$enable_avahi_browsing" != "xno" -a \ + "x$have_cups_api_1_6" = "xyes"; then + AC_MSG_CHECKING([avahi-gobject]) + + if $PKG_CONFIG --exists avahi-gobject ; then + AVAHI_CFLAGS=`$PKG_CONFIG --cflags avahi-gobject` + AC_SUBST(AVAHI_CFLAGS) + AVAHI_LIBS=`$PKG_CONFIG --libs avahi-gobject` + AC_SUBST(AVAHI_LIBS) + have_avahi_gobject=yes + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + + if test "x$have_avahi_gobject" = "xyes" ; then + AC_DEFINE([HAVE_AVAHI_BROWSING], [1], [Define to 1 if avahi-gobject available]) + have_avahi_browsing=yes + else + AC_MSG_ERROR([ +*** avahi-gobject not found. avahi-gobject is required to build GTK+ with support +*** for avahi browsed printers when using CUPS 1.6. +]) + fi +else + if test "x$enable_avahi_browsing" = "xyes"; then + AC_MSG_ERROR([ +*** Avahi browsing support requested but CUPS 1.6 not found. +]) + fi +fi + # Checks to see if we should compile with PAPI backend for GTK+ # @@ -1828,6 +1867,7 @@ echo " Dynamic modules: $build_dynamic_modules" echo " Included immodules: $included_immodules" echo " PackageKit support: $build_packagekit" echo " colord support: $have_colord" +echo " Avahi browsing: $have_avahi_browsing" echo " Introspection: $found_introspection" echo " Debugging: $enable_debug" echo " Documentation: $enable_gtk_doc" |