autoconf
[Top][All Lists]
Advanced

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

RFC: AC_DEFINE_REPLACE


From: Akim Demaille
Subject: RFC: AC_DEFINE_REPLACE
Date: 26 Mar 2002 11:18:23 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

There is a problem that affects several tests in Autoconf, and worse,
that can affect users who don't have our experience, because the
problem is nasty.

There are more and more tests (and packages that uses these tests)
that decide that a low level routines is not good enough for them.  A
fine example is wrt malloc: if malloc (0) does not work properly, then
AC_DEFINE(malloc, rpl_malloc), and AC_LIBOBJ (malloc) does the trick.

But this results in confdefs.h, the header run at configure time in
each test, containing

#define malloc rpl_malloc

As is to be expected, all the tests that use malloc will now fail on
the platforms having a bad malloc.

This is extremely dangerous IMHO, and we have to provide a solution.
In addition, brining some normalization in discovered idioms is one of
the tasks of Autoconf itself.

So I propose that we settle rpl_ as _the_ prefix, or may autoconf_rpl,
as you like.  But just one single prefix dictated by Autoconf.  Then
the user says

        AC_DEFINE_REPLACE(malloc)

or whatever syntax (AC_REPLACE is a but ambiguous because of
AC_REPLACE_FUNC).  Or actually, maybe AC_REPLACE_FUNC should handle
this AC_DEFINE itself, and would remain the only visible user
interface.

What would change is that now Autoconf would know what are the #define
corresponding to the replacement of the functions.  _Then_ it will be
easy to find a scheme to disable the disabling of these functions
inside configure.



reply via email to

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