[Distutils] Autoconf in Python
Greg Ward
gward@python.net
Wed, 21 Jun 2000 21:28:23 -0400
On 21 June 2000, M.-A. Lemburg said:
> Uhm, why not simply compile the whole thing instead of
> just running the preprocessor ? (I think that's how autoconf
> does it too)
Because sometimes all you want to know is "is __linux__ defined?" or
"does including <time.h> get strftime's declaration?".
Granted, both of these can be answered by just compiling a test program.
Hmm... there must be *some* reason, after I spent all of 15 minutes
implementing the preprocessor interface in UnixCCompiler...
Any history-of-autoconf wizards out there who can answer this one? I
wouldn't be surprised if it boils down to, "running GCC 1.x on a 16 MHz
i386 under SunOS 3.x is really slow, so let's just run the
preprocessor".
> This would have the advantage of being portable and wouldn't
> rely on some commonly used command line flag (note that the
> C preprocessor is usually also reachable directly, e.g. on
> Linux its /usr/bin/cpp).
True 'nuff. Well, hey, nobody will force module developers to use
'check_header()' -- if it turns out to be indispensable, we'll figure
out how to do it portably; if not, it can wither and die.
Greg
--
Greg Ward - geek-at-large gward@python.net
http://starship.python.net/~gward/
I love ROCK 'N ROLL! I memorized the all WORDS to "WIPE-OUT" in 1965!!