On Thu, Nov 11, 2010 at 09:56:37AM +0000, Matthew Booth wrote:
On 11/10/2010 11:45 AM, Richard W.M. Jones wrote:
>>From a0b4caa0821b759de01361b7019c9c9c9607027d Mon Sep 17 00:00:00 2001
>From: Richard Jones<rjones(a)redhat.com>
>Date: Tue, 9 Nov 2010 15:59:40 +0000
>Subject: [PATCH 1/7] lib: Make pcre, libmagic and hivex libraries optional.
>
>This change makes these libraries optional. If they are not
>available at compile time then certain core API features will
>be disabled (see below).
>
>This also changes PCRE detection to use pkg-config instead
>of the ad hoc autoconf checks.
>
>The large inspect.c file has been split out into separate
>function-specific files.
>
> file-architecture: requires pcre& libmagic
> inspection: requires pcre& hivex
>---
> README | 4 +-
> configure.ac | 45 ++--
> po/POTFILES.in | 2 +
> src/Makefile.am | 6 +-
> src/filearch.c | 267 +++++++++++++++++++++
> src/guestfs-internal.h | 16 ++
> src/guestfs.c | 9 +
> src/inspect.c | 607 +++++++++++++++---------------------------------
> src/listfs.c | 169 ++++++++++++++
> 9 files changed, 674 insertions(+), 451 deletions(-)
> create mode 100644 src/filearch.c
> create mode 100644 src/listfs.c
What's the use case here? Embedded systems running libguestfs?
Doesn't seem likely. If nobody is actually likely to build
libguestfs this way, this only seems to complicate the build system
further in ways which will be rarely tested.
Splitting inspect in 2 isn't a bad idea, though.
I think it's better to view this patch as a cleanup of the configure
script. Making hivex optional I think is a good idea, and once you've
done that, it's a cleanup to make the other 2 libraries (+ libvirt &
libxml2 in later patch) use the same style of configure test.
Having said that, I did test this with each library both installed and
removed.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/