mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
tests: allow to override variables with envvars
* tests/atlocal.in: Allow the user to change interesting variables (CFLAGS, CXXFLAGS, etc.).
This commit is contained in:
@@ -36,26 +36,26 @@ fi
|
|||||||
: ${CXX='@CXX@'}
|
: ${CXX='@CXX@'}
|
||||||
|
|
||||||
# Is the compiler GCC?
|
# Is the compiler GCC?
|
||||||
GCC='@GCC@'
|
: ${GCC='@GCC@'}
|
||||||
|
|
||||||
# Sometimes a test group needs to ignore gcc warnings, so it locally
|
# Sometimes a test group needs to ignore gcc warnings, so it locally
|
||||||
# sets CFLAGS to this.
|
# sets CFLAGS to this.
|
||||||
NO_WERROR_CFLAGS='@CFLAGS@ @WARN_CFLAGS@ @WARN_CFLAGS_TEST@'
|
: ${NO_WERROR_CFLAGS='@CFLAGS@ @WARN_CFLAGS@ @WARN_CFLAGS_TEST@'}
|
||||||
NO_WERROR_CXXFLAGS='@CXXFLAGS@ @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@'
|
: ${NO_WERROR_CXXFLAGS='@CXXFLAGS@ @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@'}
|
||||||
WNO_DEPRECATED_CXXFLAGS='@WNO_DEPRECATED_CXXFLAGS@'
|
: ${WNO_DEPRECATED_CXXFLAGS='@WNO_DEPRECATED_CXXFLAGS@'}
|
||||||
|
|
||||||
# But most of the time, we want -Werror.
|
# But most of the time, we want -Werror.
|
||||||
CFLAGS="$NO_WERROR_CFLAGS @WERROR_CFLAGS@"
|
: ${CFLAGS="$NO_WERROR_CFLAGS @WERROR_CFLAGS@"}
|
||||||
CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"
|
: ${CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"}
|
||||||
|
|
||||||
# If 'exit 77'; skip all C++ tests; otherwise ':'.
|
# If 'exit 77'; skip all C++ tests; otherwise ':'.
|
||||||
BISON_CXX_WORKS='@BISON_CXX_WORKS@'
|
: ${BISON_CXX_WORKS='@BISON_CXX_WORKS@'}
|
||||||
|
|
||||||
# Compiler flags to disable exception support.
|
# Compiler flags to disable exception support.
|
||||||
NO_EXCEPTIONS_CXXFLAGS='@NO_EXCEPTIONS_CXXFLAGS@'
|
: ${NO_EXCEPTIONS_CXXFLAGS='@NO_EXCEPTIONS_CXXFLAGS@'}
|
||||||
|
|
||||||
# Requiring a specific C++ standard.
|
# Requiring a specific C++ standard.
|
||||||
CXX11_CXXFLAGS='@CXX11_CXXFLAGS@'
|
: ${CXX11_CXXFLAGS='@CXX11_CXXFLAGS@'}
|
||||||
|
|
||||||
# Be sure that the C++ compiler is not broken because of gnulib. This
|
# Be sure that the C++ compiler is not broken because of gnulib. This
|
||||||
# cannot be checked in configure (gnulib is not parameterized yet),
|
# cannot be checked in configure (gnulib is not parameterized yet),
|
||||||
@@ -115,10 +115,10 @@ fi
|
|||||||
## ------- ##
|
## ------- ##
|
||||||
|
|
||||||
# Empty if no javac was found
|
# Empty if no javac was found
|
||||||
CONF_JAVAC='@CONF_JAVAC@'
|
: ${CONF_JAVAC='@CONF_JAVAC@'}
|
||||||
|
|
||||||
# Empty if no Java VM was found
|
# Empty if no Java VM was found
|
||||||
CONF_JAVA='@CONF_JAVA@'
|
: ${CONF_JAVA='@CONF_JAVA@'}
|
||||||
|
|
||||||
# We need egrep and perl.
|
# We need egrep and perl.
|
||||||
: ${EGREP='@EGREP@'}
|
: ${EGREP='@EGREP@'}
|
||||||
@@ -129,10 +129,10 @@ LC_CTYPE=C
|
|||||||
export LC_CTYPE
|
export LC_CTYPE
|
||||||
|
|
||||||
# Are special link options needed?
|
# Are special link options needed?
|
||||||
LDFLAGS='@LDFLAGS@'
|
: ${LDFLAGS='@LDFLAGS@'}
|
||||||
|
|
||||||
# Are special libraries needed?
|
# Are special libraries needed?
|
||||||
LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
|
: ${LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"}
|
||||||
|
|
||||||
# Empty if no xsltproc was found
|
# Empty if no xsltproc was found
|
||||||
: ${XSLTPROC='@XSLTPROC@'}
|
: ${XSLTPROC='@XSLTPROC@'}
|
||||||
|
|||||||
Reference in New Issue
Block a user