]> git.saurik.com Git - bison.git/blob - tests/atlocal.in
Merge branch 'maint'
[bison.git] / tests / atlocal.in
1 # @configure_input@ -*- shell-script -*-
2 # Configurable variable values for Bison test suite.
3
4 # Copyright (C) 2000-2012 Free Software Foundation, Inc.
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 # We need `config.h'.
20 CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
21
22 ## ------------------- ##
23 ## C/C++ Compilation. ##
24 ## ------------------- ##
25
26 : ${CC='@CC@'}
27 : ${CXX='@CXX@'}
28
29 # Is the compiler GCC?
30 GCC='@GCC@'
31
32 # We want no optimization, as they uncover warnings (therefore,
33 # failures) about uninitialized variables in the test suite. FIXME:
34 # fix the warnings, not the flags.
35 O0CFLAGS=`echo '@CFLAGS@' | sed 's/-O[0-9s] *//g'`
36 O0CXXFLAGS=`echo '@CXXFLAGS@' | sed 's/-O[0-9s] *//g'`
37
38 # Sometimes a test group needs to ignore gcc warnings, so it locally
39 # sets CFLAGS to this.
40 NO_WERROR_CFLAGS="$O0CFLAGS @WARN_CFLAGS@ @WARN_CFLAGS_TEST@"
41 NO_WERROR_CXXFLAGS="$O0CXXFLAGS @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@"
42
43 # But most of the time, we want -Werror.
44 CFLAGS="$NO_WERROR_CFLAGS @WERROR_CFLAGS@"
45 CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"
46
47 # If 'exit 77'; skip all C++ tests; otherwise ':'.
48 BISON_CXX_WORKS='@BISON_CXX_WORKS@'
49
50 # Handle --compile-c-with-cxx here, once CXX and CXXFLAGS are known.
51 if "$at_arg_compile_c_with_cxx"; then
52 CC_IS_CXX=1
53 CC=$CXX
54 O0CFLAGS=$O0CXXFLAGS
55 NO_WERROR_CFLAGS=$NO_WERROR_CXXFLAGS
56 CFLAGS=$CXXFLAGS
57 else
58 CC_IS_CXX=0
59 fi
60
61
62 ## ------- ##
63 ## Other. ##
64 ## ------- ##
65
66 # Are special link options needed?
67 LDFLAGS='@LDFLAGS@'
68
69 # Are special libraries needed?
70 LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
71
72 # Empty if no javac was found
73 CONF_JAVAC='@CONF_JAVAC@'
74
75 # Empty if no Java VM was found
76 CONF_JAVA='@CONF_JAVA@'
77
78 # Empty if no xsltproc was found
79 : ${XSLTPROC='@XSLTPROC@'}
80
81 # We need egrep and perl.
82 : ${EGREP='@EGREP@'}
83 : ${PERL='@PERL@'}
84
85 # Use simple quotes (lib/quote.c).
86 LC_CTYPE=C
87 export LC_CTYPE
88
89
90 # Handle --compile-c-with-cxx here, once CXX and CXXFLAGS are known.
91 if "$at_arg_compile_c_with_cxx"; then
92 CC=$CXX
93 CFLAGS=$CXXFLAGS
94 fi