[libvirt] [PATCH] use gnulib via a submodule

Daniel P. Berrange berrange at redhat.com
Wed Jul 8 14:02:05 UTC 2009


On Wed, Jul 08, 2009 at 03:54:07PM +0200, Jim Meyering wrote:
> Daniel P. Berrange wrote:
> > On Tue, Jul 07, 2009 at 07:02:08PM +0200, Jim Meyering wrote:
> >> @@ -5,7 +5,8 @@ AC_CONFIG_SRCDIR([src/libvirt.c])
> >>  AC_CONFIG_AUX_DIR([build-aux])
> >>  AM_CONFIG_HEADER([config.h])
> >>  dnl Make automake keep quiet about wildcards & other GNUmake-isms
> >> -AM_INIT_AUTOMAKE([-Wno-portability])
> >> +AM_INIT_AUTOMAKE([1.11 color-tests parallel-tests -Wno-portability])
> >> +AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
> >>  AC_CANONICAL_HOST
> >
> > Actually an alternative idea - don't add a hard pre-requisite on 1.11.
> > Instead just add a
> >
> >    m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
> >
> > ie, just provide a no-op AM_SILENT_RULES for older automake. Then we
> > can just throw out 'mylibtool'. People with new enough automake will
> > get the silent build support, and we can still have compatability with
> > older automake for RHEL-5 albeit without silent build support.
> 
> I like that.
> 
> From a0aeb1abb35968e68a547d6ccca6109845c3a7c6 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <jim at meyering.net>
> Date: Wed, 8 Jul 2009 11:51:59 +0200
> Subject: [PATCH] use automake-1.11's silent-rules option, when possible
> 
> Don't use mylibtool, (subsumed by automake's silent rules)
> Its use was causing a non-srcdir build to fail.
> * Makefile.am (EXTRA_DIST): Remove mylibtool.
> * configure.in: Don't use mylibtool.
> 
> * configure.in: Use AM_SILENT_RULES([yes]),
> but only if that m4 macro is defined.
> Thus, it works even on systems that lack automake-1.11.
> Daniel Berrange suggested adding the conditional, so that
> we don't have a hard requirement on 1.11, e.g., for RHEL5.
> ---
>  Makefile.am  |    3 +--
>  configure.in |    9 +++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index f874325..f9efff5 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -21,8 +21,7 @@ EXTRA_DIST = \
>    .x-sc_require_config_h \
>    .x-sc_prohibit_nonreentrant \
>    Makefile.nonreentrant \
> -  autogen.sh \
> -  mylibtool
> +  autogen.sh
> 
>  man_MANS = virsh.1
> 
> diff --git a/configure.in b/configure.in
> index 29c8867..552089a 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -6,6 +6,11 @@ AC_CONFIG_AUX_DIR([build-aux])
>  AM_CONFIG_HEADER([config.h])
>  dnl Make automake keep quiet about wildcards & other GNUmake-isms
>  AM_INIT_AUTOMAKE([-Wno-portability])
> +
> +# Use the silent-rules feature when possible.
> +m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
> +AM_SILENT_RULES([yes])
> +
>  AC_CANONICAL_HOST
> 
>  LIBVIRT_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
> @@ -58,10 +63,6 @@ dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
>  AC_LIBTOOL_WIN32_DLL
> 
>  AM_PROG_LIBTOOL
> -dnl Override normal libtool in favour of our quiet version
> -LIBTOOL='$(SHELL) $(top_srcdir)/mylibtool'
> -AC_SUBST([LIBTOOL])
> -
>  AM_PROG_CC_C_O
> 
>  VERSION_SCRIPT_FLAGS=-Wl,--version-script=


ACK, I've tested on RHEL-5, the only issue was a minor warning from
aclocal, which was evidently harmless.

aclocal:configure.in:12: warning: macro `AM_SILENT_RULES' not found in library

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 :|




More information about the libvir-list mailing list