Diversions in Autoconf (actually, in M4sugar)

Have you ever wondered how Autoconf reorganizes certain parts of your script regardless of the order in which you invoke the macros in your configure.ac script? For example, how come you can define --with-* and --enable-* flags anywhere in your script and these are all magically moved to the option-processing section of the final shell script? After all, Autoconf is just a collection of M4 macros, and a macro preprocessor's only work is to expand macros in the input with predefined output texts.

September 6, 2011 · Tags: atf, autoconf, m4
Continue reading (about 3 minutes)