bug-gnulib
[Top][All Lists]
Advanced

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

Re: iconv.m4: avoid warning


From: Eric Blake
Subject: Re: iconv.m4: avoid warning
Date: Mon, 17 May 2010 10:38:09 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4

On 05/16/2010 03:51 PM, Bruno Haible wrote:
> Somehow I got this autoconf warning:
> 
>   configure.ac:127: warning: AC_REQUIRE: `AM_ICONV' was expanded before it 
> was required
> 
> AM_ICONV is AC_REQUIREd in many places, but documented as an invokable macro 
> in
> the gettext documentation. Therefore it makes sense to use AC_DEFUN_ONCE. I'm
> applying this:
> 
> 
> 2010-05-16  Bruno Haible  <address@hidden>
> 
>       Avoid autoconf warnings about AM_ICONV.
>       * m4/iconv.m4 (AM_ICONV): Define using AM_DEFUN_ONCE for autoconf >=
>       2.64.

Typo in the ChangeLog; s/AM_DEFUN_ONCE/AC_DEFUN_ONCE/

> +++ m4/iconv.m4       Sun May 16 23:45:56 2010
> @@ -1,4 +1,4 @@
> -# iconv.m4 serial 9 (gettext-0.18)
> +# iconv.m4 serial 10 (gettext-0.18.1)
>  dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
>  dnl This file is free software; the Free Software Foundation
>  dnl gives unlimited permission to copy and/or distribute it,
> @@ -170,7 +170,10 @@
>    AC_SUBST([LTLIBICONV])
>  ])
>  
> -AC_DEFUN([AM_ICONV],
> +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
> +dnl avoid warnings like
> +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
> +m4_version_prereq([2.64],[AC_DEFUN_ONCE],[AC_DEFUN])([AM_ICONV],

That's great for gettext, where you don't require autoconf 2.64 but also
don't guarantee AC_DEFUN_ONCE.  But what about for gnulib, where we
guarantee that even with autoconf 2.59, we have a working AC_DEFUN_ONCE?
 In other words, rather than have a version check, I'd rather see:

m4_ifdef([AC_DEFUN_ONCE],[AC_DEFUN_ONCE],[AC_DEFUN])([AM_ICONV],

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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