[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] coroutine: adding control flags (enable/disable
From: |
Alex Barcelo |
Subject: |
[Qemu-devel] [PATCH 2/3] coroutine: adding control flags (enable/disable) for ucontext compilation |
Date: |
Mon, 13 Feb 2012 15:42:29 +0100 |
Configure tries, as a default, ucontext functions for the
coroutines. But now the user can force its use or disable
it at all (enable and disable flags)
Signed-off-by: Alex Barcelo <address@hidden>
---
configure | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 763db24..ed40da8 100755
--- a/configure
+++ b/configure
@@ -190,6 +190,7 @@ opengl=""
zlib="yes"
guest_agent="yes"
libiscsi=""
+ucontext=""
# parse CC options first
for opt do
@@ -798,6 +799,10 @@ for opt do
;;
--disable-guest-agent) guest_agent="no"
;;
+ --enable-ucontext) ucontext="yes"
+ ;;
+ --disable-ucontext) ucontext="no"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -1084,6 +1089,8 @@ echo " --disable-usb-redir disable usb network
redirection support"
echo " --enable-usb-redir enable usb network redirection support"
echo " --disable-guest-agent disable building of the QEMU Guest Agent"
echo " --enable-guest-agent enable building of the QEMU Guest Agent"
+echo " --disable-ucontext disable ucontext functions for coroutines"
+echo " --enable-ucontext enable ucontext functions for coroutines"
echo ""
echo "NOTE: The object files are built at the place where configure is
launched"
exit 1
@@ -2717,13 +2724,23 @@ fi
# check if we have makecontext
ucontext_coroutine=no
-if test "$darwin" != "yes"; then
- cat > $TMPC << EOF
+if test "$ucontext" != "no"; then
+ if test "$darwin" != "yes"; then
+ cat > $TMPC << EOF
#include <ucontext.h>
int main(void) { makecontext(0, 0, 0); return 0; }
EOF
- if compile_prog "" "" ; then
- ucontext_coroutine=yes
+ if compile_prog "" "" ; then
+ ucontext_coroutine=yes
+ elif test "$ucontext" = "yes" ; then
+ echo
+ echo "Error: ucontext check failed"
+ echo "Make sure that ucontext.h and its funcionts are supported"
+ echo
+ exit 1
+ fi
+ else
+ echo "Silently ignoring ucontext coroutine method under darwin"
fi
fi
@@ -2918,6 +2935,7 @@ echo "usb net redir $usb_redir"
echo "OpenGL support $opengl"
echo "libiscsi support $libiscsi"
echo "build guest agent $guest_agent"
+echo "ucontext coroutine support $ucontext_coroutine"
if test "$sdl_too_old" = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
--
1.7.5.4
- Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source), (continued)
- Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source), Stefan Hajnoczi, 2012/02/14
- Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source), Alex Barcelo, 2012/02/14
- Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source), Stefan Hajnoczi, 2012/02/14
- Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source), Alex Barcelo, 2012/02/14
- Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source), Stefan Hajnoczi, 2012/02/14
[Qemu-devel] [PATCH 3/3] coroutine: adding enable/disable options for sigaltstack method, Alex Barcelo, 2012/02/13
[Qemu-devel] [PATCH 2/3] coroutine: adding control flags (enable/disable) for ucontext compilation,
Alex Barcelo <=
Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Peter Maydell, 2012/02/13
- Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Alex Barcelo, 2012/02/13
- Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Stefan Hajnoczi, 2012/02/14
- Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Alex Barcelo, 2012/02/14
- Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Stefan Hajnoczi, 2012/02/14
- Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Alex Barcelo, 2012/02/14
- Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Stefan Hajnoczi, 2012/02/14
Re: [Qemu-devel] [PATCH 0/3] New sigaltstack method for coroutine, Paul Brook, 2012/02/14