I have observed that AC_FUNC_LINK_TRY(C), which serves as the guts of AC_CHECK_FUNCS, can inappropriately return "yes" for functions which are merely stubs when building with version 10.1 of Intel's C/C++ compiler (ICC) on x86_64-linux-gnu systems (and perhaps also other versions). AFAICT, the reason for this incorrect behavior is that its <limits.h> has truly minimal dependencies, such that no glibc header ever actually makes it in.
I have worked around this problem in the project that most concerns me by checking for ICC and temporarily adding -Wl,--fatal-warnings to LDFLAGS prior to invoking AC_CHECK_FUNCS. However, for a long-term fix, I would suggest explicitly checking for <gnu/stubs.h> and having AC_FUNC_LINK_TRY(C) generate code that directly #include-s it if available. Could you please look into the matter? Thanks! -- Aaron Ucko <ucko at ncbi>, NCBI C++ Toolkit core development group
