I don't think I said that I was determining the c-compiler based on the presence of an API. I'm saying that I have a known combination of OS/API/Compiler that requires a command line flag in order for compilation to be successful. Surely you're not suggesting that's unusual, otherwise we wouldn't have an autoconf script in the first place.
I tried to figure out what variable this flag ought to be placed in. I tried finding the correct spot and it appears (through sloppiness or design) that everything ends up on all invocations of the c compiler or linker. Placing this flag on a linking command causes the linking to fail.
Regarding your comment about available compilers, CodeWarrior hasn't targeted desktop systems for 10 years or so. There are other compilers out there, but the number of people using them is extremely low, to the point of being non-existent among pike-users.
Incidentally, on the latest releases of Darwin, the default compiler (with is llvm-based) aborts when compiling mapping.c. I still use regular gcc, so haven't attempted to report the bug.
Bill
On Wed, 21 Dec 2011, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Are you telling me that the choice of compilers on Darwin is so poor that you only have one (1) to choose from? Doesn't e.g. CodeWarrior run on Darwin?
Not that it actually matters. Deducing which C-compiler is used from the presence of a particular C-API sounds just too broken. What if someone (such as OpenStep) implements the API on some other platform?