meson: keymap fixes

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCgAGBQJfRK1jAAoJEEy22O7T6HE4iyQP/10/we5cHC9s0ctlWn6JoLWG
 MPVqONEQJwgPNTejTttYiXYJIwPJVgL3T6hlhGepEnRQiMTDfQFebXev1zISUUsy
 1+8LkMlF1Ny8Je4IWacfIklRRAyUihPXzcFMs3CIIR6LVqdU/p9riSAh3kOa8+C+
 mLsLX+9GDmIw7yHROrAGcmK4kmkg1L3gpKRlU4b2g36KgW/GCS4mQSjKY0qhsDR9
 a0f3V1slTp6nF6EDwC2s+bQojBBmt917mnB0r5Mj+9Gux9sTGIaecD5K5/8ePzE1
 AIB3twStsnu9GRlf8GF+i6El4l2nLPV/q1Wq5QV7SOPO/KWiW4PpoOPMN48DNoW2
 Ya/t3EYTUDl39MvOSWu6wpZD/kNbD8rFq0aH8y57/mfmJVieFPPgnv6fkJh0t1Ql
 0LvrEzrh2fdGuwenj2x0hB1m+BJ+THXI3krFlyi4EDJI91ZXI0Vll/8IAmVeitz5
 rQi12q8tAhdPVWC7kapJuxHXm7PWcUC4KDNo2XfKXNmHhlr8KI76umasMEp+BicK
 Gr839VyNY8Khb0CAqPYwRGwBgA+eRyhH2w6lvr/O9fvWS6JCDFwwXzJJOy5kXfoc
 UrpD5xR/ApAshEBvwiJwFu7IQQ4b6OaB085hskI8b7wqZ66qgjX0rQ6zSyTVOXTm
 6lMQLgTJpz2eCz14AJfs
 =mzHK
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200825-pull-request' into staging

meson: keymap fixes

# gpg: Signature made Tue 25 Aug 2020 07:19:15 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/fixes-20200825-pull-request:
  meson: avoid compiling qemu-keymap by default
  meson: move xkbcommon to meson
  meson: drop keymaps symlink

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-08-25 10:54:50 +01:00
commit 7774e403f2
4 changed files with 18 additions and 32 deletions

31
configure vendored
View file

@ -432,7 +432,7 @@ vde=""
vnc_sasl="auto"
vnc_jpeg="auto"
vnc_png="auto"
xkbcommon=""
xkbcommon="auto"
xen=""
xen_ctrl_version=""
xen_pci_passthrough=""
@ -1631,9 +1631,9 @@ for opt do
;;
--disable-libpmem) libpmem=no
;;
--enable-xkbcommon) xkbcommon=yes
--enable-xkbcommon) xkbcommon="enabled"
;;
--disable-xkbcommon) xkbcommon=no
--disable-xkbcommon) xkbcommon="disabled"
;;
--enable-plugins) plugins="yes"
;;
@ -3446,22 +3446,6 @@ EOF
fi
fi
##########################################
# xkbcommon probe
if test "$xkbcommon" != "no" ; then
if $pkg_config xkbcommon --exists; then
xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
xkbcommon_libs=$($pkg_config xkbcommon --libs)
xkbcommon=yes
else
if test "$xkbcommon" = "yes" ; then
feature_not_found "xkbcommon" "Install libxkbcommon-devel"
fi
xkbcommon=no
fi
fi
##########################################
# xfsctl() probe, used for file-posix.c
if test "$xfs" != "no" ; then
@ -6827,11 +6811,6 @@ if test "$audio_win_int" = "yes" ; then
fi
echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
if test "$xkbcommon" = "yes" ; then
echo "CONFIG_XKBCOMMON=y" >> $config_host_mak
echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak
fi
if test "$xfs" = "yes" ; then
echo "CONFIG_XFS=y" >> $config_host_mak
fi
@ -8120,7 +8099,7 @@ DIRS="$DIRS roms/seabios"
LINKS="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/optionrom/Makefile"
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
LINKS="$LINKS roms/seabios/Makefile"
LINKS="$LINKS pc-bios/qemu-icon.bmp"
@ -8251,7 +8230,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 \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon \
$cross_arg \
"$PWD" "$source_path"

View file

@ -152,10 +152,10 @@ libcap_ng = not_found
if 'CONFIG_LIBCAP_NG' in config_host
libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
endif
xkbcommon = not_found
if 'CONFIG_XKBCOMMON' in config_host
xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
link_args: config_host['XKBCOMMON_LIBS'].split())
xkbcommon = dependency('xkbcommon', required: get_option('xkbcommon'), static: enable_static,
include_type: 'system')
if xkbcommon.found()
xkbcommon = declare_dependency(dependencies: xkbcommon)
endif
slirp = not_found
if config_host.has_key('CONFIG_SLIRP')
@ -389,6 +389,7 @@ config_host_data.set('CONFIG_VNC', vnc.found())
config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
config_host_data.set('CONFIG_VNC_PNG', png.found())
config_host_data.set('CONFIG_VNC_SASL', sasl.found())
config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found())
config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0])
config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
@ -1062,7 +1063,12 @@ if 'CONFIG_GUEST_AGENT' in config_host
subdir('qga')
endif
if 'CONFIG_XKBCOMMON' in config_host
# Don't build qemu-keymap if xkbcommon is not explicitly enabled
# when we don't build tools or system
if get_option('xkbcommon').auto() and not have_system and not have_tools
xkbcommon = not_found
endif
if xkbcommon.found()
# used for the update-keymaps target, so include rules even if !have_tools
qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,
dependencies: [qemuutil, xkbcommon], install: have_tools)

View file

@ -5,3 +5,4 @@ option('vnc', type : 'feature', value : 'enabled')
option('vnc_jpeg', type : 'feature', value : 'auto')
option('vnc_png', type : 'feature', value : 'auto')
option('vnc_sasl', type : 'feature', value : 'auto')
option('xkbcommon', type : 'feature', value : 'auto')

View file

@ -95,7 +95,7 @@ keymaps = [
['osx', 'qcode'],
]
if have_system or 'CONFIG_XKBCOMMON' in config_host
if have_system or xkbcommon.found()
foreach e : keymaps
output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1])
genh += custom_target(output,