On Aug  7, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:

> | ifndef([AC_NO_EXECUTABLES],[
> |   AC_DEFUN([AC_NO_EXECUTABLES],[

> Ahem, `AC_' is somewhat reserved to Autoconf :)

Precisely.  I'm suggesting autoconf to supply AC_NO_EXECUTABLES, and
we'd be using this fallback definition only with older releases of
autoconf.

> I'm not too fond of this scheme: it is greatly bound to the internals
> of Autoconf.

It has to be, with autoconf 2.13, because there are not ``externals''
that make it possible.  That's precisely what I'd like to fix in
the next release.

> | Now we (the GCC folks) have two problems.  We'd like to have this
> | supported by the next release of autoconf 

> Can we imagine an approach based on finger grained macros?  What is it
> that you still want to run in what an AC_PROG_COMPILER is:

> 1. Looking for the executable
> 2. checking that it works
> 3. checking that it's GNU
> 4. checking that it support -g
> 5. setting EXEEXT and OBJEXT.

> Would it be enough to just extract 1. from AC_PROG_CC?

No.  What we need now is to be able to skip 2 and 5, or parts of them,
because we can't assume the compiler is able to link.

> | Any ideas about how to selectively disable AC_TRY_LINK, to use in
> | AC_NO_CXX_EXECUTABLES?  Any suggestions about naming conventions for
> | these macros?

> How about something as hacky as this:

I was thinking of something like:

define([AC_TRY_LINK],[ifelse([_AC_LANG],[C],[My def],]defn([AC_TRY_LINK])[)])

but how can something like this be made to work?  The problem is the
incomplete `ifelse' and unmatched parens.  Can anything like this be
reworked in a way m4 accepts it?  Or is m4 supposed to accept it as I
wrote? (I haven't tested, just assumed it was wrong :-)

We don't really need it this way; just issuing an m4_error and closing
the ifelse would be enough, but it would be nice to avoid the linking
step completely.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Reply via email to