ac-archive-maintainers
[Top][All Lists]
Advanced

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

Re: Contributions for ac-archive


From: Guido Draheim
Subject: Re: Contributions for ac-archive
Date: Sun, 09 Feb 2003 04:27:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020826

Scott Pakin schrieb:
Guido,

Sorry to take so long to get back to you but I've been pretty busy
these days.

no problem, everyone of us is too short on time for the things
that we would like to do... ;)

[...]
(a) you've picked the AX_-prefix for the macros but the various
    dedicated variables (like for CACHE_CHECK) there is ac_cv_


Fixed.  I guess I was unsure if "ac_cv" was special or not.

I'm not sure either, but it is actually a similar problem as
with the AC_ prefix - one might easily hit a shellvar used
by core autoconf - if not now then perhaps later. *sigh*

[..]
(f) I am not sure whehter they should be named AX_FUNC_ as is, as
    they do not provide the functionality. They are CHECK functions
    in a way. Also, the AC_DEFINE value is not quite guessable
    from the macro name. Hmmm, looking into the main autoconf parts,
    I guess it would be better to choose this scheme:
    (1) AX_FUNC_POSIX_MEMALIGN
        AC_DEFINE(HAVE_POSIX_MEMALIGN,
        [whether your system has a working `posix_memalign' function])
    (2) AX_CHECK_PAGE_ALIGNED_MALLOC
        AC_DEFINE(HAVE_PAGE_ALIGNED_MALLOC,.... (etc as is))


Good points.  I don't particularly like the way that the built-in
Autoconf macros HAVE_<FOO> tend to mean "<FOO> exists and works
properly" -- I'd have put "WORKS" in the name for working tests and
left it out for existence tests.  Still, I consider it important for
the AC-Archive macros to be consistent with Autoconf's macros.  Here's
how I've renamed things for consistency with Autoconf:

    AX_FUNC_POSIX_MEMALIGN   ax_cv_func_posix_memalign_works   
HAVE_POSIX_MEMALIGN

for consistency with:

    AC_FUNC_MALLOC           ac_cv_func_malloc_works           HAVE_MALLOC
    AC_FUNC_CHOWN            ac_cv_func_chown_works            HAVE_CHOWN

I also renamed AX_CHECK_MALLOC_ALIGNED to AX_CHECK_MALLOC_ALIGNED as
you suggested.

In addition to your recommendations, I replaced "return" with "exit"
in AX_FUNC_POSIX_MEMALIGN and AX_CHECK_PAGE_ALIGNED_MALLOC as I just
noticed a line in the Autoconf manual that says, "Test programs should
`exit', not `return', from `main', because on some systems (old Suns,
at least) the argument to `return' in `main' is ignored."

The new versions of my functions are attached below.

Thanks for your constructive criticism,

Looks great, thanks to you for taking so much effort
in making them - and allowing us to have them published.
I'm putting the macros into an incoming `pakin` area
at sfnet for the moment, Peter will have a look later
as to where to put them finally.

http://ac-archive.sf.net/pakin/

have fun,
-- cheers, guido





reply via email to

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