91 lines
3.8 KiB
Diff
91 lines
3.8 KiB
Diff
From c2373316af1891f3a2d4af94052f12d2b4c88c49 Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
|
Date: Fri, 21 Aug 2020 08:39:28 +0200
|
|
Subject: [PATCH] configure.ac: Add configure option for local queues naming
|
|
for remote CUPS queues
|
|
|
|
---
|
|
configure.ac | 30 +++++++++++++++++++++++++++---
|
|
utils/cups-browsed.c | 10 +++++++++-
|
|
2 files changed, 36 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 580b107d..20899740 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -850,6 +850,29 @@ PKG_CHECK_EXISTS([liblouis], [
|
|
AM_CONDITIONAL(ENABLE_BRAILLE, test "x$enable_braille" = xyes)
|
|
AC_SUBST(TABLESDIR)
|
|
|
|
+# =========================================
|
|
+# Local queue naming for remote CUPS queues
|
|
+# =========================================
|
|
+AC_ARG_WITH([remote-cups-local-queue-naming],
|
|
+ [AS_HELP_STRING([--with-remote-cups-local-queue-naming=DNS-SD|MakeModel|RemoteName], [Choose the origin of local queue naming for remote CUPS queues, default based on DNS-SD ID])],
|
|
+ [case "x$withval" in
|
|
+ "xMakeModel")
|
|
+ REMOTE_CUPS_LOCAL_QUEUE_NAMING="MakeModel"
|
|
+ AC_DEFINE([NAMING_MAKE_MODEL], [1], [Define that we create local queues for remote CUPS queues based on printer Make-Model])
|
|
+ ;;
|
|
+ "xRemoteName")
|
|
+ REMOTE_CUPS_LOCAL_QUEUE_NAMING="RemoteName"
|
|
+ AC_DEFINE([NAMING_REMOTE_NAME], [1], [Define that we create local queues for remote CUPS queues based on their print queue name on the server])
|
|
+ ;;
|
|
+ *)
|
|
+ REMOTE_CUPS_LOCAL_QUEUE_NAMING="DNS-SD"
|
|
+ AC_DEFINE([NAMING_DNSSD], [1], [Define that we create local queues for remote CUPS queues based on DNS-SD name])
|
|
+ ;;
|
|
+ esac],
|
|
+ [REMOTE_CUPS_LOCAL_QUEUE_NAMING="DNS-SD"
|
|
+ AC_DEFINE([NAMING_DNSSD], [1], [Define that we create local queues for remote CUPS queues based on DNS-SD name])]
|
|
+)
|
|
+
|
|
# =========================================================
|
|
# Select a different shell instead of the default /bin/bash
|
|
# =========================================================
|
|
@@ -919,9 +942,9 @@ AC_OUTPUT
|
|
AC_MSG_NOTICE([
|
|
==============================================================================
|
|
Environment settings:
|
|
- CFLAGS: ${CFLAGS}
|
|
- CXXFLAGS: ${CXXFLAGS}
|
|
- LDFLAGS: ${LDFLAGS}
|
|
+ CFLAGS: ${CFLAGS}
|
|
+ CXXFLAGS: ${CXXFLAGS}
|
|
+ LDFLAGS: ${LDFLAGS}
|
|
Build configuration:
|
|
cups-config: ${with_cups_config}
|
|
font directory: ${sysconfdir}/${FONTDIR}
|
|
@@ -955,6 +978,7 @@ Build configuration:
|
|
driverless: ${enable_driverless}
|
|
apple-raster: ${APPLE_RASTER_FILTER}
|
|
pclm: ${enable_pclm}
|
|
+ local queue naming for remote CUPS queues: ${REMOTE_CUPS_LOCAL_QUEUE_NAMING}
|
|
all ipp printer auto-setup: ${enable_auto_setup_all}
|
|
only driverless auto-setup: ${enable_auto_setup_driverless_only}
|
|
only local auto-setup: ${enable_auto_setup_local_only}
|
|
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
|
index 9f0e7b92..64675e1c 100644
|
|
--- a/utils/cups-browsed.c
|
|
+++ b/utils/cups-browsed.c
|
|
@@ -443,7 +443,15 @@ static unsigned int HttpRemoteTimeout = 10;
|
|
static unsigned int HttpMaxRetries = 5;
|
|
static unsigned int DNSSDBasedDeviceURIs = 1;
|
|
static ip_based_uris_t IPBasedDeviceURIs = IP_BASED_URIS_NO;
|
|
-static local_queue_naming_t LocalQueueNamingRemoteCUPS=LOCAL_QUEUE_NAMING_DNSSD;
|
|
+#ifdef NAMING_MAKE_MODEL
|
|
+static local_queue_naming_t LocalQueueNamingRemoteCUPS = LOCAL_QUEUE_NAMING_MAKE_MODEL;
|
|
+#else
|
|
+# ifdef NAMING_REMOTE_NAME
|
|
+static local_queue_naming_t LocalQueueNamingRemoteCUPS = LOCAL_QUEUE_NAMING_REMOTE_NAME;
|
|
+# else
|
|
+static local_queue_naming_t LocalQueueNamingRemoteCUPS = LOCAL_QUEUE_NAMING_DNSSD;
|
|
+# endif
|
|
+#endif
|
|
static local_queue_naming_t LocalQueueNamingIPPPrinter=LOCAL_QUEUE_NAMING_DNSSD;
|
|
static unsigned int OnlyUnsupportedByCUPS = 0;
|
|
static unsigned int UseCUPSGeneratedPPDs = 0;
|
|
--
|
|
2.26.2
|
|
|