Tom Lane writes:
> The problem is to select an appropriate template if none of the
> patterns in template/.similar match your platform name. We have had
> many cases before where the platform vendor comes out with some random
> new variant on their uname output that causes the .similar match to
> fail (Alpha's "evNN" being the latest example).
That's why this is wrong. We currently rely on the OS name, maybe the
complete triple, maybe the uname output. Of course we have no idea whether
it will work.
That is the very reason why config.guess and config.sub were invented, and
that's why we should use them exclusively, IMHO. All the possible outputs
of config.guess are known to us now, so there should be no surprises when
somebody changes their uname.
We ought to make use of the information given to us if possible and not
try to construct our own, much poorer, information instead.
Another problem with --with-template is this:
* user specifies --with-template=foonix_gcc
* template sets CC=gcc
* AC_PROG_CC assumes "gcc" as compiler
Maybe the user's compiler isn't called "gcc", maybe it's called "egcs"
(like mine), or "gcc2", or "/opt/experimental/gcc-3.19/bin/gcc".
Okay, maybe the other way around:
* user runs "CC=egcs ./configure"
* AC_PROG_CC verifies "egcs" as compiler
* template "foonix_gcc" gets chosen
* template sets CC=gcc -- boom!
So the compiler information must disappear from the template files.
If you accept that then we could make --with-template specify the
"template prefix" and the compiler information gets added on if it turns
out there are two templates "name_cc" and "name_gcc". Then we'd have the
procedure
AC_PROG_CC
if --with-template was given, use that
else find one yourself
Btw: Just today someone wrote about this very problem ("[GENERAL] [Help]
INSTALLing 7.02").
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden