1 dnl BISON_DEFINE_FILE(VARNAME, FILE)
2 dnl Defines (with AC_DEFINE) VARNAME to the expansion of the FILE
3 dnl variable, expanding ${prefix} and such.
4 dnl Example: BISON_DEFINE_FILE(DATADIR, datadir)
5 dnl By Alexandre Oliva <oliva@dcc.unicamp.br>
6 AC_DEFUN(BISON_DEFINE_FILE, [
8 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
12 AC_DEFINE_UNQUOTED($1, "$ac_expanded")
15 dnl See whether we need a declaration for a function.
16 dnl BISON_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
17 AC_DEFUN(BISON_NEED_DECLARATION,
18 [AC_MSG_CHECKING([whether $1 must be declared])
19 AC_CACHE_VAL(bison_cv_decl_needed_$1,
36 #define rindex strrchr
42 [char *(*pfn) = (char *(*)) $1],
43 eval "bison_cv_decl_needed_$1=no", eval "bison_cv_decl_needed_$1=yes")])
44 if eval "test \"`echo '$bison_cv_decl_needed_'$1`\" = yes"; then
46 bison_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47 AC_DEFINE_UNQUOTED($bison_tr_decl)
53 dnl Check multiple functions to see whether each needs a declaration.
54 dnl BISON_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
55 AC_DEFUN(BISON_NEED_DECLARATIONS,
58 BISON_NEED_DECLARATION($ac_func, $2)