1 dnl See whether we need a declaration for a function.
2 dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
3 AC_DEFUN([GCC_NEED_DECLARATION],
4 [AC_MSG_CHECKING([whether $1 must be declared])
5 AC_CACHE_VAL(gcc_cv_decl_needed_$1,
22 [char *(*pfn) = (char *(*)) $1],
23 eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")])
24 if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then
26 gcc_need_declarations="$gcc_need_declarations $1"
27 gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
28 AC_DEFINE_UNQUOTED($gcc_tr_decl)
34 dnl Check multiple functions to see whether each needs a declaration.
35 dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
36 AC_DEFUN([GCC_NEED_DECLARATIONS],
39 GCC_NEED_DECLARATION($ac_func, $2)