How often do I run autoconf?
autoconf, autotools, cdbs, debian
Solution
First, you're working too hard. Rather than running aclocal && autoheader && etc..., you can just run autoreconf. This will ensure that all the autotools are invoked in the correct order (and is easier on the fingers and the brain). Second, once you've generated the configure script, you should make a build directory and run 'make dist' to get a tarball that will be used to generate the deb. The tarball will have the configure script in it. (Better yet, just use the tarball generated by upstream and don't worry about running the autotools at all.)
Problem
In my company I'm currently working on creating a Debian `deb` package out of a 3rd party library. The library is built using Autotools. I have never worked with Autotools before and I'm having some hard time. Library sources contain `configure.in` and `Makefile.am` files and `m4/` directory. I am able to build the library using this sequence: ``` aclocal -I m4 -I /usr/share/aclocal autoheader libtoolize --automake automake -a autoconf ./configure make ``` In `debian/rules` file I'd like to use CDBS. I wrote this: ``` #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk ``` But it doesn't work. It complains that the `configure` file is missing. And that's right, because the Autotools class expects this file to be present. But it's not there and someone has to call `autoconf` and friends first! Why Autotools CDBS class doesn't let me call `autoconf` and friends? How do I circumvent it? A digression: When I use a program, I don't compile it every time, I compile it once and reuse the binary. When people install software, they don't compile it by themselves, maintainer compiles it once and people reuse the binary package. When maintainer compiles the package, he/she doesn't create `configure` script every time he compiles, the upstream author created it once and the maintainer can reuse it. Is that last sentence true? Because to me it seems like authors of the Autotools CDBS class assumed such thing - they assume `configure` to be present, and reuse it while compiling package for different architecture. Am I right? On one hand, if `configure` can be generated, it shouldn't be present anywhere - if you need it, you generated from other files. On the other hand, authors of the Autotools CDBS class must have had some reasons for implementing it this way and not the other. Summary: - How do I deal with the Autotools CDBS class problem described above? - How often do I regenerate `configure`? (In general and when building Debian packages.)