From e8c1bda0b5f3ed940797a01cf6988a298ab69bf8 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 2 Apr 2022 18:57:11 +0100 Subject: [PATCH] D compiler detection enhancements Detect LLVM D compiler ldmd2 or ldc2. Show D version. Note that dmd does not have an explicit command line option to show version. --- Examples/Makefile.in | 3 +-- configure.ac | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 1a27b32cd..d7b9a5bcf 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -1626,8 +1626,7 @@ d_run: # ----------------------------------------------------------------- d_version: - # Needs improvement! - echo D version guess - $(D_VERSION) + ($(DCOMPILER) --version 2> /dev/null || $(DCOMPILER)) | head -n 3 # ----------------------------------------------------------------- # Clean the D examples diff --git a/configure.ac b/configure.ac index 2afaf2275..360b2f440 100644 --- a/configure.ac +++ b/configure.ac @@ -2568,7 +2568,7 @@ _ACEOF fi if test -z "$D2COMPILERBIN" ; then - AC_CHECK_PROGS(D2COMPILER, dmd gdmd) + AC_CHECK_PROGS(D2COMPILER, dmd gdmd ldmd2 ldc2) if test -n "$D2COMPILER" ; then AC_MSG_CHECKING(whether the D2 compiler works)