:( 2.50 is never going to be born :( My $2.14a :)
| In several of these libraries, work-arounds have been introduced to
| avoid the AC_PROG_CC_WORKS test, that would just abort their
| configuration. The introduction of AC_EXEEXT, enabled either by
| libtool or by CVS autoconf, have just made matters worse.
Yep, I guess we need something finer grained. Top level AC_PROG_CC
etc., composed of lower level macros. In fact, that was my intention
while moving to a more logical AC_LANG_COMPILER or something.
| After some discussion in the gcc-patches mailing list, and some
| additional issues I've just thought of, I'm proposing something like
| this for such libraries:
|
| ifndef([AC_NO_EXECUTABLES],[
| AC_DEFUN([AC_NO_EXECUTABLES],[
| AC_BEFORE([AC_NO_EXECUTABLES],[AC_PROG_CC_WORKS])
| AC_BEFORE([AC_NO_EXECUTABLES],[AC_EXEEXT])
| AC_BEFORE([AC_NO_EXECUTABLES],[AC_TRY_LINK])
| AC_DEFUN([AC_PROG_CC_WORKS],[cross_compiling=untested])
| AC_DEFUN([AC_EXEEXT],[EXEEXT=])
| AC_DEFUN([AC_TRY_LINK],[m4_error([Cannot perform link tests])])
| ])
| ])
Ahem, `AC_' is somewhat reserved to Autoconf :)
I'm not too fond of this scheme: it is greatly bound to the internals
of Autoconf. If we make this possible, it means we close our internal
interface for checking for compilers, which is one of the less well
designed, and promises many changes in the future :(
| 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? Hm.
| and we'd like to be able to
| disable linking tests on a per-language basis. For example, we may be
| unable to do linking tests while compiling the C support libraries,
| but, after this is done, we might use C linking tests while
| configuring the C++ libraries.
|
| 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:
define([AC_TRY_LINK_ORIGINAL], defn([AC_TRY_LINK]))
AC_DEFUN([AC_TRY_LINK],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
AC_DEFUN([AC_TRY_LINK(C)],
[My def])
or
AC_DEFUN([AC_TRY_LINK(C)],
defn([AC_TRY_LINK_ORIGINAL]))
etc.