JohnTortugo
JohnTortugo

Reputation: 6625

Can configure generate .h files?

On Linux, when I execute ./configure it generates header files and also .c files (besides Makefiles), right? How can I get configure to do that?

Upvotes: 1

Views: 552

Answers (2)

dbrank0
dbrank0

Reputation: 9476

It's typically used to generate config header, that contains various defines (often libraries & function present or not). But this happens only if autotools were instructed to create configure doing that.

You define what goes to (and to which header exactly) in configure.ac (input file to autotools). See AC_CONFIG_HEADERS, AC_CHECK_HEADER, AC_CHECK_LIB and similar macros. See autoconf manual for details. Also read through complete tutorial jasonw linked. And see how things are done in some existing projects.

Upvotes: 2

Jasonw
Jasonw

Reputation: 5064

You will probably want to create a configure.ac (but depend on the autoconf version), but read here, to give you an idea what should you create and what is auto generated. It has good covered on the autotools topic.

Upvotes: 3

Related Questions