[fedfs-utils] [PATCH v2 3/8] build: avoid automake warnings about AM_PROG_AR requirement

Jim Meyering jim at meyering.net
Fri Dec 2 04:13:45 PST 2011


Chuck Lever wrote:
> On Dec 1, 2011, at 7:27 AM, Jim Meyering wrote:
>> From: Jim Meyering <meyering at redhat.com>
>> * configure.ac: Use AM_PROG_AR (must precede LT_INIT).
>> Without this, when using what will soon be automake-1.11.2, we'd
>> get a warning like this for each .a file:
...
> After applying this on my Fedora 15 build system, I get:
>
> [cel at degas fedfs-utils]$ sh ./autogen.sh
> cleaning up................... done
> configure.ac:35: warning: macro `AM_PROG_AR' not found in library

I dug a little deeper and discovered that this arises from the
combination of fedfs-utils' use of -Wall and -Werror and my use
of almost-automake-1.11.2.  Here's a better patch:

>From c3f1cfcb1506126cf56717ba22abd9537321ae7a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Wed, 30 Nov 2011 20:41:48 +0100
Subject: [PATCH] build: accommodate our use of -Wall with upcoming
 automake-1.11.2

* configure.ac: Using the -Wall option with what will soon be
automake-1.11.2 results in a warning like this for each .a file:
  automake: warnings are treated as errors
  /usr/share/automake-1.11a/am/library.am: warning: `libadmin.a':\
    linking libraries using a non-POSIX
  /usr/share/automake-1.11a/am/library.am: archiver requires \
    `AM_PROG_AR' in `configure.ac'
  src/libadmin/Makefile.am:26:   while processing library `libadmin.a'
That is due to the -Wextra-portability option implied by -Wall.
Since AM_PROG_AR is new to automake-1.11.2, for now just disable
the -Wextra-portability option.

Signed-off-by: Jim Meyering <meyering at redhat.com>
---
 configure.ac |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2a2052f..b439f3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,10 @@ AC_CONFIG_MACRO_DIR([m4])

 # Automake and libtools initialization
 LT_INIT
-AM_INIT_AUTOMAKE([-Wall -Werror silent-rules])
+
+# Disable the -Wextra-portability option until developers can all use
+# automake-1.11.2 or newer, at which point we'll use the new AM_PROG_AR instead.
+AM_INIT_AUTOMAKE([-Wall -Werror silent-rules -Wno-extra-portability])

 # configure command line options
 AC_ARG_WITH([fedfsuser],
--
1.7.8.rc4



More information about the fedfs-utils-devel mailing list