Detect CUPS ≥ 1.7

We support CUPS ≥ 1.2, but we use API that was introduced and deprecated
at a later point.
This commit is contained in:
Emmanuele Bassi 2019-04-12 17:58:53 +01:00 committed by Marek Kasik
parent e847c030bd
commit feddf5a694
2 changed files with 6 additions and 0 deletions

View 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

View 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,