]> git.saurik.com Git - bison.git/blame - tests/atlocal.in
maint: update copyright years
[bison.git] / tests / atlocal.in
CommitLineData
342b8b6e
AD
1# @configure_input@ -*- shell-script -*-
2# Configurable variable values for Bison test suite.
3b2942e6 3
68f91d58 4# Copyright (C) 2000-2013 Free Software Foundation, Inc.
a34e8b24
AD
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/>.
342b8b6e 18
e85056ef
AD
19# We need `config.h'.
20CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
21
d4728d92
AD
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
e85056ef
AD
31## ------------------- ##
32## C/C++ Compilation. ##
33## ------------------- ##
34
8defe11b 35: ${CC='@CC@'}
e85056ef
AD
36: ${CXX='@CXX@'}
37
38# Is the compiler GCC?
39GCC='@GCC@'
f377f69f 40
d88cf117
JD
41# Sometimes a test group needs to ignore gcc warnings, so it locally
42# sets CFLAGS to this.
8f8439ce
AD
43 NO_WERROR_CFLAGS='@CFLAGS@ @WARN_CFLAGS@ @WARN_CFLAGS_TEST@'
44NO_WERROR_CXXFLAGS='@CXXFLAGS@ @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@'
d88cf117 45
e85056ef
AD
46# But most of the time, we want -Werror.
47 CFLAGS="$NO_WERROR_CFLAGS @WERROR_CFLAGS@"
48CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"
9d56d294 49
d4728d92
AD
50# If 'exit 77'; skip all C/C++ tests; otherwise ':'.
51BISON_C_WORKS='@BISON_C_WORKS@'
209ea708
PE
52BISON_CXX_WORKS='@BISON_CXX_WORKS@'
53
d4728d92
AD
54# Whether the compiler supports POSIXLY_CORRECT defined.
55: ${C_COMPILER_POSIXLY_CORRECT='@C_COMPILER_POSIXLY_CORRECT@'}
56: ${CXX_COMPILER_POSIXLY_CORRECT='@CXX_COMPILER_POSIXLY_CORRECT@'}
57
58if $POSIXLY_CORRECT_IS_EXPORTED; then
59 $C_COMPILER_POSIXLY_CORRECT ||
60 BISON_C_WORKS="as_fn_error 77 POSIXLY_CORRECT"
61 $CXX_COMPILER_POSIXLY_CORRECT ||
62 BISON_CXX_WORKS="as_fn_error 77 POSIXLY_CORRECT"
63fi
64
e85056ef
AD
65# Handle --compile-c-with-cxx here, once CXX and CXXFLAGS are known.
66if "$at_arg_compile_c_with_cxx"; then
0e98a81e 67 CC_IS_CXX=1
e85056ef 68 CC=$CXX
e85056ef
AD
69 NO_WERROR_CFLAGS=$NO_WERROR_CXXFLAGS
70 CFLAGS=$CXXFLAGS
d4728d92 71 BISON_C_WORKS=$BISON_CXX_WORKS
0e98a81e
AD
72else
73 CC_IS_CXX=0
e85056ef
AD
74fi
75
76
77## ------- ##
78## Other. ##
79## ------- ##
713535c2 80
8405b70c
PB
81# Empty if no javac was found
82CONF_JAVAC='@CONF_JAVAC@'
83
84# Empty if no Java VM was found
85CONF_JAVA='@CONF_JAVA@'
da730230 86
8defe11b
AD
87# We need egrep.
88: ${EGREP='@EGREP@'}
06e0e52c
AD
89
90# Use simple quotes (lib/quote.c).
91LC_CTYPE=C
92export LC_CTYPE
c955769a
AD
93
94# Are special link options needed?
95LDFLAGS='@LDFLAGS@'
96
97# Are special libraries needed?
98LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
99
100# Empty if no xsltproc was found
101: ${XSLTPROC='@XSLTPROC@'}
102
103: ${PERL='@PERL@'}