From aef45d51d1204f3335fb99de6658e0c5612c2b67 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 29 Sep 2017 11:11:56 +0100 Subject: build: automatically handle GIT submodule checkout for dtc Currently if DTC is required by configure and not available in the host OS install, we exit with an error message telling the user to checkout a git submodule or install the library. This introduces automatic handling of the git submodule checkout process and enables it for dtc. This only runs if building from GIT, so users of release tarballs still need the system library install. The current state of the git checkout is stashed in .git-submodule-status, and a helper program is used to determine if this state matches the desired submodule state. A dependency against 'Makefile' ensures that the submodule state is refreshed at the start of the build process Signed-off-by: Daniel P. Berrange Message-id: 20170929101201.21039-2-berrange@redhat.com [ kraxel: use /bin/sh not bash for scripts/git-submodule.sh ] [ kraxel: fix Makefile dependencies ] Signed-off-by: Gerd Hoffmann [fixup] Makefile dep --- configure | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 6587e8014b..38f1710c80 100755 --- a/configure +++ b/configure @@ -264,6 +264,7 @@ cc_i386=i386-pc-linux-gnu-gcc libs_qga="" debug_info="yes" stack_protector="" +git_submodules="" # Don't accept a target_list environment variable. unset target_list @@ -3584,27 +3585,30 @@ EOF if compile_prog "" "$fdt_libs" ; then # system DTC is good - use it fdt=yes - elif test -d ${source_path}/dtc/libfdt ; then - # have submodule DTC - use it - fdt=yes - dtc_internal="yes" - mkdir -p dtc - if [ "$pwd_is_source_path" != "y" ] ; then - symlink "$source_path/dtc/Makefile" "dtc/Makefile" - symlink "$source_path/dtc/scripts" "dtc/scripts" - fi - fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt" - fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" - elif test "$fdt" = "yes" ; then - # have neither and want - prompt for system/submodule install - error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \ - " (1) Preferred: Install the DTC (libfdt) devel package" \ - " (2) Fetch the DTC submodule, using:" \ - " git submodule update --init dtc" else - # don't have and don't want - fdt_libs= - fdt=no + # have GIT checkout, so activate dtc submodule + if test -e "${source_path}/.git" ; then + git_submodules="${git_submodules} dtc" + fi + if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then + fdt=yes + dtc_internal="yes" + mkdir -p dtc + if [ "$pwd_is_source_path" != "y" ] ; then + symlink "$source_path/dtc/Makefile" "dtc/Makefile" + symlink "$source_path/dtc/scripts" "dtc/scripts" + fi + fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt" + fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" + elif test "$fdt" = "yes" ; then + # Not a git build & no libfdt found, prompt for system install + error_exit "DTC (libfdt) version >= 1.4.2 not present." \ + "Please install the DTC (libfdt) devel package" + else + # don't have and don't want + fdt_libs= + fdt=no + fi fi fi @@ -5295,6 +5299,7 @@ echo "local state directory queried at runtime" echo "Windows SDK $win_sdk" fi echo "Source path $source_path" +echo "GIT submodules $git_submodules" echo "C compiler $cc" echo "Host C compiler $host_cc" echo "C++ compiler $cxx" @@ -5483,6 +5488,7 @@ echo "extra_cxxflags=$EXTRA_CXXFLAGS" >> $config_host_mak echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak echo "qemu_localedir=$qemu_localedir" >> $config_host_mak echo "libs_softmmu=$libs_softmmu" >> $config_host_mak +echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak -- cgit v1.2.1 From 927128222b0a91f56c13a0e040d0c68da06ec433 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 29 Sep 2017 11:11:58 +0100 Subject: ui: add keycodemapdb repository as a GIT submodule The https://gitlab.com/keycodemap/keycodemapdb/ repo contains a data file mapping between all the different scancode/keycode/keysym sets that are known, and a tool to auto-generate lookup tables for different combinations. It is used by GTK-VNC, SPICE-GTK and libvirt for mapping keys. Using it in QEMU will let us replace many hand written lookup tables with auto-generated tables from a master data source, reducing bugs. Adding new QKeyCodes will now only require the master table to be updated, all ~20 other tables will be automatically updated to follow. Signed-off-by: Daniel P. Berrange Message-id: 20170929101201.21039-4-berrange@redhat.com [ kraxel: fix build ] [ kraxel: switch repo to qemu.git mirror ] Signed-off-by: Gerd Hoffmann --- configure | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 38f1710c80..06f18ea9af 100755 --- a/configure +++ b/configure @@ -264,7 +264,13 @@ cc_i386=i386-pc-linux-gnu-gcc libs_qga="" debug_info="yes" stack_protector="" -git_submodules="" + +if test -e "$source_path/.git" +then + git_submodules="ui/keycodemapdb" +else + git_submodules="" +fi # Don't accept a target_list environment variable. unset target_list -- cgit v1.2.1 From 6a021536e2390d4f74974381362b3e92ebe71f7e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 5 Oct 2017 17:33:28 +0200 Subject: tools: add qemu-keymap qemu-keymap generates qemu reverse keymaps from xkb keymaps, which can be used with the qemu "-k" command line switch. Signed-off-by: Gerd Hoffmann Message-id: 20171005153330.19210-2-kraxel@redhat.com --- configure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 06f18ea9af..be53b6b104 100755 --- a/configure +++ b/configure @@ -304,6 +304,7 @@ vde="" vnc_sasl="" vnc_jpeg="" vnc_png="" +xkbcommon="" xen="" xen_ctrl_version="" xen_pv_domain_build="no" @@ -2907,6 +2908,21 @@ 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 + ########################################## # fnmatch() probe, used for ACL routines fnmatch="no" @@ -5107,6 +5123,9 @@ if test "$softmmu" = yes ; then mpath=no fi fi +if test "$xkbcommon" = "yes"; then + tools="qemu-keymap\$(EXESUF) $tools" +fi # Probe for guest agent support/options @@ -5606,6 +5625,10 @@ fi if test "$vnc_png" = "yes" ; then echo "CONFIG_VNC_PNG=y" >> $config_host_mak fi +if test "$xkbcommon" = "yes" ; then + echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak + echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak +fi if test "$fnmatch" = "yes" ; then echo "CONFIG_FNMATCH=y" >> $config_host_mak fi -- cgit v1.2.1