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