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.
This commit is contained in:
Akim Demaille
2019-04-29 18:14:53 +02:00
parent 04676a5085
commit 15f9f8c853
2 changed files with 7 additions and 0 deletions

View File

@@ -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@'}

View File

@@ -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])],