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