Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should a "configure" script be distributed if configure.ac is available?

Tags:

autoconf

Currently, our installation instructions are:

autoreconf -fi
./configure
...

The autoreconf step generates the configure file from configure.ac and Makefile.in from Makefile.in. If one of the dependencies (say pkg-config) is not installed, both configure and autoreconf fail although the latter prints a cryptic error message.

When releasing source tarballs, should the configure script be supplied in the package or not? What other files need to be included if it has to be distributed? The directories build-aux and autom4te.cache and files aclocal.m4 were also created.

like image 510
Lekensteyn Avatar asked Jan 14 '12 20:01

Lekensteyn


3 Answers

In an SCM repository, nothing autogenerated should be present (including configure — but developer opinions digress here). A tarball should contain the state after autoreconf -fi and/or autogen.sh (or whichever name you chose for it). Third, you could also use make dist, though it requires that all files that shall appear in the tarball are also listed in the Makefiles.

like image 165
jørgensen Avatar answered Nov 13 '22 14:11

jørgensen


Your installation instructions are horribly broken. The user should not need to have the autotool chain installed to build your software. You must distribute the configure script in your tarball. Note that you should not include the configure script in your version control system. (You should not use your version control system as a distribution system.)

like image 44
William Pursell Avatar answered Nov 13 '22 13:11

William Pursell


The configure script should be built by the maintainer and distributed in the tarball. End users should never have to touch it, and it is a good idea to ensure this via AM_MAINTAINER_MODE if you are using automake. If not, make sure your Makefile.in doesn't re-generate configure when running for end users.

Let automake generate a distribution for you if you want to know what else belongs there. The auxiliary directory build-aux and aclocal.m4 do, automat4e.cache doesn't.

like image 41
thiton Avatar answered Nov 13 '22 15:11

thiton