bug-automake
[Top][All Lists]
Advanced

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

Re: ‘libunistring’ module errors


From: Ralf Wildenhues
Subject: Re: ‘libunistring’ module errors
Date: Sat, 5 Jun 2010 08:09:48 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

[ adding bug-automake ]

Hi Bruno,

* Bruno Haible wrote on Thu, Jun 03, 2010 at 02:01:29PM CEST:
> 
> The reason is that 'aclocal' has generated an aclocal.m4 file that does not
> include m4/libunistring.m4. I thought that 'aclocal' was using autom4te with
> --trace options, implying that any AC_DEFUN or AC_DEFUN_ONCE invocation that
> is correct from an m4 point of view is also seen by 'aclocal'. But this is
> not the case: 'aclocal' actually has a first pass that scans the files using
> 'grep', rather than autom4te. This pass fails to notice the AC_DEFUN or
> AC_DEFUN_ONCE invocation if it is written in this way:
>   m4_version_prereq([2.64],[AC_DEFUN_ONCE],[AC_DEFUN])([gl_LIBUNISTRING], ...)
> 
> This patch adds a workaround by using a syntax that is both m4-correct _and_
> matches the undocumented(!) syntax that 'aclocal' expects.

Thanks for the analysis.  I'm fairly sure aclocal does this out of
necessity, i.e., it might lead to disaster if it were to trace an
unknown, possibly conflicting set of macro files.  (The other
possibility why it was done this way is efficiency.)

The macros which are essentially grepped are AC_DEFUN, AU_DEFUN,
AC_DEFUN_ONCE, AU_ALIAS, AC_REQUIRE, m4_include, m4_sinclude,
include, sinclude.  This needs to be documented in the manual.
I'm actually not sure whether it was an unintended error to let
aclocal also match words only ending in the above, such as
  gl_iconv_AC_DEFUN

so another way to get around that would be, I think,

  m4_version_prereq([2.64],
    [m4_pushdef([AC_DEFUN], m4_defn([AC_DEFUN_ONCE]))])
  AC_DEFUN([AM_ICONV], ...)
  m4_popdef([AC_DEFUN])

Cheers,
Ralf

> 2010-06-03  Bruno Haible  <address@hidden>
> 
>       Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands.
>       * m4/iconv.m4 (gl_iconv_AC_DEFUN): New macro.
>       (AM_ICONV): Define it through gl_iconv_AC_DEFUN.
>       * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): New macro.
>       (gl_LIBUNISTRING): Define it through gl_libunistring_AC_DEFUN.
>       Reported by Ludovic Courtès <address@hidden>.



reply via email to

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