1 dnl FIXME: This should be soon obsoleted by AC_CHECK_DECL.
3 dnl See whether we need a declaration for a function.
4 dnl BISON_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
5 AC_DEFUN(BISON_NEED_DECLARATION,
6 [AC_MSG_CHECKING([whether $1 must be declared])
7 AC_CACHE_VAL(bison_cv_decl_needed_$1,
24 #define rindex strrchr
30 [char *(*pfn) = (char *(*)) $1],
31 eval "bison_cv_decl_needed_$1=no", eval "bison_cv_decl_needed_$1=yes")])
32 if eval "test \"`echo '$bison_cv_decl_needed_'$1`\" = yes"; then
34 bison_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
35 AC_DEFINE_UNQUOTED($bison_tr_decl)
41 dnl Check multiple functions to see whether each needs a declaration.
42 dnl BISON_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
43 AC_DEFUN(BISON_NEED_DECLARATIONS,
46 BISON_NEED_DECLARATION($ac_func, $2)