[geeks] autoconf
Greg A. Woods
woods at weird.com
Mon Apr 1 13:03:05 CST 2002
[ On Monday, April 1, 2002 at 12:07:13 (-0500), Dave McGuire wrote: ]
> Subject: [geeks] autoconf
>
> Has anyone here taken an existing program and converted it to use
> autoconf? If so, would someone be willing to give me a quick
> distilled overview of the procedure?
Several, but the canonical "small" examples I return to for
experimentation and learning new techniques have been the 'fingerd' and
'newsyslog' programs that I maintain. You can see the results here:
ftp://ftp.weird.com/pub/local/finger.tar.gz
ftp://ftp.weird.com/pub/local/newsyslog.tar.gz
The latter is the most recently updated and uses Autoconf 2.52 and the
former still uses a custom version of Autoconf I maintained for a while.
(it's primary special feature was better integration with CVS).
You'll find a "README.developers" file in there that gives hopefully
some idea of how to quickly start using the GNU Auto* tools to be able
to make changes to the files they process such as configure.in and
Makeifle.am and so on.
BTW, you really don't want to just use Autoconf alone -- you need to use
it with Automake. Autoconf alone is usable, but you'll end up
re-inventing a lot of makefile stuff, and you'll probably have to use a
more advanced, (but thus less widely available) version of make (such as
GNU Make) in order to keep all that new stuff managable. Meanwhile if
you read the introduction to Automake you'll learn why it doesn't just
build directly on GNU Automake features itself. Note that using
Automake as a developer requires using GNU Make, but the generated
makefile is usable just for building the project and installing it with
pretty much any unix-compatible make.
I find the Autoconf and Automake manuals are quite good and if you give
them both a quick read through after looking at an example of a project
using them, and then go back and look at the project again, you'll
probably have a pretty good overview of what's involved in using them.
Even if you don't intend to go all the way with following the GNU
standards for managing a project it's probably a good idea to read
through the standards.texi document anyway as the Auto* tools are geared
to making it easy to conform to those guidelines and it's a lot easier
to work with them if you understand the direction they're going in.
--
Greg A. Woods
+1 416 218-0098; <gwoods at acm.org>; <g.a.woods at ieee.org>; <woods at robohack.ca>
Planix, Inc. <woods at planix.com>; VE3TCP; Secrets of the Weird <woods at weird.com>
More information about the geeks
mailing list