Merge remote-tracking branch 'mdroth/qga-pull-3-12-2012' into staging
authorAnthony Liguori <aliguori@us.ibm.com>
Tue, 13 Mar 2012 01:52:34 +0000 (20:52 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 13 Mar 2012 01:52:34 +0000 (20:52 -0500)
* mdroth/qga-pull-3-12-2012:
  qemu-ga: add guest-sync-delimited
  qemu-ga: add guest-network-get-interfaces command
  qemu-ga: add win32 guest-suspend-ram command
  qemu-ga: add win32 guest-suspend-disk command.
  qemu-ga: add guest-suspend-hybrid
  qemu-ga: add guest-suspend-ram
  qemu-ga: add guest-suspend-disk

1  2 
configure

diff --combined configure
index ddb3e398fa086d948695dc8729c564901209638e,709e4b99415567ec0348d9bdc5e3158d7dc8d282..d7631ed24724de95aeb9c3e0a52ff9a637c3de26
+++ b/configure
@@@ -194,7 -194,6 +194,7 @@@ opengl="
  zlib="yes"
  guest_agent="yes"
  libiscsi=""
 +coroutine=""
  
  # parse CC options first
  for opt do
@@@ -526,7 -525,7 +526,7 @@@ EO
    bindir="\${prefix}"
    sysconfdir="\${prefix}"
    confsuffix=""
-   libs_qga="-lws2_32 -lwinmm $lib_qga"
+   libs_qga="-lws2_32 -lwinmm -lpowrprof $lib_qga"
  fi
  
  werror=""
@@@ -785,8 -784,6 +785,8 @@@ for opt d
    ;;
    --with-pkgversion=*) pkgversion=" ($optarg)"
    ;;
 +  --with-coroutine=*) coroutine="$optarg"
 +  ;;
    --disable-docs) docs="no"
    ;;
    --enable-docs) docs="yes"
@@@ -1113,8 -1110,6 +1113,8 @@@ echo "  --disable-usb-redir      disabl
  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 "  --with-coroutine=BACKEND coroutine backend. Supported options:"
 +echo "                           gthread, ucontext, sigaltstack, windows"
  echo ""
  echo "NOTE: The object files are built at the place where configure is launched"
  exit 1
  fi
  
  ##########################################
 -# check if we have makecontext
 -# (and that it's not a glibc stub which always returns -1)
 +# check and set a backend for coroutine
  
 -ucontext_coroutine=no
 -if test "$darwin" != "yes"; then
 -  cat > $TMPC << EOF
 +# default is ucontext, but always fallback to gthread
 +# windows autodetected by make
 +if test "$coroutine" = "" -o "$coroutine" = "ucontext"; then
 +  if test "$darwin" != "yes"; then
 +    cat > $TMPC << EOF
  #include <ucontext.h>
  #ifdef __stub_makecontext
  #error Ignoring glibc stub makecontext which will always fail
  #endif
  int main(void) { makecontext(0, 0, 0); return 0; }
  EOF
 -  if compile_prog "" "" ; then
 -      ucontext_coroutine=yes
 +    if compile_prog "" "" ; then
 +        coroutine_backend=ucontext
 +    else
 +      coroutine_backend=gthread
 +    fi
 +  else
 +    echo "Silently falling back into gthread backend under darwin"
    fi
 +elif test "$coroutine" = "gthread" ; then
 +  coroutine_backend=gthread
 +elif test "$coroutine" = "windows" ; then
 +  coroutine_backend=windows
 +elif test "$coroutine" = "sigaltstack" ; then
 +  coroutine_backend=sigaltstack
 +else
 +  echo
 +  echo "Error: unknown coroutine backend $coroutine"
 +  echo
 +  exit 1
  fi
  
  ##########################################
@@@ -2953,7 -2931,6 +2953,7 @@@ echo "usb net redir     $usb_redir
  echo "OpenGL support    $opengl"
  echo "libiscsi support  $libiscsi"
  echo "build guest agent $guest_agent"
 +echo "coroutine backend $coroutine_backend"
  
  if test "$sdl_too_old" = "yes"; then
  echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@@ -3269,10 -3246,8 +3269,10 @@@ if test "$rbd" = "yes" ; the
    echo "CONFIG_RBD=y" >> $config_host_mak
  fi
  
 -if test "$ucontext_coroutine" = "yes" ; then
 +if test "$coroutine_backend" = "ucontext" ; then
    echo "CONFIG_UCONTEXT_COROUTINE=y" >> $config_host_mak
 +elif test "$coroutine_backend" = "sigaltstack" ; then
 +  echo "CONFIG_SIGALTSTACK_COROUTINE=y" >> $config_host_mak
  fi
  
  if test "$open_by_handle_at" = "yes" ; then