]>
Commit | Line | Data |
---|---|---|
1 | # Process this file with autoconf to produce a configure script. | |
2 | AC_PREREQ(2.52) | |
3 | AC_INIT(bison, 1.28a, bug-bison@gnu.org) | |
4 | AC_CONFIG_AUX_DIR(config) | |
5 | AM_INIT_AUTOMAKE(bison, 1.28a) | |
6 | AM_CONFIG_HEADER(config.h:config.hin) | |
7 | ||
8 | # Initialize the test suite. | |
9 | AT_CONFIG(../src) | |
10 | ||
11 | # Checks for programs. | |
12 | AC_PROG_CC | |
13 | AC_MINIX | |
14 | AC_ISC_POSIX | |
15 | AM_PROG_CC_STDC | |
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 | [enableval=no]) | |
31 | if test "${enableval}" = yes; then | |
32 | BISON_WARNING(-Wall) | |
33 | BISON_WARNING(-W) | |
34 | BISON_WARNING(-Wbad-function-cast) | |
35 | BISON_WARNING(-Wcast-align) | |
36 | BISON_WARNING(-Wcast-qual) | |
37 | BISON_WARNING(-Wmissing-declarations) | |
38 | BISON_WARNING(-Wmissing-prototypes) | |
39 | BISON_WARNING(-Wnested-externs) | |
40 | BISON_WARNING(-Wshadow) | |
41 | BISON_WARNING(-Wstrict-prototypes) | |
42 | BISON_WARNING(-Wwrite-strings) | |
43 | CFLAGS="$CFLAGS $WARNING_CFLAGS" | |
44 | fi | |
45 | ||
46 | # Checks for libraries. | |
47 | AC_DEFINE([_GNU_SOURCE],1,[Define to 1 for GNU C library extensions.]) | |
48 | ||
49 | # Checks for header files. | |
50 | AC_HEADER_STDC | |
51 | AC_CHECK_HEADERS(ctype.h locale.h memory.h stdlib.h string.h unistd.h) | |
52 | ||
53 | # Checks for typedefs. | |
54 | ||
55 | # Checks for structures. | |
56 | ||
57 | # Checks for compiler characteristics. | |
58 | AC_C_CONST | |
59 | AC_C_INLINE | |
60 | AM_C_PROTOTYPES | |
61 | ||
62 | # Checks for library functions. | |
63 | AC_FUNC_ALLOCA | |
64 | AC_CHECK_FUNCS(mkstemp setlocale) | |
65 | AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr]) | |
66 | AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr) | |
67 | jm_FUNC_MALLOC | |
68 | jm_FUNC_REALLOC | |
69 | jm_PREREQ_QUOTEARG | |
70 | jm_PREREQ_ERROR | |
71 | ||
72 | ALL_LINGUAS="de es et fr ja nl ru" | |
73 | AM_GNU_GETTEXT | |
74 | ||
75 | # This is necessary so that .o files in LIBOBJS are also built via | |
76 | # the ANSI2KNR-filtering rules. | |
77 | LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` | |
78 | AC_SUBST(LIBOBJS) | |
79 | ||
80 | AC_OUTPUT([Makefile | |
81 | config/Makefile | |
82 | intl/Makefile po/Makefile.in | |
83 | lib/Makefile src/Makefile doc/Makefile | |
84 | m4/Makefile | |
85 | tests/Makefile tests/atconfig]) |