[m-rev.] diff: fix configure .NET library version test on non-Windows systems

Julien Fischer jfischer at opturion.com
Tue May 7 13:26:04 AEST 2013


Fix configure's .NET library version test.

m4/mercury.m4:
Check for a CLI interpreter *before* working out what
C# compiler to use.
 If we have a CLI interpreter, then use that to run the
test program we build for determining the .NET library version.
(Previously, we just tried to execute the .exe directly and this
didn't work on non-Windows systems.)

Delete an unused variable.

Julien.

diff --git a/m4/mercury.m4 b/m4/mercury.m4
index 2435bc1..19cb0af 100644
--- a/m4/mercury.m4
+++ b/m4/mercury.m4
@@ -247,6 +247,14 @@ AC_MSG_RESULT([$mercury_cv_microsoft_dotnet])
 ILASM=`basename "$ILASM"`
 GACUTIL=`basename "$GACUTIL"`

+# Check for the assembly linker.
+# ilalink is the DotGNU assembly linker.
+AC_PATH_PROGS([MS_AL], [al ilalink])
+MS_AL=`basename "$MS_AL"`
+
+# Check for an implementation of the Common Language Infrastructure.
+AC_PATH_PROGS([CLI_INTERPRETER], [mono])
+
 # Check for the C# (C sharp) compiler.
 # mcs is the Mono C# compiler targetting all runtimes
 # dmcs is the Mono C# compiler targeting the 4.0 runtime
@@ -324,7 +332,7 @@ EOF
  if
  echo $CSC conftest.cs >&AC_FD_CC 2>&1 && \
  $CSC conftest.cs  >&AC_FD_CC 2>&1 && \
- ./conftest > conftest.out 2>&1
+ $CLI_INTERPRETER ./conftest.exe > conftest.out 2>&1
  then
  mercury_cv_microsoft_dotnet_library_version=`cat conftest.out`
  AC_MSG_RESULT([$mercury_cv_microsoft_dotnet_library_version])
@@ -341,15 +349,6 @@ EOF
 fi
 MS_DOTNET_LIBRARY_VERSION=$mercury_cv_microsoft_dotnet_library_version

-# Check for the assembly linker.
-# ilalink is the DotGNU assembly linker.
-AC_PATH_PROGS([MS_AL], [al ilalink])
-MS_AL=`basename "$MS_AL"`
-
-# Check for an implementation of the Common Language Infrastructure.
-AC_PATH_PROGS([CLI_INTERPRETER], [mono])
-MONO=`basename "$CLI_INTERPRETER"`
-
 AC_SUBST([ILASM])
 AC_SUBST([GACUTIL])
 AC_SUBST([CSC])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20130507/9ad375b2/attachment.html>


More information about the reviews mailing list