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