Patchwork guest agent: add --enable-guest-agent config option

login
register
mail settings
Submitter Michael Roth
Date Aug. 1, 2011, 7:52 p.m.
Message ID <1312228377-9608-1-git-send-email-mdroth@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/107797/
State New
Headers show

Comments

Michael Roth - Aug. 1, 2011, 7:52 p.m.
QAPI will require glib/python, but for now the guest agent is the only
user. For now, make these dependencies an explicit guest agent one, and
give users the option to disable it if need be.

Once QAPI is adopted in core QEMU code, we would basically revert this
patch.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure |   40 +++++++++++++++++++++++++++-------------
 1 files changed, 27 insertions(+), 13 deletions(-)
Anthony Liguori - Aug. 1, 2011, 9:40 p.m.
On 08/01/2011 02:52 PM, Michael Roth wrote:
> QAPI will require glib/python, but for now the guest agent is the only
> user. For now, make these dependencies an explicit guest agent one, and
> give users the option to disable it if need be.
>
> Once QAPI is adopted in core QEMU code, we would basically revert this
> patch.
>
> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>

Hi Stuart,

Can you confirm this patch fixes your problem?

Thanks for sending this Mike.

Regards,

Anthony Liguori

> ---
>   configure |   40 +++++++++++++++++++++++++++-------------
>   1 files changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index 77194cf..58a37d9 100755
> --- a/configure
> +++ b/configure
> @@ -181,6 +181,7 @@ smartcard_nss=""
>   usb_redir=""
>   opengl=""
>   zlib="yes"
> +guest_agent="yes"
>
>   # parse CC options first
>   for opt do
> @@ -757,6 +758,10 @@ for opt do
>     ;;
>     --disable-zlib-test) zlib="no"
>     ;;
> +  --enable-guest-agent) guest_agent="yes"
> +  ;;
> +  --disable-guest-agent) guest_agent="no"
> +  ;;
>     *) echo "ERROR: unknown option $opt"; show_help="yes"
>     ;;
>     esac
> @@ -1035,6 +1040,8 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
>   echo "  --enable-smartcard-nss   enable smartcard nss support"
>   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 ""
>   echo "NOTE: The object files are built at the place where configure is launched"
>   exit 1
> @@ -1094,11 +1101,13 @@ if test "$solaris" = "yes" ; then
>     fi
>   fi
>
> -if has $python; then
> -  :
> -else
> -  echo "Python not found. Use --python=/path/to/python"
> -  exit 1
> +if test "$guest_agent" != "no" ; then
> +  if has $python; then
> +    :
> +  else
> +    echo "Python not found. Use --python=/path/to/python"
> +    exit 1
> +  fi
>   fi
>
>   if test -z "$target_list" ; then
> @@ -1830,14 +1839,16 @@ fi
>
>   ##########################################
>   # glib support probe
> -if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> -    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> -    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> -    libs_softmmu="$glib_libs $libs_softmmu"
> -    libs_tools="$glib_libs $libs_tools"
> -else
> -    echo "glib-2.0 required to compile QEMU"
> -    exit 1
> +if test "$guest_agent" != "no" ; then
> +    if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> +        glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> +        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> +        libs_softmmu="$glib_libs $libs_softmmu"
> +        libs_tools="$glib_libs $libs_tools"
> +    else
> +        echo "glib-2.0 required to compile QEMU"
> +        exit 1
> +    fi
>   fi
>
>   ##########################################
> @@ -2597,7 +2608,9 @@ if test "$softmmu" = yes ; then
>     tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
>     if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
>         tools="qemu-nbd\$(EXESUF) $tools"
> +    if [ "$guest_agent" = "yes" ]; then
>         tools="qemu-ga\$(EXESUF) $tools"
> +    fi
>       if [ "$check_utests" = "yes" ]; then
>         tools="check-qint check-qstring check-qdict check-qlist $tools"
>         tools="check-qfloat check-qjson $tools"
> @@ -2699,6 +2712,7 @@ echo "xfsctl support    $xfs"
>   echo "nss used          $smartcard_nss"
>   echo "usb net redir     $usb_redir"
>   echo "OpenGL support    $opengl"
> +echo "build guest agent $guest_agent"
>
>   if test $sdl_too_old = "yes"; then
>   echo "->  Your SDL version is too old - please upgrade to have SDL support"
Anthony Liguori - Aug. 4, 2011, 10:08 p.m.
On 08/01/2011 02:52 PM, Michael Roth wrote:
> QAPI will require glib/python, but for now the guest agent is the only
> user. For now, make these dependencies an explicit guest agent one, and
> give users the option to disable it if need be.
>
> Once QAPI is adopted in core QEMU code, we would basically revert this
> patch.
>
> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   configure |   40 +++++++++++++++++++++++++++-------------
>   1 files changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index 77194cf..58a37d9 100755
> --- a/configure
> +++ b/configure
> @@ -181,6 +181,7 @@ smartcard_nss=""
>   usb_redir=""
>   opengl=""
>   zlib="yes"
> +guest_agent="yes"
>
>   # parse CC options first
>   for opt do
> @@ -757,6 +758,10 @@ for opt do
>     ;;
>     --disable-zlib-test) zlib="no"
>     ;;
> +  --enable-guest-agent) guest_agent="yes"
> +  ;;
> +  --disable-guest-agent) guest_agent="no"
> +  ;;
>     *) echo "ERROR: unknown option $opt"; show_help="yes"
>     ;;
>     esac
> @@ -1035,6 +1040,8 @@ echo "  --disable-smartcard-nss  disable smartcard nss support"
>   echo "  --enable-smartcard-nss   enable smartcard nss support"
>   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 ""
>   echo "NOTE: The object files are built at the place where configure is launched"
>   exit 1
> @@ -1094,11 +1101,13 @@ if test "$solaris" = "yes" ; then
>     fi
>   fi
>
> -if has $python; then
> -  :
> -else
> -  echo "Python not found. Use --python=/path/to/python"
> -  exit 1
> +if test "$guest_agent" != "no" ; then
> +  if has $python; then
> +    :
> +  else
> +    echo "Python not found. Use --python=/path/to/python"
> +    exit 1
> +  fi
>   fi
>
>   if test -z "$target_list" ; then
> @@ -1830,14 +1839,16 @@ fi
>
>   ##########################################
>   # glib support probe
> -if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> -    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> -    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> -    libs_softmmu="$glib_libs $libs_softmmu"
> -    libs_tools="$glib_libs $libs_tools"
> -else
> -    echo "glib-2.0 required to compile QEMU"
> -    exit 1
> +if test "$guest_agent" != "no" ; then
> +    if $pkg_config --modversion glib-2.0>  /dev/null 2>&1 ; then
> +        glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> +        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> +        libs_softmmu="$glib_libs $libs_softmmu"
> +        libs_tools="$glib_libs $libs_tools"
> +    else
> +        echo "glib-2.0 required to compile QEMU"
> +        exit 1
> +    fi
>   fi
>
>   ##########################################
> @@ -2597,7 +2608,9 @@ if test "$softmmu" = yes ; then
>     tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
>     if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
>         tools="qemu-nbd\$(EXESUF) $tools"
> +    if [ "$guest_agent" = "yes" ]; then
>         tools="qemu-ga\$(EXESUF) $tools"
> +    fi
>       if [ "$check_utests" = "yes" ]; then
>         tools="check-qint check-qstring check-qdict check-qlist $tools"
>         tools="check-qfloat check-qjson $tools"
> @@ -2699,6 +2712,7 @@ echo "xfsctl support    $xfs"
>   echo "nss used          $smartcard_nss"
>   echo "usb net redir     $usb_redir"
>   echo "OpenGL support    $opengl"
> +echo "build guest agent $guest_agent"
>
>   if test $sdl_too_old = "yes"; then
>   echo "->  Your SDL version is too old - please upgrade to have SDL support"

