Generating Files from Templates

Note that you can use AC_CONFIG_FILES to generate any text file from a file of the same name with an .in extension, found in the same directory. The .in extension is the default template naming pattern for AC_CONFIG_FILES, but you can override this default behavior. I'll get into the details shortly.

Autoconf generates sed or awk expressions into the resulting configure script, which then copies them into config.status. The config.status script uses these expressions to perform string replacement in the input template files.

Both sed and awk are text-processing tools that operate on file streams. The advantage of a stream editor (the name sed is a contraction of the phrase stream editor) is that it replaces text patterns ...

Get Autotools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.