[Spice-devel] [PATCH v5 02/41] dissector: Generate some definition for dissector

Christophe Fergeau cfergeau at redhat.com
Wed Aug 12 07:47:22 PDT 2015


On Fri, Aug 07, 2015 at 04:00:31PM +0100, Frediano Ziglio wrote:
> diff --git a/configure.ac b/configure.ac
> index 2485489..715dc2c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -30,9 +30,19 @@ if test "x$enable_code_generator" != "xno"; then
>  fi
>  AM_CONDITIONAL([ENABLE_CODEGEN], [test "x$enable_code_generator" != "xno"])
>  
> +AC_PROG_CC
> +AM_PROG_CC_C_O
> +
> +PKG_CHECK_MODULES(WIRESHARK, wireshark,
> +	[AM_CONDITIONAL(WIRESHARK, true)
> +	PKG_CHECK_MODULES(GLIB2, glib-2.0)],
> +	AM_CONDITIONAL(WIRESHARK, false)
> +)
> +

For what it's worth, this could have been done with something like
(untested)
PKG_CHECK_MODULES([WIRESHARK], [wireshark], [have_wireshark=yes], [have_wireshark=no])
if test "x$have_wireshark" = "xyes"; then
    AC_PROG_CC
    AM_PROG_CC_C_O
fi
AM_CONDITIONAL([WIRESHARK], [test "x$have_wireshark" = "xyes"])

Fine with me as it currently is, the additional checks for the C
compiler should be no big deal

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150812/98ce60ae/attachment.sig>


More information about the Spice-devel mailing list