From 15f9f8c85310577874a000bcb0b1773e4f23b8b3 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 29 Apr 2019 18:14:53 +0200 Subject: [PATCH] tests: don't require a D compiler Reported by Kiyoshi Kanazawa. http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00018.html * tests/atlocal.in (BISON_DC_WORKS): New. * tests/local.at (AT_COMPILE_D): Use it. --- tests/atlocal.in | 6 ++++++ tests/local.at | 1 + 2 files changed, 7 insertions(+) diff --git a/tests/atlocal.in b/tests/atlocal.in index f7db41e9..d8141cb9 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -118,8 +118,14 @@ fi ## Other. ## ## ------- ## +# Empty if no D compiler was found. : ${DC='@DC@'} : ${DCFLAGS='@DCFLAGS@'} +if test x"$DC" = x; then + BISON_DC_WORKS=false +else + BISON_DC_WORKS=true +fi # Empty if no javac was found : ${CONF_JAVAC='@CONF_JAVAC@'} diff --git a/tests/local.at b/tests/local.at index 1f55bedc..9c0e85e3 100644 --- a/tests/local.at +++ b/tests/local.at @@ -977,6 +977,7 @@ AT_CHECK(m4_join([ ], # with trailing ".o" removed, and ".cc" appended. m4_define([AT_COMPILE_D], [AT_KEYWORDS(d) +AT_SKIP_IF([[! $BISON_DC_WORKS]]) AT_CHECK(m4_join([ ], [$DC $DCFLAGS $3], [m4_bmatch([$1], [[.]], [-c])],