bug-autoconf
[Top][All Lists]
Advanced

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

Re: unjustified warning from AC_BEFORE


From: Stepan Kasal
Subject: Re: unjustified warning from AC_BEFORE
Date: Mon, 31 Jul 2006 19:02:27 +0200
User-agent: Mutt/1.4.2.1i

Hello,

On Mon, Jul 31, 2006 at 04:52:02PM +0200, Bruno Haible wrote:
> AC_BEFORE([AC_PROG_INSTALL],[gl_RELOCATABLE])
> should have the effect to "warn the user if a call to gl_RELOCATABLE
> has already occurred when AC_PROG_INSTALL is called". [...]

well, currently AC_BEFORE([FOO], [BAR]) makes sure that BAR was not
yet expanded.  It is supposed that this macro is called from FOO;
perhaps we should issue a warning if it is not.  The macro ignores
its first parameter.

Actually, it is a trivial application of m4_provide_if (a.k.a.
AC_PROVIDE_IFELSE).  Perhaps we could make the confusing
AC_BEFORE as obsolete, replacing it by m4_provide_if (which would
have to be documented for this purpose).

> about is this situation:
> 
>    AC_PROG_INSTALL
>    gl_RELOCATABLE
>    AC_PROG_INSTALL

Then redefine AC_PROG_INSTALL so that it issues the warning before
calling the original code:

----- snip --------
AC_INIT([foo], [1.0], address@hidden)

AC_DEFUN([gl_RELOCATABLE],
[do something
  m4_define([AC_PROG_INSTALL],
    [m4_warning([AC_PROG_INSTALL was called after gl_RELOCATABLE])]
    m4_defn([AC_PROG_INSTALL]))
])

AC_PROG_INSTALL
gl_RELOCATABLE
AC_PROG_INSTALL
----- snip --------

Does this solve your problem?

Have a nice day,
        Stepan




reply via email to

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