xref: /freebsd/contrib/byacc/configure.in (revision bc96366c864c07ef352edb92017357917c75b36c)
1dnl Process this file with 'autoconf' to produce a 'configure' script
2dnl $Id: configure.in,v 1.20 2014/10/06 22:39:39 tom Exp $
3AC_PREREQ(2.52.20011201)
4AC_REVISION($Revision: 1.20 $)
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
56
57AC_TYPE_MODE_T
58
59###	output makefile
60AC_OUTPUT(makefile)
61CF_MAKE_DOCS(yacc,1)
62