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

Daniel Veillard veillard at redhat.com
Thu Oct 30 14:44:20 UTC 2008


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.

  Patch looks fine, the Xen configure.in changes are a bit hard to
follow, I hope we will be able to give it some testing ...

  +1

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list