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

Frediano Ziglio fziglio at redhat.com
Thu Aug 13 03:52:50 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
> 

Tried, does not work, PKG_CHECK_MODULES requires AC_PROG_CC so
you must use it before.

Frediano


More information about the Spice-devel mailing list