Use new unified Mono mcs compiler if available under Unix

Do not prefer the old .NET 2 gmcs compiler, which was used even if the newer
.NET 4 mcs was available. This is recommended by Mono project, see
http://www.mono-project.com/docs/about-mono/languages/csharp/, and the .NET 1
original mcs is nowhere to be found nowadays.
This commit is contained in:
Vadim Zeitlin 2017-03-17 23:00:56 +01:00
commit 07d81cc1e9

View file

@ -2267,14 +2267,14 @@ else
if test -z "$CSHARPCOMPILERBIN" ; then
case $host in
*-*-cygwin* | *-*-mingw*)
# prefer Mono gmcs (.NET 2.0) over mcs (.NET 1.1) - note mcs-1.2.3 has major pinvoke bug
AC_CHECK_PROGS(CSHARPCOMPILER, csc mono-csc gmcs mcs cscc)
# prefer unified Mono mcs compiler (not to be confused with the ancient .NET 1 mcs) over older/alternative names.
AC_CHECK_PROGS(CSHARPCOMPILER, csc mcs mono-csc gmcs cscc)
if test -n "$CSHARPCOMPILER" && test "$CSHARPCOMPILER" = "csc" ; then
AC_MSG_CHECKING(whether csc is the Microsoft CSharp compiler)
csc 2>/dev/null | grep "C#" > /dev/null || CSHARPCOMPILER=""
if test -z "$CSHARPCOMPILER" ; then
AC_MSG_RESULT(no)
AC_CHECK_PROGS(CSHARPCOMPILER, mono-csc gmcs mcs cscc)
AC_CHECK_PROGS(CSHARPCOMPILER, mcs mono-csc gmcs cscc)
else
AC_MSG_RESULT(yes)
fi