From: Fabien Chouteau <chouteau@adacore.com>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>,
"Stefan Weil" <sw@weilnetz.de>,
coreyb@linux.vnet.ibm.com,
"Michael Roth" <mdroth@linux.vnet.ibm.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH V3] Add --disable-bridge-helper configure flag
Date: Wed, 11 Jul 2012 16:17:07 +0200 [thread overview]
Message-ID: <1342016228-2822-1-git-send-email-chouteau@adacore.com> (raw)
Bridge helper uses ioctl's not available on old Linux versions, we add
this flag to disable the build.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
---
Makefile | 2 +-
configure | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 34d6a9e..c50ec5e 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ $(call set-vpath, $(SRC_PATH))
LIBS+=-lz $(LIBS_TOOLS)
-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
+HELPERS-$(CONFIG_BRIDGE_HELPER) = qemu-bridge-helper$(EXESUF)
ifdef BUILD_DOCS
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
diff --git a/configure b/configure
index 500fe24..0a3b990 100755
--- a/configure
+++ b/configure
@@ -195,6 +195,7 @@ zlib="yes"
guest_agent="yes"
libiscsi=""
coroutine=""
+bridge_helper=""
# parse CC options first
for opt do
@@ -824,6 +825,10 @@ for opt do
;;
--disable-guest-agent) guest_agent="no"
;;
+ --enable-bridge-helper) bridge_helper="yes"
+ ;;
+ --disable-bridge-helper) bridge_helper="no"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -1110,6 +1115,8 @@ echo " --disable-guest-agent disable building of the QEMU Guest Agent"
echo " --enable-guest-agent enable building of the QEMU Guest Agent"
echo " --with-coroutine=BACKEND coroutine backend. Supported options:"
echo " gthread, ucontext, sigaltstack, windows"
+echo " --enable-bridge-helper enable building of the qemu-bridge-helper"
+echo " --disable-bridge-helper disable building of the qemu-bridge-helper"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
@@ -2869,6 +2876,37 @@ if compile_prog "" "" ; then
has_environ=yes
fi
+########################################
+# check ioctl for qemu-bridge-helper
+
+if test "$bridge_helper" != "no" \
+ && test "$linux" = "yes" \
+ && test "$static" = "no";
+then
+ cat > $TMPC << EOF
+#include <linux/sockios.h>
+int main(void){
+ /* Check that SIOCBRADDIF is defined */
+ return SIOCBRADDIF;
+}
+EOF
+
+ if compile_prog "" "" ; then
+ bridge_helper="yes"
+ else
+ if test "$bridge_helper" = "yes"; then
+ echo
+ echo "Error: linux/sockios.h check failed"
+ echo "Cannot compile qemu-bridge-helper."
+ echo
+ exit 1
+ else
+ echo "Disabling qemu-bridge-helper due to missing ioctl support"
+ bridge_helper="no"
+ fi
+ fi
+fi
+
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -3896,6 +3934,10 @@ if test "$tcg_interpreter" = "yes" ; then
echo "CONFIG_TCI_DIS=y" >> $libdis_config_mak
fi
+if test "$bridge_helper" = "yes"; then
+ echo "CONFIG_BRIDGE_HELPER=y" >> $config_host_mak
+fi
+
case "$ARCH" in
alpha)
# Ensure there's only a single GP
--
1.7.9.5
reply other threads:[~2012-07-11 14:17 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=1342016228-2822-1-git-send-email-chouteau@adacore.com \
--to=chouteau@adacore.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=coreyb@linux.vnet.ibm.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=sw@weilnetz.de \
/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;
as well as URLs for NNTP newsgroup(s).