autoconf
[Top][All Lists]
Advanced

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

Re: autoreconf and m4_pattern_allow


From: Robert Lowe
Subject: Re: autoreconf and m4_pattern_allow
Date: Thu, 09 Feb 2006 22:36:23 -0600
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Ralf Wildenhues wrote:

Hi Ralf,

<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_*.

This macro is from the autoconf archive.  Should I submit a patch to
change it to 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.

All very good advice, and helpful information!  Thank you!!!

-Robert




reply via email to

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