xref: /freebsd/contrib/byacc/configure.in (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1dnl Process this file with 'autoconf' to produce a 'configure' script
2dnl $Id: configure.in,v 1.28 2023/02/02 00:14:51 tom Exp $
3AC_PREREQ(2.52.20200802)
4AC_REVISION($Revision: 1.28 $)
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_WITHOUT_X
19
20CF_XOPEN_SOURCE
21AC_CHECK_DECL(exit)
22
23AC_CHECK_HEADERS(fcntl.h)
24CF_MKSTEMP
25CF_GETOPT_HEADER
26AC_HAVE_FUNCS(getopt vsnprintf)
27
28AC_MSG_CHECKING(for maximum table size)
29AC_ARG_WITH([max-table-size],
30  [AC_HELP_STRING([--with-max-table-size=N],
31    [set the maximum table size = N (no default)])])
32if test -n "$with_max_table_size"
33then
34	AC_MSG_RESULT($with_max_table_size)
35	check=`expr "$with_max_table_size" + 0`
36	if test "x$check" != "x$with_max_table_size"
37	then
38		AC_MSG_ERROR([invalid value for --with-max-table-size: $with_max_table_size])
39	fi
40	AC_DEFINE_UNQUOTED(MAXTABLE,$with_max_table_size,[Define to maximum table size (default: 32500)])
41else
42	AC_MSG_RESULT(default)
43fi
44
45AC_MSG_CHECKING(if backtracking extension is wanted)
46CF_ARG_DISABLE([btyacc],
47  [AC_HELP_STRING([--disable-btyacc],
48     [disable support for the btyacc backtracking extension (default: enabled)])],
49	 [enable_btyacc=no],
50	 [enable_btyacc=yes])
51AC_MSG_RESULT($enable_btyacc)
52if test "$enable_btyacc" = "no"; then
53	SKELETON=yaccpar
54else
55	AC_DEFINE(YYBTYACC,1,[Define to 1 to enable backtracking extension])
56	SKELETON=btyaccpar
57fi
58AC_SUBST(SKELETON)
59
60CF_ENABLE_WARNINGS(Wwrite-strings,yes)
61CF_DISABLE_ECHO
62CF_DISABLE_LEAKS
63CF_WITH_MAN2HTML
64
65AC_TYPE_MODE_T
66
67###	output makefile
68AC_OUTPUT(makefile)
69CF_MAKE_DOCS(yacc,1)
70