mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Ensure that the C++ compiler used for testing actually works on a
simple test program; if not, skip the C++-related tests.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# @configure_input@ -*- shell-script -*-
|
||||
# Configurable variable values for Bison test suite.
|
||||
# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
# We need a C compiler.
|
||||
CC='@CC@'
|
||||
@@ -14,9 +14,12 @@ CPPFLAGS="-DHAVE_CONFIG_H=1 -I$abs_top_builddir @CPPFLAGS@"
|
||||
# Is the compiler GCC?
|
||||
GCC='@GCC@'
|
||||
|
||||
# The GCC C++ compiler.
|
||||
# The C++ compiler.
|
||||
CXX='@CXX@'
|
||||
|
||||
# If 'exit 77'; skip all C++ tests; otherwise ':'.
|
||||
BISON_CXX_WORKS='@BISON_CXX_WORKS@'
|
||||
|
||||
# We want no optimization with C++, too.
|
||||
CXXFLAGS='@O0CFLAGS@ @WARNING_CXXFLAGS@ @WERROR_CFLAGS@'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Process this -*- Autotest -*- file with autom4te.
|
||||
|
||||
# Macros for the GNU Bison Test suite.
|
||||
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -175,10 +175,10 @@ m4_define([AT_COMPILE],
|
||||
|
||||
# AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.c])
|
||||
# --------------------------------------------
|
||||
# If the C++ compiler is not defined, ignore the test.
|
||||
# If the C++ compiler does not work, ignore the test.
|
||||
m4_define([AT_COMPILE_CXX],
|
||||
[AT_KEYWORDS(c++)
|
||||
AT_CHECK([$CXX --version || exit 77], 0, ignore, ignore)
|
||||
AT_CHECK([$BISON_CXX_WORKS], 0, ignore, ignore)
|
||||
AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_default([$2], [$1.c]) -o $1],
|
||||
0, [ignore], [ignore])])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user