public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlo Marcelo Arenas Belon <carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [RFC v2] passthrough for configure options to qemu
Date: Mon, 22 Oct 2007 14:06:08 -0500	[thread overview]
Message-ID: <20071022190608.GB25818@tapir> (raw)

The following patch Implement a configure passthrough for qemu and
migrate all current qemu specific configuration flags (enable-alsa,
disable-vnc-tls and disable-gcc-check) to use it.

It uses qemu's configure to get a list of hints for additional options to
use and to keep backward compatible descriptions with what was used before
(adding disable-gcc-check statically with its warning about using gcc4).

Carlo

---
diff --git a/configure b/configure
index a0c8746..346392d 100755
--- a/configure
+++ b/configure
@@ -6,9 +6,7 @@ want_module=1
 qemu_cc=
 qemu_cflags=
 qemu_ldflags=
-enable_alsa=
-disable_vnc_tls=
-disable_gcc_check=
+qemu_conf=
 cross_prefix=
 arch=`uname -m`
 target_exec=
@@ -26,11 +24,16 @@ usage() {
 	    --qemu-cc=CC           specify compiler for qemu (must be gcc-3.x)
 	    --qemu-cflags=CFLAGS   CFLAGS to add to qemu configuration
 	    --qemu-ldflags=LDFLAGS LDFLAGS to add to qemu configuration
-	    --enable-alsa          enable alsa support for qemu
-	    --disable-vnc-tls      disable vnc tls support for qemu
+
+	Any additional option is given to qemu's configure verbatim; including:
 	    --disable-gcc-check    don't insist on gcc-3.x
 	                           CAUTION: this will break running without kvm
 EOF
+    cd qemu
+    ./configure --help | egrep "enable-|disable-" \
+        | grep -v user | grep -v system | grep -v kqemu | grep -v kvm \
+        | sed -e "s/^  /    /g" \
+        | sed -e"s/  enable/enable/g" | sed -e "s/  disable/disable/g"
     exit 1
 }
 
@@ -60,15 +63,6 @@ while [[ "$1" = -* ]]; do
 	--qemu-ldflags)
 	    qemu_ldflags="$arg"
 	    ;;
-	--enable-alsa)
-	    enable_alsa=1
-	    ;;
-	--disable-vnc-tls)
-	    disable_vnc_tls=1
-	    ;;
-	--disable-gcc-check)
-	    disable_gcc_check=1
-	    ;;
 	--arch)
 	    arch="$arg"
 	    ;;
@@ -79,7 +73,7 @@ while [[ "$1" = -* ]]; do
 	    usage
 	    ;;
 	*)
-	    usage
+	    qemu_conf="$qemu_conf $opt"
 	    ;;
     esac
 done
@@ -111,13 +105,10 @@ fi
     --disable-kqemu --extra-cflags="-I $PWD/../user $qemu_cflags" \
     --extra-ldflags="-L $PWD/../user $qemu_ldflags" \
     --enable-kvm --kernel-path="$libkvm_kerneldir" \
-    ${enable_alsa:+"--enable-alsa"} \
-    ${disable_vnc_tls:+"--disable-vnc-tls"} \
-    ${disable_gcc_check:+"--disable-gcc-check"} \
     --prefix="$prefix" \
     ${qemu_cc:+"--cc=$qemu_cc"} \
     ${cross_prefix:+"--cross-prefix=$cross_prefix"} \
-    ${cross_prefix:+"--cpu=$arch"}
+    ${cross_prefix:+"--cpu=$arch"} $qemu_conf
 )
 
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

                 reply	other threads:[~2007-10-22 19:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071022190608.GB25818@tapir \
    --to=carenas-kledwsohozojb6fo7hg9ng@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox