Discussion:
Definition of AC_CHECK_FUNCS
Nikita Karetnikov
2016-04-06 23:19:54 UTC
Permalink
How can I dump the actual code that AC_CHECK_FUNCS expands to?
https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Generic-Functions.html
In other words, what exactly is used to determine whether a function is
available or not?

FWIW, I've tried running various commands from
https://www.gnu.org/software/m4/manual/m4-1.4.13/html_node/Debug-Levels.html
on lib/autoconf/functions.m4 to no avail.
Mathieu Lirzin
2016-04-07 07:16:45 UTC
Permalink
Hello,
Post by Nikita Karetnikov
How can I dump the actual code that AC_CHECK_FUNCS expands to?
https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Generic-Functions.html
In other words, what exactly is used to determine whether a function is
available or not?
Since the result is stored in the 'ac_cv_func_FUNCTION' variable, you
can search for it in the generated configure script. You will find
something like:

--8<---------------cut here---------------start------------->8---
ac_fn_c_check_func "$LINENO" "foo" "ac_cv_func_foo"
if test "x$ac_cv_func_foo" = xyes; then :
--8<---------------cut here---------------end--------------->8---

then, you can you check the shell function 'ac_fn_c_check_func ()' to see
the code snippet used.

Does it answer your question?
--
Mathieu Lirzin
Nikita Karetnikov
2016-04-07 23:50:08 UTC
Permalink
Post by Mathieu Lirzin
Does it answer your question?
Yes, it does perfectly. Thank you so much!

Loading...