Fix for detecting mono with non-gnu sed (for Solaris)

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6531 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-10-27 20:40:41 +00:00
commit 8bd857fcc7

View file

@ -1341,15 +1341,18 @@ if test -z "$CSHARPBIN" ; 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`
csharp_version_searched=`(mcs --version | sed -e "/C#/b" -e "/Mono/b" -e d) 2>/dev/null` # return string if contains 'Mono' or 'C#'
CSHARPCOMPILER="";
if test -n "$csharp_version_raw" ; then
if test "$csharp_version_raw" = "$csharp_version_searched" ; then
CSHARPCOMPILER="mcs"
fi
fi
AC_CHECK_PROGS(CSHARPCILINTERPRETER, mono) # Mono JIT
if test "mcs" = "$CSHARPCOMPILER" ; then
AC_CHECK_PROGS(CSHARPCILINTERPRETER, mono) # Mono JIT
else
echo "mcs is not the Mono C# compiler"
fi
else
if test "csc" = "$CSHARPCOMPILER"; then
CSHARPPATHSEPARATOR="\\\\"