[libvirt] fix some problems with configure in libvirt-sandbox-service

I had some trouble building it and ended up with these patches; they basically just fix up the configure checks so that they find things which would later cause the build to fail.

Fixes a handful of errors such as this one: gtk-doc.make:7: error: GTK_DOC_USE_LIBTOOL does not appear in AM_CONDITIONAL --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 00c2d7e..8a34620 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,8 @@ AC_CONFIG_LIBOBJ_DIR([libvirt-sandbox]) LIBVIRT_SANDBOX_COMPILE_WARNINGS +PKG_CHECK_MODULES(GTKDOC, gtk-doc >= 1.24) +PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, gobject-introspection-1.0 >= 1.46.0) PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= $GIO_UNIX_REQUIRED) PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GOBJECT_REQUIRED) PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED) -- 2.5.5

These dependencies are optional but default to enabled, so if you shouldn't have to explicitly have to mention them when you run configure. --- configure.ac | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 8a34620..580bbf8 100644 --- a/configure.ac +++ b/configure.ac @@ -83,27 +83,28 @@ PKG_CHECK_MODULES(LIBVIRT_GLIB, libvirt-glib-1.0 >= $LIBVIRT_GOBJECT_REQUIRED) PKG_CHECK_MODULES(LIBVIRT_GOBJECT, libvirt-gobject-1.0 >= $LIBVIRT_GOBJECT_REQUIRED) PKG_CHECK_MODULES(LIBVIRT_GCONFIG, libvirt-gconfig-1.0 >= $LIBVIRT_GCONFIG_REQUIRED) -AC_ARG_WITH([zlib], - [AS_HELP_STRING([--with-zlib], - [add ZLIB support @<:@default=yes@:>@])]) -m4_divert_text([DEFAULTS], [with_zlib=yes]) - orig_pkg_config="$PKG_CONFIG" PKG_CONFIG="$PKG_CONFIG --static" -if test "$with_zlib" = "yes" ; then - PKG_CHECK_MODULES(ZLIB, zlib >= $ZLIB_REQUIRED) - AC_DEFINE([WITH_ZLIB], [1], [Whether ZLIB support was enabled]) -fi + +AC_ARG_WITH([zlib], + [AS_HELP_STRING([--with-zlib], + [add ZLIB support @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_zlib=yes]) +ZLIB_CFLAGS= +ZLIB_LIBS= +AM_CONDITIONAL([WITH_ZLIB], [test "x$with_zlib" != "xno"]) +AM_COND_IF([WITH_ZLIB], + [PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])]) AC_ARG_WITH([lzma], - [AS_HELP_STRING([--with-lzma], - [add LZMA support @<:@default=yes@:>@])]) + [AS_HELP_STRING([--with-lzma], + [add LZMA support @<:@default=yes@:>@])]) m4_divert_text([DEFAULTS], [with_lzma=yes]) - -if test "$with_lzma" = "yes" ; then - PKG_CHECK_MODULES(LZMA, liblzma >= $LZMA_REQUIRED) - AC_DEFINE([WITH_LZMA], [1], [Whether LZMA support was enabled]) -fi +LZMA_CFLAGS= +LZMA_LIBS= +AM_CONDITIONAL([WITH_LZMA], [test "x$with_lzma" != "xno"]) +AM_COND_IF([WITH_LZMA], + [PKG_CHECK_MODULES([LZMA], [liblzma >= $LZMA_REQUIRED])]) PKG_CONFIG="$orig_pkg_config" LIBVIRT_SANDBOX_CAPNG -- 2.5.5
participants (1)
-
Daniel Brooks