]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
configure: move gettext detection to meson.build
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 10 Dec 2020 19:04:12 +0000 (19:04 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Jan 2021 20:03:09 +0000 (21:03 +0100)
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>

configure
meson_options.txt
po/meson.build

index 881af4b6beaa5d7ee6953a5f82aa14f64ee55ec1..487d27292114c164635edde90c6ba2c05d2a9fb9 100755 (executable)
--- 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"
   ;;
@@ -2848,19 +2848,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
index 74ac8535486dc20da2e917b0a6f41ceff77f82bd..f8f053b5c8b85ccea4ea2e81d2aca9616d5d737b 100644 (file)
@@ -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')
index 1387fd979aa3df7abb8e33743f3de19570fc05fb..a863f0575f6c19c51698e20bd9fa76e3e86ee34c 100644 (file)
@@ -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')