diff mbox series

[v3,02/46] configure: add test for docker availability

Message ID 20180424152405.10304-3-alex.bennee@linaro.org
State Superseded
Headers show
Series fix building of tests/tcg | expand

Commit Message

Alex Bennée April 24, 2018, 3:23 p.m. UTC
This tests for a working docker installation without sudo and sets up
config-host.mak accordingly. This will be useful from cross compiling
things in the future.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 configure | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

-- 
2.17.0

Comments

Richard Henderson April 25, 2018, 12:06 a.m. UTC | #1
On 04/24/2018 05:23 AM, Alex Bennée wrote:
> This tests for a working docker installation without sudo and sets up

> config-host.mak accordingly. This will be useful from cross compiling

> things in the future.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  configure | 17 +++++++++++++++++

>  1 file changed, 17 insertions(+)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



r~
diff mbox series

Patch

diff --git a/configure b/configure
index 0a19b033bc..b0ae632ee4 100755
--- a/configure
+++ b/configure
@@ -451,6 +451,7 @@  jemalloc="no"
 replication="yes"
 vxhs=""
 libxml2=""
+docker="no"
 
 supported_cpu="no"
 supported_os="no"
@@ -5413,6 +5414,17 @@  EOF
   fi
 fi
 
+##########################################
+# Docker and cross-compiler support
+#
+# This is specifically for building test
+# cases for foreign architectures, not
+# cross-compiling QEMU itself.
+
+if has "docker"; then
+    docker=$($python $source_path/tests/docker/docker.py probe)
+fi
+
 ##########################################
 # End of CC checks
 # After here, no more $cc or $ld runs
@@ -5874,6 +5886,7 @@  echo "avx2 optimization $avx2_opt"
 echo "replication support $replication"
 echo "VxHS block device $vxhs"
 echo "capstone          $capstone"
+echo "docker            $docker"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -6697,6 +6710,10 @@  if test "$gcov" = "yes" ; then
   echo "GCOV=$gcov_tool" >> $config_host_mak
 fi
 
+if test "$docker" != "no"; then
+    echo "HAVE_USER_DOCKER=y" >> $config_host_mak
+fi
+
 # use included Linux headers
 if test "$linux" = "yes" ; then
   mkdir -p linux-headers