All the talk about config.cache (and even some consensus on changing it,
which is encouraging!) induced me to bring up this rant again.  It got
little response last time.

I think we should remove the default assumption about cross-compilation
in autoconf.

The number of configure.in scripts that can even do it is vanishingly
small, since AC_TRY_RUN doesn't work.

And it is a constant cause of annoying outcomes, because whenever
configure is able to compile and link, but not run, a compiler test
program it just assumes that you're trying to do cross-compilation.  It
doesn't give any error, or any warning, or anything, so unless you just
happen to notice the "[...] cross-compiling ... yes" as it flies by,
you're extremely confused when you try to build the thing.

Every week or two in FVWM we get people who are trying to build on
Solaris with G++ and it doesn't work because they forgot the -R flag to
find libstdc++.  So the link works, but the thing won't run--must be
cross-compiling!  They don't notice this little note in the output, and
bang!  Confusion reigns.

As a package maintainer this is the most common configure-related
problem _I_ see.

Two things:

 1) Cross-compilation should be turned off unless some autoconf macro
    exists that says "this package is cross-compiler capable".  If the
    compiler can't run the compiler test program and this special macro
    isn't present, configuration should fail right there.

    Or, alternatively, there could be a command-line option which
    enables cross-compilation checking.  The error above could be
    something like "Couldn't find a working compiler (if you want to
    cross-compile, add --enable-cross-compilation to the configure
    command)" or whatever.

 2) If you've already tested for C and that decided it _wasn't_
    cross-compiling, then you test for C++ and it decides you _are_
    cross-compiling, that should be a fatal error right there, too.

Yes, I can do both of these checks myself (and probably will), but I
think they should be the default behavior.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

Reply via email to