Check that mcs is the mono C# compiler. Avoids falsely detecting mcs as another Unix utility
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5428 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f5ea428d8d
commit
a71d06f539
1 changed files with 11 additions and 0 deletions
|
|
@ -1296,6 +1296,17 @@ if test -z "$CSHARPBIN" ; then
|
|||
AC_CHECK_PROGS(CSHARPCILINTERPRETER, ilrun)
|
||||
else
|
||||
if test "mcs" = "$CSHARPCOMPILER"; then
|
||||
# Check that mcs is the C# compiler and not the Unix mcs utility by examining the output of 'mcs --version'
|
||||
# The Mono compiler should emit: Mono C# compiler version a.b.c.d
|
||||
csharp_version_raw=`(mcs --version) 2>/dev/null`
|
||||
csharp_version_searched=`(mcs --version | sed -n "/C#\|Mono/p") 2>/dev/null`
|
||||
CSHARPCOMPILER="";
|
||||
if test -n "$csharp_version_raw" ; then
|
||||
if test "$csharp_version_raw" = "$csharp_version_searched" ; then
|
||||
CSHARPCOMPILER="mcs"
|
||||
fi
|
||||
fi
|
||||
|
||||
# mono interpreter (ver 0.26 doesn't seem to work on Windows platforms)
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue