Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does autoconf actually run for the AC_CHECK_FUNCS functionality [duplicate]

Tags:

c

autotools

Say in configure.ac I check for the availability of a C function, like

AC_CHECK_FUNCS( [arc4random] )

And later the configure process is positive on this function:

checking for arc4random... yes

What does the configure process actually run (say on a Linux system)? Does it construct a sample program and tries to compile it?

like image 728
ritter Avatar asked Mar 04 '14 21:03

ritter


1 Answers

It generates a test program that declares a function with the same name, then compiles and link it. Change a few characters in the name of the function (to make the test fail) and check config.log, you'll see the source code of the test program when it fails.

like image 129
DanielKO Avatar answered Oct 23 '22 14:10

DanielKO