summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-02-15 02:58:16 +0000
committerMatthias Clasen <mclasen@redhat.com>2018-02-15 02:58:16 +0000
commit753138a7cc3814ee811eb0dd28e3b3c61cde063c (patch)
tree73ca23067575ccfdc63a3f9f4a50020049e3d790 /modules
parent716f7cd3f77174090e0d886985a9be83928ade2e (diff)
parent327e7a4ccc8585b98a58a6526cb84448df2d0f53 (diff)
downloadgtk+-753138a7cc3814ee811eb0dd28e3b3c61cde063c.tar.gz
Merge branch 'issue-2' into 'master'
Update the configuration options Closes #2 See merge request GNOME/gtk!11
Diffstat (limited to 'modules')
-rw-r--r--modules/input/meson.build24
-rw-r--r--modules/printbackends/cups/meson.build2
-rw-r--r--modules/printbackends/meson.build25
3 files changed, 30 insertions, 21 deletions
diff --git a/modules/input/meson.build b/modules/input/meson.build
index 0111790c73..e60dbcc59e 100644
--- a/modules/input/meson.build
+++ b/modules/input/meson.build
@@ -6,8 +6,8 @@
# there is a bit of an ordering problem which we solve by collecting all the
# information here but moving the actual build definitions to gtk/meson.build.
build_dynamic_modules = false
-disable_modules = get_option('disable-modules')
-if not disable_modules
+dynamic_modules = get_option('dynamic-modules')
+if dynamic_modules
gmodule_supported = dependency('gmodule-no-export-2.0').get_pkgconfig_variable('gmodule_supported')
if gmodule_supported == 'true'
build_dynamic_modules = true
@@ -32,21 +32,15 @@ all_immodules = [
all_immodules += backend_immodules
# Allow building some or all immodules included
-included_immodules = get_option('with-included-immodules')
-if included_immodules == 'none'
- included_immodules = ''
-elif included_immodules == 'all' or included_immodules == 'yes'
- included_immodules = ','.join(all_immodules)
-endif
-
-if included_immodules == ''
- have_included_immodules = false
+included_immodules = get_option('included-immodules').split(',')
+if included_immodules.contains('none')
included_immodules = []
-else
- have_included_immodules = true
- included_immodules = included_immodules.split(',')
+elif included_immodules.contains('all')
+ included_immodules = all_immodules
endif
+have_included_immodules = included_immodules.length() > 0
+
foreach im: included_immodules
if not all_immodules.contains(im)
error('The specified input method "@0@" is not available (available methods: @1@)'.format(im, ', '.join(all_immodules)))
@@ -107,5 +101,3 @@ foreach m: method_defs
endif
endif
endforeach
-
-# TODO: post-install gtk4-query-immodules run to create immodules.c
diff --git a/modules/printbackends/cups/meson.build b/modules/printbackends/cups/meson.build
index a6f83d51e7..ef7a30ee9a 100644
--- a/modules/printbackends/cups/meson.build
+++ b/modules/printbackends/cups/meson.build
@@ -1,4 +1,4 @@
-enable_colord = get_option('enable-colord')
+enable_colord = get_option('colord')
if enable_colord != 'no'
want_colord = enable_colord == 'yes'
colord_dep = dependency('colord', version: '>= 0.1.9', required: want_colord)
diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build
index a348fda185..fa6ef4567d 100644
--- a/modules/printbackends/meson.build
+++ b/modules/printbackends/meson.build
@@ -1,7 +1,23 @@
+all_print_backends = [
+ 'cups',
+ 'papi',
+ 'cloudprint',
+ 'test',
+]
+
+enabled_print_backends = get_option('print-backends').split(',')
+
+if enabled_print_backends.contains('none')
+ enabled_print_backends = []
+elif enabled_print_backends.contains('all')
+ enabled_print_backends = all_print_backends
+endif
+
+# The 'file' print backend cannot be disabled
print_backends = ['file']
# Checks to see if we should compile with CUPS backend for GTK+
-enable_cups = get_option('enable-cups-print-backend')
+enable_cups = enabled_print_backends.contains('cups')
if enable_cups != 'no'
want_cups = enable_cups == 'yes'
#cups_config = find_program('cups-config', required : want_cups)
@@ -37,7 +53,7 @@ if enable_cups != 'no'
endif
# Checks to see if we should compile with PAPI backend for GTK+
-enable_papi = get_option('enable-papi-print-backend')
+enable_papi = enabled_print_backends.contains('papi')
if enable_papi != 'no'
want_papi = enable_papi == 'yes'
libpapi = cc.find_library('libpapi', required : false)
@@ -49,7 +65,7 @@ if enable_papi != 'no'
endif
# Checks to see if we should compile with cloudprint backend for GTK+
-enable_cloudprint = get_option('enable-cloudprint-print-backend')
+enable_cloudprint = enabled_print_backends.contains('cloudprint')
if enable_cloudprint != 'no'
want_cloudprint = enable_cloudprint == 'yes'
rest_dep = dependency('rest-0.7', required : want_cloudprint)
@@ -72,10 +88,11 @@ if os_unix
endif
endif
-if get_option('enable-test-print-backend') == 'yes'
+if enabled_print_backends.contains('test')
print_backends += ['test']
endif
+# Automatic fall-back to the lpr backend
if not print_backends.contains('papi') and not print_backends.contains('cups')
print_backends += ['lpr']
endif