[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/11] configure: move gettext detection to meson.build
From: |
Alex Bennée |
Subject: |
[PULL 03/11] configure: move gettext detection to meson.build |
Date: |
Wed, 16 Dec 2020 16:48:19 +0000 |
This will allow meson to honour -Dauto_features=disabled later.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201210190417.31673-4-alex.bennee@linaro.org>
diff --git a/configure b/configure
index d37ec98aa9..f9b1e4fbb0 100755
--- a/configure
+++ b/configure
@@ -448,7 +448,7 @@ libdaxctl=""
meson=""
ninja=""
skip_meson=no
-gettext=""
+gettext="auto"
fuse="auto"
fuse_lseek="auto"
@@ -1016,9 +1016,9 @@ for opt do
;;
--enable-vnc) vnc="enabled"
;;
- --disable-gettext) gettext="false"
+ --disable-gettext) gettext="disabled"
;;
- --enable-gettext) gettext="true"
+ --enable-gettext) gettext="enabled"
;;
--oss-lib=*) oss_lib="$optarg"
;;
@@ -2847,19 +2847,6 @@ if test "$xen_pci_passthrough" != "disabled"; then
fi
fi
-##########################################
-# gettext probe
-if test "$gettext" != "false" ; then
- if has xgettext; then
- gettext=true
- else
- if test "$gettext" = "true" ; then
- feature_not_found "gettext" "Install xgettext binary"
- fi
- gettext=false
- fi
-fi
-
##########################################
# X11 probe
if $pkg_config --exists "x11"; then
diff --git a/meson_options.txt b/meson_options.txt
index 74ac853548..f8f053b5c8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -9,7 +9,7 @@ option('sphinx_build', type : 'string', value : '',
option('docs', type : 'feature', value : 'auto',
description: 'Documentations build support')
-option('gettext', type : 'boolean', value : true,
+option('gettext', type : 'feature', value : 'auto',
description: 'Localization of the GTK+ user interface')
option('install_blobs', type : 'boolean', value : true,
description: 'install provided firmware blobs')
diff --git a/po/meson.build b/po/meson.build
index 1387fd979a..a863f0575f 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,6 +1,6 @@
i18n = import('i18n')
-if get_option('gettext')
+if find_program('xgettext', required: get_option('gettext')).found()
i18n.gettext(meson.project_name(),
args: '--msgid-bugs-address=qemu-devel@nongnu.org',
preset: 'glib')
--
2.20.1
- [PULL 00/11] testing and configure updates, Alex Bennée, 2020/12/16
- [PULL 01/11] configure: include moxie-softmmu in deprecated_targets_list, Alex Bennée, 2020/12/16
- [PULL 02/11] gitlab: include aarch64-softmmu and ppc64-softmmu cross-system-build, Alex Bennée, 2020/12/16
- [PULL 03/11] configure: move gettext detection to meson.build,
Alex Bennée <=
- [PULL 04/11] configure: add --without-default-features, Alex Bennée, 2020/12/16
- [PULL 05/11] python: add __repr__ to ConsoleSocket to aid debugging, Alex Bennée, 2020/12/16
- [PULL 06/11] gitlab: move --without-default-devices build from Travis, Alex Bennée, 2020/12/16
- [PULL 07/11] gitlab: add --without-default-features build, Alex Bennée, 2020/12/16
- [PULL 08/11] tests/tcg: build tests with -Werror, Alex Bennée, 2020/12/16
- [PULL 09/11] gitlab-CI: Test 32-bit builds with the fedora-i386-cross container, Alex Bennée, 2020/12/16
- [PULL 10/11] tests/docker: Remove the remainders of debian9 containers from the Makefile, Alex Bennée, 2020/12/16
- [PULL 11/11] tests: update for rename of CentOS8 PowerTools repo, Alex Bennée, 2020/12/16
- Re: [PULL 00/11] testing and configure updates, Alex Bennée, 2020/12/16