Detect CUPS ≥ 1.7
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 12 Apr 2019 16:58:53 +0000 (17:58 +0100)
committerMarek Kasik <mkasik@redhat.com>
Tue, 7 May 2019 16:30:47 +0000 (18:30 +0200)
We support CUPS ≥ 1.2, but we use API that was introduced and deprecated
at a later point.

config.h.meson
modules/printbackends/meson.build

index 74a90d3df8ce8bfb76624df000bd3a5d7c49be2d..b792b4ae939bde5235b8c1282a9e19c3d155abd7 100644 (file)
@@ -27,6 +27,9 @@
 /* Define to 1 if CUPS 1.6 API is available */
 #mesondefine HAVE_CUPS_API_1_6
 
+/* Define to 1 if CUPS 2.0 API is available */
+#mesondefine HAVE_CUPS_API_2_0
+
 /* Define to 1 if you have the `dcgettext' function. */
 #mesondefine HAVE_DCGETTEXT
 
index 0e26d829f95abd8f15671f4aca2c80b6469cdd2c..00ee33a80dec6b4536399e1c4958f239dc95e110 100644 (file)
@@ -30,6 +30,9 @@ if enable_cups
       if cups_major_version > 1 or cups_minor_version >= 6
         cdata.set('HAVE_CUPS_API_1_6', 1)
       endif
+      if cups_major_version > 1 or cups_minor_version >= 7
+        cdata.set('HAVE_CUPS_API_2_0', 1)
+      endif
 
       if cc.compiles('#include <cups/http.h> \n http_t http; char *s = http.authstring;')
         cdata.set('HAVE_HTTP_AUTHSTRING', 1,