]> git.saurik.com Git - bison.git/blame_incremental - tests/atlocal.in
tests: formatting changes
[bison.git] / tests / atlocal.in
... / ...
CommitLineData
1# @configure_input@ -*- shell-script -*-
2# Configurable variable values for Bison test suite.
3
4# Copyright (C) 2000-2013 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'.
20CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
21
22# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
23# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
24# the environment variable.
25if env | grep '^POSIXLY_CORRECT=' >/dev/null; then
26 POSIXLY_CORRECT_IS_EXPORTED=true
27else
28 POSIXLY_CORRECT_IS_EXPORTED=false
29fi
30
31## ------------------- ##
32## C/C++ Compilation. ##
33## ------------------- ##
34
35: ${CC='@CC@'}
36: ${CXX='@CXX@'}
37
38# Is the compiler GCC?
39GCC='@GCC@'
40
41# Sometimes a test group needs to ignore gcc warnings, so it locally
42# sets CFLAGS to this.
43 NO_WERROR_CFLAGS='@CFLAGS@ @WARN_CFLAGS@ @WARN_CFLAGS_TEST@'
44NO_WERROR_CXXFLAGS='@CXXFLAGS@ @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@'
45
46# But most of the time, we want -Werror.
47 CFLAGS="$NO_WERROR_CFLAGS @WERROR_CFLAGS@"
48CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"
49
50# C++ variants break strict aliasing analysis.
51NO_STRICT_ALIAS_CXXFLAGS='@NO_STRICT_ALIAS_CXXFLAGS@'
52
53# If 'exit 77'; skip all C++ tests; otherwise ':'.
54BISON_CXX_WORKS='@BISON_CXX_WORKS@'
55
56# Whether the compiler supports POSIXLY_CORRECT defined.
57: ${C_COMPILER_POSIXLY_CORRECT='@C_COMPILER_POSIXLY_CORRECT@'}
58: ${CXX_COMPILER_POSIXLY_CORRECT='@CXX_COMPILER_POSIXLY_CORRECT@'}
59
60if $POSIXLY_CORRECT_IS_EXPORTED; then
61 $C_COMPILER_POSIXLY_CORRECT ||
62 BISON_C_WORKS="as_fn_error 77 POSIXLY_CORRECT"
63 $CXX_COMPILER_POSIXLY_CORRECT ||
64 BISON_CXX_WORKS="as_fn_error 77 POSIXLY_CORRECT"
65fi
66
67# Handle --compile-c-with-cxx here, once CXX and CXXFLAGS are known.
68if "$at_arg_compile_c_with_cxx"; then
69 CC_IS_CXX=1
70 CC=$CXX
71 NO_WERROR_CFLAGS=$NO_WERROR_CXXFLAGS
72 CFLAGS=$CXXFLAGS
73 BISON_C_WORKS=$BISON_CXX_WORKS
74else
75 CC_IS_CXX=0
76fi
77
78
79## ------- ##
80## Other. ##
81## ------- ##
82
83# Empty if no javac was found
84CONF_JAVAC='@CONF_JAVAC@'
85
86# Empty if no Java VM was found
87CONF_JAVA='@CONF_JAVA@'
88
89# We need egrep and perl.
90: ${EGREP='@EGREP@'}
91: ${PERL='@PERL@'}
92
93# Use simple quotes (lib/quote.c).
94LC_CTYPE=C
95export LC_CTYPE
96
97# Are special link options needed?
98LDFLAGS='@LDFLAGS@'
99
100# Are special libraries needed?
101LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
102
103# Empty if no xsltproc was found
104: ${XSLTPROC='@XSLTPROC@'}
105
106# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
107# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
108# the environment variable.
109: ${C_COMPILER_POSIXLY_CORRECT='@C_COMPILER_POSIXLY_CORRECT@'}
110if env | grep '^POSIXLY_CORRECT=' >/dev/null; then
111 POSIXLY_CORRECT_IS_EXPORTED=true
112else
113 POSIXLY_CORRECT_IS_EXPORTED=false
114fi