automake
[Top][All Lists]
Advanced

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

Re: undefined macro


From: Ralf Wildenhues
Subject: Re: undefined macro
Date: Thu, 29 Mar 2007 11:24:07 +0200
User-agent: Mutt/1.5.14 (2007-03-22)

Hello John, Jason, all,

* John Darrington wrote on Thu, Mar 29, 2007 at 01:52:12AM CEST:
> [ CCing to address@hidden as this is an automake issue ]

Thanks.

> I had similar problems after upgrading to automake-1.10, which
> (because it wasn't available in Debian etch) I installed in /usr/local
> whereas all the m4 macros were in /usr.

This is an issue, but AFAICS it's not the same one as what Jason is
experiencing.

> The solution I used was to create a file
> /usr/local/share/aclocal/dirlist containing the single line
> 
>  /usr/share/aclocal
> 
> I don't think this solution is particularly neat, but it worked for
> me.

For your issue (letting aclocal know about third-party m4 files
installed below a different $prefix), your solution is the best
one currently available.

See at the end for a solution to Jason's issue.

> On Wed, Mar 28, 2007 at 04:08:30PM -0400, Jason Stover wrote:
>      make -f Smake is failing to expand AM_INTL_SUBDIR.  I've been
>      struggling with this problem for a while now.  My lack of
>      understanding of aclocal and autoconf is hindering progress. So tell
>      me if I have this straight:
>      
>      1. aclocal should copy the contents of m4/*.m4 and gl/m4/*.m4
>         into configure.ac.

aclocal creates the file aclocal.m4.  It looks at configure.ac and all
kinds of other files and figures what text is needed in the output file.
Then all macro files needed are copied in there (for macros found in
installed files) or links to them by way of m4_include() (for macros
found in files with a non-absolute path).

>      2. autoconf should read the macros defined in configure.ac, run
>         m4 on them, and place the results in configure.

autoconf reads configure.ac, aclocal.m4, m4_include()d files (and a
couple more), and expands macros recursively.

[...]
>      aclocal -I m4 -I gl/m4
>      autoconf
>      configure.ac:26: warning: AM_INTL_SUBDIR is m4_require'd but not 
> m4_defun'd
>      m4/gettext.m4:362: AM_GNU_GETTEXT is expanded from...
>      configure.ac:26: the top level
>      configure:20777: error: possibly undefined macro: AM_INTL_SUBDIR
>            If this token and others are legitimate, please use 
> m4_pattern_allow.
>            See the Autoconf documentation.
>      *** Error code 1
>      
>      ...the problem is that I can see the macro defined in the m4 directory:
>      
>      $ grep AM_INTL_SUBDIR m4/*.m4 
>      m4/gettext.m4:    AC_REQUIRE([AM_INTL_SUBDIR])dnl
>      m4/intl.m4:AC_DEFUN([AM_INTL_SUBDIR],
>      
>      ...so it looks like aclocal isn't including some necessary information in
>      configure.ac. Is that right? 
[...]
>      A few details that might be relevant: I recently upgraded to the latest 
> version
>      of automake, and auto*, and aclocal. My system has BSD m4 in /usr/bin, 
> and GNU
>      m4 1.4.3 in /usr/local/bin.

I think you need a newer M4.  1.4.9 is the current one, but I think the
fix you need is in 1.4.5.

Cheers,
Ralf




reply via email to

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