]> git.saurik.com Git - bison.git/blob - configure.in
9e5da4c6ce278e9424e7f47f57a28a6e09351d6a
[bison.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.13)
3 AC_INIT(src/reduce.c)
4 AM_INIT_AUTOMAKE(bison, 1.28a)
5 AM_CONFIG_HEADER(config.h:config.hin)
6 AC_DEFINE_UNQUOTED(VERSION_STRING, "GNU Bison version ${VERSION}",
7 [The version string.])
8
9 ALL_LINGUAS="de es et fr ja nl ru"
10
11 dnl Checks for programs.
12 AC_PROG_CC
13 AC_MINIX
14 AC_ISC_POSIX
15 AM_PROG_CC_STDC
16 AC_PROG_INSTALL
17 AC_PROG_RANLIB
18
19 AC_ARG_ENABLE(gcc-warnings,
20 [ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
21 [case "${enableval}" in
22 yes|no) ;;
23 *) AC_MSG_ERROR([bad value ${enableval} for gcc-warnings option]) ;;
24 esac
25 ],
26 enableval=no
27 )
28 if test "${enableval}" = yes; then
29 BISON_WARNING(-Wall)
30 BISON_WARNING(-W)
31 BISON_WARNING(-Wbad-function-cast)
32 BISON_WARNING(-Wcast-align)
33 BISON_WARNING(-Wcast-qual)
34 BISON_WARNING(-Wmissing-declarations)
35 BISON_WARNING(-Wmissing-prototypes)
36 BISON_WARNING(-Wnested-externs)
37 BISON_WARNING(-Wno-char-subscripts)
38 BISON_WARNING(-Wstrict-prototypes)
39 BISON_WARNING(-Wwrite-strings)
40 fi
41
42 dnl Checks for libraries.
43
44 dnl Checks for header files.
45 AC_HEADER_STDC
46 AC_CHECK_HEADERS(ctype.h locale.h memory.h stdlib.h string.h unistd.h)
47
48 dnl Checks for typedefs.
49
50 dnl Checks for structures.
51
52 dnl Checks for compiler characteristics.
53 AC_C_CONST
54 AM_C_PROTOTYPES
55
56 dnl Checks for library functions.
57 AC_FUNC_ALLOCA
58 AC_CHECK_FUNCS(mkstemp setlocale)
59 BISON_NEED_DECLARATIONS(calloc realloc)
60
61 AM_GNU_GETTEXT
62 jm_PREREQ_ERROR
63
64 # This is necessary so that .o files in LIBOBJS are also built via
65 # the ANSI2KNR-filtering rules.
66 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
67 AC_SUBST(LIBOBJS)
68
69 AC_OUTPUT([Makefile
70 intl/Makefile po/Makefile.in
71 lib/Makefile src/Makefile doc/Makefile m4/Makefile])