summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2019-09-13 18:26:54 -0700
committerPhilip Chimento <philip@endlessm.com>2019-09-16 14:09:40 -0700
commit389ee0dfe5f8002cd266b9f53ee03015ae08821b (patch)
treecac16768a0b35e882a5ec3f80c2d354de0d7d20a /meson.build
parent96137369a5992721f5a3e543239bfa4a24431ff1 (diff)
downloadgnome-control-center-389ee0dfe5f8002cd266b9f53ee03015ae08821b.tar.gz
printers: Use CUPS httpConnect2() if available
In CUPS 1.7 httpConnect() and httpConnectEncrypt() were deprecated and replaced with httpConnect2(). This checks if httpConnect2() is available and if so, replaces the uses of the deprecated functions. In the CUPS source code, httpConnect() and httpConnectEncrypt() are now wrappers around httpConnect2(), so we make sure to use the same arguments as in the CUPS source code so the two code paths are sure to be identical: https://github.com/apple/cups/blob/2c030c7a06e0c2b8227c7e85f5c58dfb339731d0/cups/http.c#L412 https://github.com/apple/cups/blob/2c030c7a06e0c2b8227c7e85f5c58dfb339731d0/cups/http.c#L477
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 5c879a4a2..7d2db5c94 100644
--- a/meson.build
+++ b/meson.build
@@ -165,6 +165,10 @@ foreach header: check_headers
assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1])
endforeach
+config_h.set10('HAVE_CUPS_HTTPCONNECT2',
+ cc.has_function('httpConnect2', dependencies: cups_dep),
+ description: 'Define if httpConnect2() is available in CUPS')
+
# Optional dependency for the user accounts panel
enable_cheese = get_option('cheese')
if enable_cheese