autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH] A better (?) _AC_EXEEXT


From: Pavel Roskin
Subject: RE: [PATCH] A better (?) _AC_EXEEXT
Date: Thu, 12 Oct 2000 14:31:56 -0400 (EDT)

Hello, Bernard!

> I have another problem with the patch (I just re-read the whole thread): It
> is well possible the compiler accepts to create an executable without any
> suffix on Win32 (I think I remember that "gcc -o conftest conftest.c" will
> create conftest only), but in a lot of cases "conftest" will *not* be
> recognized as an executable (for example by cmd.exe...). This is especially
> a problem if you use MinGW32, as cygwin bash will accept to run "conftest"
> without any problem...

I used to run configure on MKS (some commercial toolkit with Korn shell,
other UNIX utilities and a wrapper around cl.exe)

Well, let's try to sum up.

1) It may be required to give a specifix suffix to the executable filename
when compiling for some OS'es.

2) The environment used to build the project (which is not the same as the
environment used to run the executable, think e.g. NT vs. Win9x) may try
to hide this complexity from us but may (or may not) fall short at some
point which may be different (i.e. "cp" may be fixed in the next version
of CygWin)

3) We don't support extensions other than .exe for now. Supporting them
without having a working example would be waste of time.

4) It is not a big deal whether we add the extension while crosscompiling.
Crosscompiling environments can have EXEEXT set by hand.

5) At least for all known PC-based environments we should always prefer
EXEEXT=".exe" over EXEEXT="", regardless of whether the build system can
deal with both.

6) It should be possible to test EXEEXT under any AC_LANG - no need to use
C in Fortran projects just for that (maybe not a this stage).

Possible solution:

1) Check if any of symbols pertinent to PC-based systems is defined:
#if defined (OS2) || defined (CYGWIN) || defined (WIN32) ...
yes, .exe is needed
#endif

Don't bother distinguishing between different systems. Use both symbols
specific for the OS (WIN32) and symbols specific to the compiler (EMX)

2) Even if none of those symbols is defined, compile and specify "-o
conftest" and then check "test -f conftest.exe"

Those tests combined together will probably cover all the cases we know of
and most others.

Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]