introduce --with-system-qemu-traditional
cover introduce --with-system-qemu-traditional
Hi all,
This patch series introduces a new configure command line option to provide an externally built qemu-dm binary and stop xen-unstable from trying to clone and build qemu-xen-traditional.
Stefano Stabellini (2):
Introduce configure option --with-system-qemu-traditional Update configure scripts by calling autogen
tools/config.h.in | 6 ++-- tools/configure | 81 ++++++++++++++++++++++++++---------------------- tools/configure.ac | 51 +++++++++++++++++------------- tools/libxl/libxl_dm.c | 11 ++++++- 4 files changed, 86 insertions(+), 63 deletions(-)
Cheers,
Stefano
PATCH 1/2 Introduce configure option --with-system-qemu-traditional
Introduce a configure option to disable the in-tree qemu-traditional build and use an externally provided qemu-dm binary. The option is very similar to the existing --with-system-qemu-xen.
Also remove --enable/disable-qemu-traditional, as the same can be done with --with-system-qemu-traditional=qemu-dm. (disable-qemu-traditional does not prevent libxl from trying to execute qemu-dm, if they user asked).
--- tools/configure.ac | 51 +++++++++++++++++++++++++++--------------------- tools/libxl/libxl_dm.c | 11 ++++++++++- 2 files changed, 39 insertions(+), 23 deletions(-)
tools/configure.ac +29 -22
@@ -131,28 +131,6 @@ AC_DEFINE([HAVE_BLKTAP2], [1], [Blktap2 enabled]) ]) AC_SUBST(blktap2) - -AC_ARG_ENABLE([qemu-traditional], - AS_HELP_STRING([--enable-qemu-traditional], - [Enable qemu traditional device model, (DEFAULT is on for Linux or NetBSD x86, otherwise off)]),,[ - case "$host_cpu" in - i[[3456]]86|x86_64) - enable_qemu_traditional="yes";; - *) enable_qemu_traditional="no";; - esac - case "$host_os" in - freebsd*) - enable_qemu_traditional="no";; - esac - -]) -AS_IF([test "x$enable_qemu_traditional" = "xyes"], [ -AC_DEFINE([HAVE_QEMU_TRADITIONAL], [1], [Qemu traditional enabled]) - qemu_traditional=y],[ - qemu_traditional=n -]) -AC_SUBST(qemu_traditional) - AC_ARG_ENABLE([rombios], AS_HELP_STRING([--enable-rombios], [Enable ROMBIOS, (DEFAULT is on if qemu-traditional is enabled, otherwise off)]),,[
@@ -169,6 +147,35 @@ AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled]) ]) AC_SUBST(rombios) +AC_ARG_WITH([system-qemu-traditional], + AS_HELP_STRING([--with-system-qemu-traditional@<:@=PATH@:>@], + [Use system supplied qemu-traditional PATH or qemu-dm + (taken from $PATH) as qemu-traditional device model instead of + building and installing our own version]),[ + case $withval in + yes) qemu_traditional=n ; qemu_traditional_path=qemu-dm ;; + no) qemu_traditional=y ; qemu_traditional_path= ;; + *) qemu_traditional=n ; qemu_traditional_path=$withval ;; + esac +],[ + case "$host_cpu" in + i[[3456]]86|x86_64) + qemu_traditional=y + qemu_traditional_path=;; + *) qemu_traditional=n + qemu_traditional_path=qemu-dm;; + esac + case "$host_os" in + freebsd*) + qemu_traditional=n + qemu_traditional_path=qemu-dm;; + esac +]) +AS_IF([test "x$qemu_traditional" = "xn"], [ + AC_DEFINE_UNQUOTED([QEMU_TRADITIONAL_PATH], ["$qemu_traditional_path"], [Qemu Traditional Xen path]) +]) +AC_SUBST(qemu_traditional) + AC_ARG_WITH([system-qemu], AS_HELP_STRING([--with-system-qemu@<:@=PATH@:>@], [Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
tools/libxl/libxl_dm.c +10 -1
@@ -43,6 +43,15 @@ static const char *qemu_xen_path(libxl__gc *gc)#endif } +static const char *qemu_traditional_path (libxl__gc *gc) +{ +#ifdef QEMU_TRADITIONAL_PATH +return QEMU_TRADITIONAL_PATH ; +#else +return libxl__abs_path (gc,"qemu-dm" ,libxl__private_bindir_path ()); +#endif +} +static int libxl__create_qemu_logfile (libxl__gc *gc,char *name) {char *logfile;
@@ -74,7 +83,7 @@ const char *libxl__domain_device_model(libxl__gc *gc, }else {switch (info->device_model_version) {case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL : - dm =libxl__abs_path (gc,"qemu-dm" ,libxl__private_bindir_path ()); + dm =qemu_traditional_path (gc);break ;case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN : dm =qemu_xen_path (gc);
Signature · 1 line
1.7.10.4
Re: [PATCH 1/2] Introduce configure option --with-system-qemu-traditional
Quoted 3 lines · Stefano Stabellini
tools/configure.ac | 51 +++++++++++++++++++++++++++--------------------- tools/libxl/libxl_dm.c | 11 ++++++++++- 2 files changed, 39 insertions(+), 23 deletions(-)
This change should be mentioned in the INSTALL file.
Olaf
Re: [PATCH 1/2] Introduce configure option --with-system-qemu-traditional
Quoted 7 lines · Olaf Hering
Quoted 3 lines · Stefano Stabellini
tools/configure.ac | 51 +++++++++++++++++++++++++++--------------------- tools/libxl/libxl_dm.c | 11 ++++++++++- 2 files changed, 39 insertions(+), 23 deletions(-)This change should be mentioned in the INSTALL file.
You are right. Also I think I should keep the old disable-qemu-traditional option alongside the new one. I'll send a new version.
PATCH 2/2 Update configure scripts by calling autogen
In reply to Stefano StabelliniI run ./autogen.sh and committed the result.
--- tools/config.h.in | 6 ++-- tools/configure | 81 +++++++++++++++++++++++++++++------------------------ 2 files changed, 47 insertions(+), 40 deletions(-)
tools/config.h.in +3 -3
@@ -24,9 +24,6 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Qemu traditional enabled */ -#undef HAVE_QEMU_TRADITIONAL - /* ROMBIOS enabled */ #undef HAVE_ROMBIOS
@@ -93,6 +90,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Qemu Traditional Xen path */ +#undef QEMU_TRADITIONAL_PATH + /* Qemu Xen path */ #undef QEMU_XEN_PATH
tools/configure +44 -37
119 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Re: [PATCH 2/2] Update configure scripts by calling autogen
Stefano Stabellini writes ("[PATCH 2/2] Update configure scripts by calling autogen"):
Quoted 1 line
I run ./autogen.sh and committed the result.
This should be in the same patch as the source file updates (and there should be a note to the committer to ask them to do the autogen.sh run).
Ian.