xref: /freebsd/contrib/byacc/configure.in (revision 8ef24a0d4b28fe230e20637f56869cc4148cd2ca)
1dnl Process this file with 'autoconf' to produce a 'configure' script
2dnl $Id: configure.in,v 1.21 2015/07/05 22:07:36 tom Exp $
3AC_PREREQ(2.52.20011201)
4AC_REVISION($Revision: 1.21 $)
5AC_INIT(main.c)
6AC_CONFIG_HEADER(config.h:config_h.in)
7
8CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
9
10AC_ARG_PROGRAM
11CF_PROG_CC
12AC_PROG_MAKE_SET
13AC_PROG_INSTALL
14CF_MAKE_TAGS
15CF_PROG_AWK
16CF_PROG_LINT
17
18CF_XOPEN_SOURCE
19AC_CHECK_HEADERS(fcntl.h)
20CF_MKSTEMP
21AC_HAVE_FUNCS(vsnprintf)
22
23AC_MSG_CHECKING(for maximum table size)
24AC_ARG_WITH([max-table-size],
25  [AC_HELP_STRING([--with-max-table-size=N],
26    [set the maximum table size = N (no default)])])
27if test -n "$with_max_table_size"
28then
29	AC_MSG_RESULT($with_max_table_size)
30	check=`expr "$with_max_table_size" + 0`
31	if test "x$check" != "x$with_max_table_size"
32	then
33		AC_MSG_ERROR([invalid value for --with-max-table-size: $with_max_table_size])
34	fi
35	AC_DEFINE_UNQUOTED(MAXTABLE,$with_max_table_size,[Define to maximum table size (default: 32500)])
36else
37	AC_MSG_RESULT(default)
38fi
39
40AC_MSG_CHECKING(if backtracking extension is wanted)
41AC_ARG_ENABLE([btyacc],
42  [AC_HELP_STRING([--enable-btyacc],
43     [turn on support for the btyacc backtracking extension (default: no)])])
44AC_MSG_RESULT($enable_btyacc)
45if test "$enable_btyacc" = "yes"; then
46	AC_DEFINE(YYBTYACC,1,[Define to 1 to enable backtracking extension])
47	SKELETON=btyaccpar
48else
49	SKELETON=yaccpar
50fi
51AC_SUBST(SKELETON)
52
53CF_WITH_WARNINGS(Wwrite-strings)
54CF_DISABLE_ECHO
55CF_DISABLE_LEAKS
56CF_WITH_MAN2HTML
57
58AC_TYPE_MODE_T
59
60###	output makefile
61AC_OUTPUT(makefile)
62CF_MAKE_DOCS(yacc,1)
63