bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11401: automake-1.12 (incorrectly?) complains about missing AM_PROG_


From: Peter Rosin
Subject: bug#11401: automake-1.12 (incorrectly?) complains about missing AM_PROG_AR
Date: Fri, 04 May 2012 09:20:10 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

Hi Mike!

On 2012-05-04 07:25, Mike Frysinger wrote:
> consider this simple code base:
> $ cat configure.ac
> AC_PREREQ([2.63])
> AC_INIT([foo], [0])
> AM_INIT_AUTOMAKE([1.11 -Wall foreign])
> AC_PROG_CC
> LT_INIT
> AC_OUTPUT(Makefile)
> 
> $ cat Makefile.am
> lib_LTLIBRARIES = libfoo.la
> libfoo_la_SOURCES = foo.c
> 
> $ touch foo.c
> 
> with automake-1.11.5, everything works great:
> $ autoreconf -f -i
> libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
> libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
> libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
> 
> however, upgrade to automake-1.12, and it starts spitting this:
> libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
> libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
> libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
> /usr/share/automake-1.12/am/ltlibrary.am: warning: 'libfoo.la': linking 
> libtool libraries using a non-POSIX
> /usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 
> 'configure.ac'
> Makefile.am:1:   while processing Libtool library 'libfoo.la'
> 
> what gives ?

If you don't want *all* warnings, don't ask for *all* warnings :-)

It's in NEWS, from 1.12:

  - The warnings in the category 'extra-portability' are now enabled by
    '-Wall'.  In previous versions, one has to use '-Wextra-portability'
    to enable them.

which should be read in light of this from 1.11.2:

  - New macro AM_PROG_AR that looks for an archiver and wraps it in the new
    'ar-lib' auxiliary script if the selected archiver is Microsoft lib.
    This new macro is required for LIBRARIES and LTLIBRARIES when automake
    is run with -Wextra-portability and -Werror.

You can get rid of the warning with the following (but I have not actually
tested with your example):

AM_INIT_AUTOMAKE([1.11 -Wall -Wno-extra-portability foreign])

Cheers,
Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]