Skip to contentSkip to conversation

Autoconf: add variable for pass arbitrary options to qemu upstream

PATCH Superseded Fabio Fantoni 2 participants 5 messages Apr 4, 2012 – Apr 10, 2012

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Autoconf: add variable for pass arbitrary options to qemu upstream

Autoconf: add variable for pass arbitrary options to qemu upstream v2

Patch attached.

# HG changeset patch
# User Fabio Fantoni
# Date 1333545026 -7200
# Node ID 9fb366d55ed2c192f3c0871e678de2a9e5067165
# Parent 527b8ae57ff2fce676c662fb42e31e65007b2036
autoconf: add variable for pass arbitrary options to qemu upstream v2

config/Tools.mk.in +1 -0
diff -r 527b8ae57ff2 -r 9fb366d55ed2 config/Tools.mk.in
@@ -44,3 +44,4 @@
 CONFIG_GCRYPT       := @libgcrypt@
 CONFIG_EXT2FS       := @libext2fs@
 CURSES_LIBS         := @CURSES_LIBS@
+CONFIG_QEMUU_ADD_PAR:= @qemuu_add_par@
tools/Makefile +1 -0
diff -r 527b8ae57ff2 -r 9fb366d55ed2 tools/Makefile
@@ -157,6 +157,7 @@
 		--datadir=$(SHAREDIR)/qemu-xen \
 		--disable-kvm \
 		--python=$(PYTHON) \
+		$(CONFIG_QEMUU_ADD_PAR) \
 		$(IOEMU_CONFIGURE_CROSS); \
 	$(MAKE) install
 
tools/configure +324 -281

1,826 lines not on this page · raw message

tools/configure.ac +10 -0
diff -r 527b8ae57ff2 -r 9fb366d55ed2 tools/configure.ac
@@ -44,6 +44,16 @@
 AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
 AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
+AC_ARG_ENABLE([qemuu-spice],
+[  --enable-qemuu-spice	Enable Spice build on qemu upstream],
+[qemuu_add_par+=" --enable-spice"])
+AC_ARG_ENABLE([qemuu-usbredir],
+[  --enable-qemuu-usbredir	Enable usb redirection build on qemu upstream],
+[qemuu_add_par+=" --enable-usb-redir"])
+AC_ARG_ENABLE([qemuu-debug],
+[  --enable-qemuu-debug	Enable debug build on qemu upstream],
+[qemuu_add_par+=" --enable-debug"])
+AC_SUBST(qemuu_add_par)
 
 AC_ARG_VAR([PREPEND_INCLUDES],
     [List of include folders to prepend to CFLAGS (without -I)])

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 3 lines · Fabio Fantoni

Autoconf: add variable for pass arbitrary options to qemu upstream v2

(I'm gonna expand some of the pieces of the patch to comment them)

[...]

tools/configure +1 -1
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for Xen Hypervisor 4.2.
+# Generated by GNU Autoconf 2.68 for Xen Hypervisor 4.2.
 

You should use autoconf 2.67 to update the configure script.

[...]

tools/configure.ac +10 -0
@@ -44,6 +44,16 @@
 AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
 AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
+AC_ARG_ENABLE([qemuu-spice],
+[  --enable-qemuu-spice	Enable Spice build on qemu upstream],
+[qemuu_add_par+=" --enable-spice"])
+AC_ARG_ENABLE([qemuu-usbredir],
+[  --enable-qemuu-usbredir	Enable usb redirection build on qemu upstream],
+[qemuu_add_par+=" --enable-usb-redir"])
+AC_ARG_ENABLE([qemuu-debug],
+[  --enable-qemuu-debug	Enable debug build on qemu upstream],
+[qemuu_add_par+=" --enable-debug"])
+AC_SUBST(qemuu_add_par)
 

Why don't you use AX_ARG_DEFAULT_DISABLE or AX_ARG_DEFAULT_ENABLE?

Take a look at:

http://xenbits.xen.org/hg/staging/xen-unstable.hg/rev/249b2eeeeae5

This is still not on the main repository, but it won't take long, so I suggest that you base your patch on top of this change.

Quoted 6 lines

Patch attached. <autoconf_add_arbitrary_options_qemuu_v2.patch><smime.p7s>_______________________________________________ Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#2 lore raw

Roger Pau Monne wrote

Quoted 7 lines

You should use autoconf 2.67 to update the configure script.

[...]

Why don't you use AX_ARG_DEFAULT_DISABLE or AX_ARG_DEFAULT_ENABLE?

On notebook I have Mint 12 and Precise, on testing server Wheezy, all with autoconf 2.68, I'll redo on other pc with old s.o.

About AX_ARG_DEFAULT_DISABLE or AX_ARG_DEFAULT_ENABLE do enable/disable and export it, I not export but use it for bash command, I must need AC_ARG_ENABLE or my mistake about?

--
View this message in context: http://xen.1045712.n5.nabble.com/PATCH-v2-Autoconf-add-variable-for-pass-arbitrary-options-to-qemu-upstream-tp5617799p5622369.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

#3 lore raw
Quoted 10 lines · Fantu

Roger Pau Monne wrote

Quoted 7 lines

You should use autoconf 2.67 to update the configure script.

[...]

Why don't you use AX_ARG_DEFAULT_DISABLE or AX_ARG_DEFAULT_ENABLE?

On notebook I have Mint 12 and Precise, on testing server Wheezy, all with autoconf 2.68, I'll redo on other pc with old s.o.

Don't worry about the autoconf version, just send the patch without the autoconf output and clearly state in the commit message that the maintainer should rebuild the configure script to apply the change.

Quoted 3 lines

About AX_ARG_DEFAULT_DISABLE or AX_ARG_DEFAULT_ENABLE do enable/disable and export it, I not export but use it for bash command, I must need AC_ARG_ENABLE or my mistake about?

You are basically doing the same thing that this macro does, and you are "exporting" it using AC_SUBST, so you can write the result to the config Makefile (Tools.mk). Instead of saving the whole parameter line you wish to pass to Qemu, just save the options chosen by the user (e.g: QEMUDEBUG := y) and generate the appropriate options to pass to Qemu from the tools Makefile.