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:
William S Fulton 2003-11-27 21:15:40 +00:00
commit a71d06f539

View file

@ -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*)