-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
A while back I told people that I find using autotools to be confusing. I've been looking at the documentation of the latest versions and have concluded that the reason I don't understand the documentation is because the documents are inconsistent, at least when used as references. Compare the following two excerpts:
This is from autoconf.info:
To encourage consistency, here is a suggested order for calling the Autoconf macros. Generally speaking, the things near the end of this list are those that could depend on things earlier in it. For example, library functions could be affected by types and libraries.
Autoconf requirements `AC_INIT(PACKAGE, VERSION, BUG-REPORT-ADDRESS)' information on the package checks for programs checks for libraries checks for header files checks for types checks for structures checks for compiler characteristics checks for library functions checks for system services `AC_CONFIG_FILES([FILE...])' `AC_OUTPUT'
This is from automake.info:
The first step is to update your `configure.ac' to include the commands that `automake' needs. The way to do this is to add an `AM_INIT_AUTOMAKE' call just after `AC_INIT':
AC_INIT(zardoz, 1.0) AM_INIT_AUTOMAKE
This is from a working autoconf.ac
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(src/main.cpp) AM_INIT_AUTOMAKE(rematrix, 1.0, email@example.com) AC_CONFIG_SRCDIR([src]) AC_CONFIG_HEADER([config.h])
# Checks for programs. AC_PROG_CXX AC_PROG_CC
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T
# Checks for library functions. AC_OUTPUT([Makefile src/Makefile])
The examples found in http://sources.redhat.com/autobook/ did not work (were out of date?) when I tried to use the book to get started. I'm now to the point where I can produce a basic gnu gnits build setup for simple programs, but it's been trial and error (as well as some very helpful guidance from people on this list).
Other than simply venting my frustrations, my purpose in posting this is to ask others how they would approach learning how to use these tools. Perhaps the answer is still the Goat Book. It seems a shame to see the book has not been maintained.
- -- Regards, Steven