From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aharon Robbins Message-Id: <200311160804.hAG84F7Y002284@skeeve.com> To: 9fans@cse.psu.edu Subject: [9fans] Re: configure misery Date: Sun, 16 Nov 2003 10:04:15 +0200 Topicbox-Message-UUID: 8ab04dfc-eacc-11e9-9e20-41e7f4b1d025 In article <81132473206F3A46A72BD6116E1A06AE479CA3@black.aprote.com>, Tiit Lankots <9fans@cse.psu.edu> wrote: >>Seeing as how this is grep, the + is NOT a metacharacter. Thus it's > >Not necessarily. GNU grep (by far the most widespread by now) is using >the 'extended' syntax where + IS a metacharacter. >IIRC, the configure-suite is assuming GNU tools. > >Tiit Incorrect. The whole point of configure is to make it possible to configure programs across the whole range of unix systems. Particularly for standard things like grep, the assumption is that GNU tools are NOT present. (Even there, I'm pretty sure that plain grep uses \+ to make + a metacharacter.) Autoconf requires GNU m4 to *generate* configure, but no non-standard tools are required to run the generated script. As for vitriol aimed at configure, come down from the Ivory Tower for a little bit, people. Consider what existed when it was first written in the late '80s and early '90s. A huge morass of different vendor systems with a vast swamp of hodge-podge features. The only way to know if you have a library function or kernel feature is to try to test for it; you can't rely on ifdefs. The Autoconf machinery abstracts *a lot* of this away, where you, the program author, don't have to deal with it. *Switching* a program to use Autoconf is a pain. But the gain is well worth it. I went through this with gawk in the mid-90s. Look at gawk-2.15.6 (if you can find it) with a bunch of little files for all the different kinds of systems out there. ALL of which had to be maintained MANUALLY. Now, I work with configure.ac and Makefile.am, which are fairly easy to manage once setup, and the rest of the headache is gone. POSIX has helped considerably, but it hasn't made Unix systems homogenous. Autoconf solved (and solves) a real problem (vendor Unix divergence) for those of us without the luxury of working under Plan 9 all day. And old systems (SunOS 4.x, Ultrix) *are* still in use. Sure configure itself is huge. It's object code though, not source code. And IMHO the Makefiles generated by Automake are too complicated. But would I switch back to doing things manually? No Way. FWIW, gawk ships as standard on every Linux system and most or all BSDs, and configures, compiles and runs out of the box on over a dozen different kinds of Unix systems. On all of them, ALL of them, the incantation is ONE LINE: ./configure && make all check install Compare that to: for each vendor Unix system I happen to have do while it doesn't make do vi myprog.h Makefile make done done And multiply that by all the different packages you'd like to install. Now tell me what you, the poor sysadmin, would rather spend your time doing? Flames to /dev/null. Arnold