Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure.in or configure.ac?

It seems that some autoconf projects use a configure.in file to generate a configure script, and some use configure.ac.

What is the difference/advantage between using one or the other?

like image 642
freedrull Avatar asked Jan 27 '11 18:01

freedrull


People also ask

What is configure AC?

configure.ac (sometimes also named: configure.in) is an input file for autoconf. It contains tests that check for conditions that are likely to differ on different platforms. The tests are made by actually invoke autoconf macros.

What is DNL in configure AC?

In configure.ac, lines commented with '#' that occur after AC_INIT will appear in the resulting configure script. dnl comments will not. One purpose of dnl is to discard unwanted newlines in an effort to make the configure script readable.

What does a configure do?

The configure script is responsible for getting ready to build the software on your specific system. It makes sure all of the dependencies for the rest of the build and install process are available, and finds out whatever it needs to know to use those dependencies.

How does autoconf work?

Autoconf essentially runs the preprocessor on your script to produce a portable shell script which will perform all the requisite tests, produce handy log files, preprocess template files, for example to generate Makefile from Makefile.in and and take a standard set of command line arguments.


2 Answers

Its just a matter of style. Historically autoconf files were named configure.in. Now configure.ac is the preferred naming scheme. Its also discussed in the documentation.

like image 134
Mark Loeser Avatar answered Nov 06 '22 02:11

Mark Loeser


New projects should use configure.ac. Old projects used configure.in; if it is inconvenient to switch to the new name, they can continue to use it, but the autoconf tools will generate a warning.

like image 38
Jonathan Leffler Avatar answered Nov 06 '22 01:11

Jonathan Leffler