[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: EXEEXT mechanism broken?
From: |
Tim Van Holder |
Subject: |
RE: EXEEXT mechanism broken? |
Date: |
Sat, 20 Jan 2001 01:20:26 +0100 |
> Now I have ac_exeext set in config.site (otherwise the check
> whether the compiler works fails); and I've never had the
> exeext mechanism fail this way. It's easy enough to avoid by
> setting ac_cv_exeext in config.site as well, but I do believe
> a real fix is in order.
> The problem seems to be that ac_exeext is initialized with
> ac_cv_exeext, which starts out empty. This kills the setting
> from config.site, resulting in breakage. What is also odd is
> that _AC_COMPILER_EXEEXT_DEFAULT doesn't seem to get called (as
> that would probably have found the right value).
Turns out _AC_COMPILER_EXEEXT_DEFAULT does get called.
However, in _AC_COMPILER_EXEEXT_DEFAULT the link command has the
-o stripped out. And for my gcc setup at least, this results in
a.out, not a.exe (though a.out is actually a .exe format file);
only -o results in a '.exe' suffix being tacked on.
As a result, _AC_COMPILER_EXEEXT_DEFAULT sets ac_cv_exeext, which
is subsequently used to override ac_exeext.
And all that would only be done if ac_exeext was set in
config.site; otherwise _AC_LANG_COMPILER_WORKS would fail.
So _AC_COMPILER_EXEEXT really needs to be called before (or be
integrated in) _AC_LANG_COMPILER_WORKS, as that relies on ac_exeext
(although that is pretty much a chicken/egg thing).
I'll post a diff with what works for me in the morning. It's late
and I need sleep. Unless someone can tell me where to get Bawls
Guarana in Europe; that way I might be able to squeeze of few more
hours out of the day/night.