I have taken a look at the AC_PROG_CC_STDC macro in CVS autoconf and,
while I think it's a step ahead, the solution doesn't strike me as very
far-sighted.
What I would like is a general solution that tells me what compiler I'm
using so I can add custom options. For example, the project I contribute
to needs the option '-Olimit 2000' on OSF/1 for reasons beyond me. AIX
needs an option to enable long long int. And so on, I don't know what all
these options are for but those using these systems probably do. We
currently have code that pretty much infers the compiler vendor from the
system triple and [ $GCC != "yes ] but that doesn't suffice because
vendors change their compilers over time.
It occured to me that a nice solution would be to extend AC_PROG_CC_GNU to
the general case by not only testing whether __GNUC__ is defined but also
__DECC et al. and either setting variables like DECC=yes or more generally
CCVENDOR={gnu|dec|...}. (If you think that calling GNU a "vendor" is
inappropriate, find a different terminology. :)
If that were done then the AC_PROG_CC_STDC macro could also operate a
little more elegantly than trying each option and seeing what works.
(AFAIK, each of the compilers currently covered by PROG_CC_STDC would be
detectable by the above approach.)
Comments?
--
Peter Eisentraut Sernanders väg 10:115
[EMAIL PROTECTED] 75262 Uppsala
http://yi.org/peter-e/ Sweden