Patch

diff --git a/configure b/configure
index 77194cf..58a37d9 100755
--- a/configure
+++ b/configure
@@ -181,6 +181,7 @@  smartcard_nss=""
 usb_redir=""
 opengl=""
 zlib="yes"
+guest_agent="yes"
 
 # parse CC options first
 for opt do
@@ -757,6 +758,10 @@  for opt do
   ;;
   --disable-zlib-test) zlib="no"
   ;;
+  --enable-guest-agent) guest_agent="yes"
+  ;;
+  --disable-guest-agent) guest_agent="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1035,6 +1040,8 @@  echo "  --disable-smartcard-nss  disable smartcard nss support"
 echo "  --enable-smartcard-nss   enable smartcard nss support"
 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 ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -1094,11 +1101,13 @@  if test "$solaris" = "yes" ; then
   fi
 fi
 
-if has $python; then
-  :
-else
-  echo "Python not found. Use --python=/path/to/python"
-  exit 1
+if test "$guest_agent" != "no" ; then
+  if has $python; then
+    :
+  else
+    echo "Python not found. Use --python=/path/to/python"
+    exit 1
+  fi
 fi
 
 if test -z "$target_list" ; then
@@ -1830,14 +1839,16 @@  fi
 
 ##########################################
 # glib support probe
-if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
-    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
-    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
-    libs_softmmu="$glib_libs $libs_softmmu"
-    libs_tools="$glib_libs $libs_tools"
-else
-    echo "glib-2.0 required to compile QEMU"
-    exit 1
+if test "$guest_agent" != "no" ; then
+    if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
+        glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
+        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
+        libs_softmmu="$glib_libs $libs_softmmu"
+        libs_tools="$glib_libs $libs_tools"
+    else
+        echo "glib-2.0 required to compile QEMU"
+        exit 1
+    fi
 fi
 
 ##########################################
@@ -2597,7 +2608,9 @@  if test "$softmmu" = yes ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
       tools="qemu-nbd\$(EXESUF) $tools"
+    if [ "$guest_agent" = "yes" ]; then
       tools="qemu-ga\$(EXESUF) $tools"
+    fi
     if [ "$check_utests" = "yes" ]; then
       tools="check-qint check-qstring check-qdict check-qlist $tools"
       tools="check-qfloat check-qjson $tools"
@@ -2699,6 +2712,7 @@  echo "xfsctl support    $xfs"
 echo "nss used          $smartcard_nss"
 echo "usb net redir     $usb_redir"
 echo "OpenGL support    $opengl"
+echo "build guest agent $guest_agent"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"