While it is possible to simply copy the pyconfigure files from the src directory into your project's source directory and use them unmodified, it is recommended that you customize them to more appropriately fit your needs. In particular, you will want to customize configure.ac and Makefile.in. configure.ac contains a series of macros which are used by Autoconf to build a portable configure shell script. This script either guesses important system settings or is provided them by the user. When the user invokes configure, it uses Makefile.in as a template to create the Make recipe Makefile.
There are some minimum modifications that should be made. In
configure.ac you will see a macro called AC_INIT. You
should enter your project's name as the first argument to this macro,
its current version as the second argument and, optionally, an email
address in the third argument. These three values are used extensively
in the files modified by the configure script, so it is important that
you modify them.
You will probably also want to provide package metadata, which will be used by Python packaging-related tools. You can do that in two files: PKG-INFO.in and setup.py.in. setup.py.in provides a skeleton setup.py which should be sufficient for most packages. PKG-INFO is a file used in Python packaging to express package metadata and must be included in any source distribution of a package. You may also use it to register a project on PyPI (the Python Package Index; http://pypi.python.org). In both PKG-INFO.in and setup.py.in, you can see that some values will be automatically filled in by configure. You should fill in the rest yourself. See the Python distutils documentation for more information.
If you intend to produce source distributions via the Makefile,
which is more flexible than doing so via setup.py, it is
important to modify the DIST_FILES variable in
Makefile.in. Any file or directory you list there will be
included in your source distribution.
While the default configure script will likely be sufficient for a basic Python-based project, it may be made much more powerful for packages with more complex needs. To that end, several Autoconf macros are provided in the pyconfigure file src/m4/python.m4 to allow the developer to write robust tests See Autoconf macros. Note that when you distribute your software, you must include this directory and file with your distribution if you also distribute your configure.ac file.
Once you modify your configure.ac to your liking, you must regenerate your configure script with autoreconf:
$ autoreconf -fvi
A full explanation of the general use of Autoconf macros is beyond the scope of this document, however it is worth presenting some examples.