> but when you write configure.ac to generate configure.in to generate configure to generate Makefile.in to generate Makefile to generate the final product ...
AFAIK, configure.ac is just the modern name for configure.in. You will not have both at the same time, and both are used to generate configure.
Usually, you do not use configure to generate Makefile.in. Instead, you use automake to generate Makefile.in from Makefile.am, and configure to generate Makefile from Makefile.in.
So, what you have is that you write configure.ac to generate configure, Makefile.am to generate Makefile.in, and configure and Makefile.in together generate Makefile. But that is simplifying things, there is also config.h.in to generate config.h together with configure, and some stamp.h.in/stamp-h thing.
Posted Aug 27, 2012 11:35 UTC (Mon) by pboddie (subscriber, #50784)
[Link]
I almost feel I could get some quick technical support here. People reading my other comments may get the impression that I really like autotools, but I spent the weekend updating OpenWrt packages that rely on the underlying build systems of projects that are mostly autotools systems, and there can be some weird things going on.
First of all, a lot of projects use automake which doesn't really lend itself to concise, easily diagnosable scripts - there's plenty of "where does the Makefile get *that* from?" and "do I really need a few hundred lines of settings for hello_world.c?" - and having written .in files by hand a while ago, I do get the feeling that people might just be taking something that works for someone else and stuffing it into a situation where it doesn't necessarily make sense. Here, I disagree with the author of the article: the "bazaar" may make such arguably inappropriate re-use easier since you can just search the Internet for something that works, but it isn't a precondition of "bazaar" development that you just copy stuff around.
Cross-compilation is always going to stress build systems, and I found cases of things wanting to run recently built or installed things to configure themselves (Gtk+, I think) as well as a particularly bizarre interaction with pkg-config producing build-time "staging" paths instead of "target" paths. I'm pretty sure that OpenWrt does some magic to make pkg-config do the right thing, but then some other inscrutable thing seems to be overriding it.
What I would probably conclude from much of this is that less is, more often than not, more: a more economically stated set of configuration resources would probably produce fewer surprises, especially outside the narrow mode of operation of the upstream developers.