build: require Augeas for library.
authorRichard Jones <rjones@redhat.com>
Sat, 11 Sep 2010 12:41:26 +0000 (13:41 +0100)
committerRichard Jones <rjones@redhat.com>
Sat, 11 Sep 2010 12:42:04 +0000 (13:42 +0100)
Augeas has been required since we moved the inspection code to C,
however we were not correctly enforcing this in configure.ac, nor
correctly linking to the library until now.

README
configure.ac
src/Makefile.am

diff --git a/README b/README
index 16d2c58..aa43bbb 100644 (file)
--- a/README
+++ b/README
@@ -55,6 +55,8 @@ Requirements
 
 - libxml2
 
+- Augeas (http://augeas.net/)
+
 - squashfs-tools (mksquashfs only)
 
 - genisoimage / mkisofs
@@ -63,8 +65,6 @@ Requirements
 
 - (Optional) FUSE to build the FUSE module
 
-- (Optional) Augeas (http://augeas.net/)
-
 - perldoc (pod2man, pod2text) to generate the manual pages and
   other documentation.
 
index 11126f6..5aecee3 100644 (file)
@@ -478,6 +478,11 @@ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])
 AC_SUBST([LIBXML2_CFLAGS])
 AC_SUBST([LIBXML2_LIBS])
 
+dnl Augeas (required)
+PKG_CHECK_MODULES([AUGEAS], [augeas])
+AC_SUBST([AUGEAS_CFLAGS])
+AC_SUBST([AUGEAS_LIBS])
+
 dnl hivex library (highly recommended).
 dnl This used to be a part of libguestfs, but was spun off into its
 dnl own separate upstream project in libguestfs 1.0.85.
index f2eb6c9..4c5468b 100644 (file)
@@ -113,7 +113,7 @@ libguestfs_la_SOURCES = \
        proto.c \
        libguestfs.syms
 
-libguestfs_la_LIBADD = $(HIVEX_LIBS) $(LIBPCRE) $(LIBMAGIC) $(LTLIBTHREAD) ../gnulib/lib/libgnu.la
+libguestfs_la_LIBADD = $(HIVEX_LIBS) $(AUGEAS_LIBS) $(LIBPCRE) $(LIBMAGIC) $(LTLIBTHREAD) ../gnulib/lib/libgnu.la
 
 # Make libguestfs include the convenience library.
 noinst_LTLIBRARIES = libprotocol.la
@@ -121,7 +121,7 @@ libguestfs_la_LIBADD += libprotocol.la
 
 libguestfs_la_CFLAGS = \
   -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \
-  $(HIVEX_CFLAGS) \
+  $(HIVEX_CFLAGS) $(AUGEAS_CFLAGS) \
   $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
 libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib