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

Ah!  Sorry, I misunderstood.

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

Are you saying you are looking for a 2.13 and 2.50 compatible
solution?  Why?  Why not have 2.50 do exactly what you need instead of
trying to have something which fits with 2.13 too?


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

Really, I dislike macros which change some state, and change the
semantics of other macros.  For one, it makes --trace lie.  We'd
better find exactly what is the grain you need, and provide the
equivalent macros.

| > | 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 :-)

What do you dislike in my proposal?  It's basically the same, but more
Autoconf like, and more scalable.  You can

define([AC_TRY_LINK(C)],
[All my stuff
AC_TRY_LINK_ORIGINAL(Some, more, stuff)])

etc.

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

define([AC_TRY_LINK(C)],
[m4_error([no you don't!])])

Reply via email to