|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [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).
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
tools/configure.ac | 51 +++++++++++++++++++++++++++---------------------
tools/libxl/libxl_dm.c | 11 ++++++++++-
2 files changed, 39 insertions(+), 23 deletions(-)
diff --git a/tools/configure.ac b/tools/configure.ac
index d31c2f3..cc8e5ff 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -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
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 30c1578..7a2ebbe 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -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);
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |