qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: avoid compiling qemu-keymap by default


From: Paolo Bonzini
Subject: Re: [PATCH] configure: avoid compiling qemu-keymap by default
Date: Sun, 23 Aug 2020 22:43:50 +0200

Hi Laurent, there are two ways to do this in Meson without having to add more special casing in configure.

The simplest is to build qemu-keymap by default only if have_tools. This is a one-liner adding the "build_by_default: have_tools" argument.

The second is to move the detection of xkbcommon to Meson, and putting it under "if have_system || have_tools", that is where meson.build has the qemu-keymap executable you do

xkbcommon = not_found
if have_system || have_tools
  xkbcommon = ...
endif
if xkbcommon.found()
  qemu_keymap = ...
endif

and CONFIG_XKBCOMMON can also be replaced by xkbcommon.found().

This is a bit more complicated but all the parts are explained in docs/devel/build-system.rst.

Feel free to pick the simplest of the two, I just explained both just in case. When I am back I can also explain you on IRC the way I translated the syscall_nr.h generator.

Thanks,

Paolo

Il dom 23 ago 2020, 22:32 <no-reply@patchew.org> ha scritto:
qemu-keymap is not needed with linux-user, so disable it by default if
tools are disabled (tools are disabled by default with linux-user).

Avoid this error with statically linked binaries:

    Linking target qemu-keymap
    /usr/bin/ld: cannot find -lxkbcommon

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configure b/configure
index d9ca87fbbb52..2cab3330d010 100755
--- a/configure
+++ b/configure
@@ -3448,6 +3448,11 @@ fi

 ##########################################
 # xkbcommon probe
+if test -z "$xkbcommon"; then
+  if test "$want_tools" = "no"; then
+    xkbcommon=no
+  fi
+fi
 if test "$xkbcommon" != "no" ; then
   if $pkg_config xkbcommon --exists; then
     xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
--
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]