summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChristoph Reiter <creiter@src.gnome.org>2019-06-15 09:58:38 +0200
committerChristoph Reiter <creiter@src.gnome.org>2019-06-15 10:08:46 +0200
commitd402cd4e2e71824c1fc6a78828f8df123a2d28ec (patch)
treebab1bb25298bf4e408228b11f5a2b1dd793f5a71 /modules
parent175c4006780bfe4f433d02ad28f23f2c3429d811 (diff)
downloadgtk+-d402cd4e2e71824c1fc6a78828f8df123a2d28ec.tar.gz
build: only require cups >=1.7
In 9236ee0564de the cups code was updated to use newer API with cups >= 2 and a later commit (a7e207abe) dropped the old code paths and added version checks in meson/autotools. The newly used functions were httpConnect2 and httpReconnect2 which are available since 1.7 and don't require cups 2.0. Change the versions checks to 1.7 instead so gtk can still be build with older cups (macOS 10.9 for example, see #1950)
Diffstat (limited to 'modules')
-rw-r--r--modules/printbackends/meson.build7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build
index 930b9012a8..a83dbe0561 100644
--- a/modules/printbackends/meson.build
+++ b/modules/printbackends/meson.build
@@ -73,9 +73,10 @@ if enabled_print_backends.contains('cups')
if cc.has_header('cups/cups.h')
cups_major_version = cc.compute_int('CUPS_VERSION_MAJOR', prefix : '#include <cups/cups.h>')
cups_minor_version = cc.compute_int('CUPS_VERSION_MINOR', prefix : '#include <cups/cups.h>')
- message('Found CUPS version: @0@.@1@'.format(cups_major_version, cups_minor_version))
- if cups_major_version < 2
- cups_error = 'Need CUPS version >= 2.0'
+ cups_version = '@0@.@1@'.format(cups_major_version, cups_minor_version)
+ message('Found CUPS version: @0@'.format(cups_version))
+ if cups_version.version_compare('<1.7')
+ cups_error = 'Need CUPS version >= 1.7'
else
libcups = cc.find_library('cups', required : true)
endif