From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200311170042.hAH0gTnM028044@math.Princeton.EDU> To: 9fans@cse.psu.edu Subject: Re: [9fans] Re: configure misery In-reply-to: <200311160804.hAG84F7Y002284@skeeve.com> References: <200311160804.hAG84F7Y002284@skeeve.com> From: John Stalker Date: Sun, 16 Nov 2003 19:42:29 -0500 Topicbox-Message-UUID: 8d0aa282-eacc-11e9-9e20-41e7f4b1d025 Gawk is an interesting test case. I poked around a little in the FreeBSD port. It doesn't just ./configure && make && make install. It has to pass two arguments to configure to tell it the location of libraries it wouldn't otherwise find. More worryingly it has to patch both Makefile.in and configure. In other words, some poor soul had to read and understand the ``object code'' generated by autoconf well enough to patch it. In this case it appears that autoconf has shifted some work from the program author to the port maintainer. I don't mean to flame either the developers of gawk, which I use, or of autoconf, which I don't. I do think autoconf was a great mistake, however. If you want a program which produces install scripts then there are two sensible paths: (1) write something quick and dirty which produces simple scripts which almost work on most systems or (2) write something which produces horrible monsters which no one need ever look at because they always work. Autoconf clearly aims for (2), but it doesn't quite get there. A program which opted for (1) would be more useful. Note that gawk has far fewer dependencies than some other programs. In fact the only library it needs which is not part of the base system is the gettext library, which is the one autconf doesn't find. > 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. . . . > 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 > -- John Stalker Department of Mathematics Princeton University (609)258-6469