diff --git a/js/misc/config.js.in b/js/misc/config.js.in index e54e28044..f9210397a 100644 --- a/js/misc/config.js.in +++ b/js/misc/config.js.in @@ -8,6 +8,8 @@ var PACKAGE_VERSION = '@PACKAGE_VERSION@'; var HAVE_BLUETOOTH = @HAVE_BLUETOOTH@; /* 1 if networkmanager is available, 0 otherwise */ var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@; +/* 1 if soup3 support is enabled, 0 otherwise */ +var HAVE_SOUP2 = @HAVE_SOUP2@; /* gettext package */ var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@'; /* locale dir */ diff --git a/js/misc/meson.build b/js/misc/meson.build index 2702c3dbc..582562711 100644 --- a/js/misc/meson.build +++ b/js/misc/meson.build @@ -5,6 +5,7 @@ jsconf.set('GETTEXT_PACKAGE', meson.project_name()) jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version) jsconf.set10('HAVE_BLUETOOTH', bt_dep.found()) jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager) +jsconf.set10('HAVE_SOUP2', have_soup2) jsconf.set('datadir', datadir) jsconf.set('libexecdir', libexecdir) diff --git a/js/ui/environment.js b/js/ui/environment.js index bd372ce26..89ff701c7 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -12,6 +12,8 @@ imports.gi.versions.TelepathyGLib = '0.12'; imports.gi.versions.TelepathyLogger = '0.2'; try { + if (Config.HAVE_SOUP2) + throw new Error('Soup3 support not enabled'); const Soup_ = imports.gi.Soup; } catch (e) { imports.gi.versions.Soup = '2.4'; diff --git a/meson.build b/meson.build index 5e9053558..584750051 100644 --- a/meson.build +++ b/meson.build @@ -128,6 +128,8 @@ else have_systemd = false endif +have_soup2 = get_option('soup2') + if get_option('man') if fs.exists('man/gnome-shell.1') install_man('man/gnome-shell.1') diff --git a/meson_options.txt b/meson_options.txt index ef76b73c3..be9aa21f3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -33,3 +33,9 @@ option('systemd', value: true, description: 'Enable systemd integration' ) + +option('soup2', + type: 'boolean', + value: true, + description: 'Use Soup 2.4 instead of Soup 3. Must be in sync with libgweather' +)