[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] PATCH: 6/11: Change WITH_XXXX macros to love in config.h



On Thu, Oct 30, 2008 at 03:44:20PM +0100, Daniel Veillard wrote:
> On Thu, Oct 30, 2008 at 01:38:56PM +0000, Daniel P. Berrange wrote:
> > The configure script lets users turn on/of individual drivers. Their
> > choices get fed into a LIBVIRT_FEATURES macro, which has one or more
> > -DWITH_XEN -DWITH_OPENVZ, etc, etc. The compiler args become rather
> > long when we have all the drivers enabled. So this patch tweaks the
> > configure file to instead put all these WITH_XEN, WITH_QEMU macros
> > into the config.h file.
> > 
> > Secondly, the Makefile.am has a few places where we do nested conditionals
> > to determine whether to build QEMU, eg
> > 
> >   if WITH_LIBVIRTD
> >   if WITH_QEMU
> > 
> > This patch also tweaks the configure script so that WITH_QEMU is never
> > defined, unless WITH_LIBVIRTD is also defined. Now the makefile.am
> > can just do
> > 
> >   if WITH_QEMU
> > 
> > which makes things a little more readable, and helps avoid errors where
> > we miss the WITH_LIBVIRTD wrapper.
> > 
> > There is no functional code change here, its all just playing with the
> > way makefile/macro conditionals are done.
> 
>   Hum, this can get a bit crazy, I hope we will never get to the 2
> pages of --with/without options of libxml2 (but we are getting closer
> every month) and while it easilly get impossible to test all combination,
> since we are doing background builds of HEAD every night, would it be
> possible to at least test compilation with some of the main options
> enabled or disabled. The mingw compile tests the bare minimum. Maybe
> a compile with only each of the hypervisor activated, and maybe one
> without avahi/SELinux/polkit/numactl to test compilation in a restricted
> environment, would be useful to catch this kind of troubles.

The later patches in this series which move every driver into a libtool
convenience library, and then  the subsquent dlopen support could help
us here by making cross-file dependancies much more obvious. So we
will catch many more problem at compile time even with all drivers
enabled. I can probably tweak the compile find even more problems
in this way, as well as documenting where the boundaries are in our
internal APIs.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]