meson: convert po/

Meson warns if xgettext is not found.  In the future we may want to add
a required argument to i18n.gettext(); in the meanwhile, I am adding a
--enable-gettext/--disable-gettext option and feature detection in
configure.  This preserves QEMU's default behavior of detecting system
features, without any warning, if neither --enable-* nor --disable-*
is requested.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-09-19 21:02:09 +04:00 committed by Paolo Bonzini
parent a0b93237d8
commit e8f3bd71d8
12 changed files with 44 additions and 131 deletions

21
configure vendored
View file

@ -569,6 +569,7 @@ secret_keyring=""
libdaxctl=""
meson=""
skip_meson=no
gettext=""
bogus_os="no"
malloc_trim=""
@ -1161,6 +1162,10 @@ for opt do
;;
--enable-vnc) vnc="enabled"
;;
--disable-gettext) gettext="false"
;;
--enable-gettext) gettext="true"
;;
--oss-lib=*) oss_lib="$optarg"
;;
--audio-drv-list=*) audio_drv_list="$optarg"
@ -3032,6 +3037,19 @@ if test "$whpx" != "no" ; 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
##########################################
# Sparse probe
if test "$sparse" != "no" ; then
@ -8099,7 +8117,7 @@ DIRS="$DIRS docs docs/interop fsdev scsi"
DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
DIRS="$DIRS roms/seabios"
LINKS="Makefile"
LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
LINKS="$LINKS tests/tcg/lm32/Makefile"
LINKS="$LINKS tests/tcg/Makefile.target"
LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
@ -8231,6 +8249,7 @@ NINJA=$PWD/ninjatool $meson setup \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
-Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
-Dgettext=$gettext \
$cross_arg \
"$PWD" "$source_path"