autoconf
[Top][All Lists]
Advanced

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

Re: autoreconf and m4_pattern_allow


From: Ralf Wildenhues
Subject: Re: autoreconf and m4_pattern_allow
Date: Thu, 9 Feb 2006 08:02:43 +0100
User-agent: Mutt/1.5.9i

Hi Robert,

* Robert Lowe wrote on Thu, Feb 09, 2006 at 06:47:37AM CET:
> 
> Until today I had never tried autoreconf.  I have always used a simple
> shell script like:
*snip*
> The script runs just fine, but autoreconf complained about my use of
> AC_CREATE_STDINT_H, insisting that I use m4_pattern_allow, which I
> did, and the problem vanished.  But, would anyone explain what
> happened and why?  Does it perhaps have anything to do with the fact
> that this macro is the only one I am using named AC_*, rather than say
> ACX_*?

Well, m4 macros have no way to guard against overwriting or anything.
So the only way to have "namespaces" (note the quotes) is to use some
sort of simple criterion for where the macro comes from.  AC_* should
denote macros from plain Autoconf itself.  Since Autoconf has some sub
structure, there are also AH_* (autoheader related), AU_* (autoupdate
related), AT_* (autotest related), and AS_*/M4SH_* (m4 sugar).

For Automake there is AM_*, and libtool moves to LT_*/LTDL_*, gnulib
has gl_*, some but not all of the autoconf-archive macros have ACX_*.

Each of above potentially also have prefixes starting with an underscore
and one aforementioned prefix, to denote internal macros.

You should use your own prefix.  Either rl_*, or maybe something related
to the name of your package; more than two significant letters would
probably be even better.

If your macros will be included in one of above projects, it will be
very simple to change their name and also provide backward compatibility
by using AU_DEFUN or AU_ALIAS statements.

Cheers,
Ralf




reply via email to

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