xref: /netbsd/external/gpl2/xcvs/dist/m4/bison.m4 (revision 6550d01e)
1#serial 4
2
3# Copyright (C) 2002 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved.
7
8AC_DEFUN([gl_BISON],
9[dnl
10dnl All this cruft, which tries to fail harmlessly when bison is not present,
11dnl will no longer be necessary after we require an Automake release 1.10 or
12dnl later, as those avoid generating .c files from .y when not in maintainer
13dnl mode.  This is currently a fork from the GNULIB version of this file.
14  # expand $ac_aux_dir to an absolute path
15  am_aux_dir=`cd $ac_aux_dir && pwd`
16
17  # getdate.y works with bison only.
18  : ${YACC="\${SHELL} $am_aux_dir/bison-missing --run bison -y"}
19dnl
20dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB
21dnl requires an Autoconf greater than 2.59c, but it will probably still be
22dnl useful to override the description of YACC in the --help output, re
23dnl getdate.y assuming `bison -y'.
24  AC_ARG_VAR(YACC,
25[The `Yet Another C Compiler' implementation to use.  Defaults to `bison -y'.
26Values other than `bison -y' will most likely break on most systems.])dnl
27  AC_ARG_VAR(YFLAGS,
28[YFLAGS contains the list arguments that will be passed by default to Bison.
29This script will default YFLAGS to the empty string to avoid a default value of
30`-d' given by some make applications.])dnl
31])
32