You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2015/09/03 21:15:55 UTC

thrift git commit: THRIFT-3295 C# library does not build on Mono 4.0.2.5 or later Client: C# Patch: Nobuaki Sukegawa

Repository: thrift
Updated Branches:
  refs/heads/master 1f1c206b0 -> 96d80200c


THRIFT-3295 C# library does not build on Mono 4.0.2.5 or later
Client: C#
Patch: Nobuaki Sukegawa <ns...@gmail.com>

This closes #586


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/96d80200
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/96d80200
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/96d80200

Branch: refs/heads/master
Commit: 96d80200c5dae4fa95b8fa068c6a712773ec321b
Parents: 1f1c206
Author: Jens Geyer <je...@apache.org>
Authored: Thu Sep 3 21:14:30 2015 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Thu Sep 3 21:14:30 2015 +0200

----------------------------------------------------------------------
 configure.ac                           | 8 ++++++++
 lib/csharp/Makefile.am                 | 4 ++++
 lib/csharp/test/ThriftTest/Makefile.am | 4 ++++
 3 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/96d80200/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 71d6517..880cc32 100755
--- a/configure.ac
+++ b/configure.ac
@@ -198,6 +198,13 @@ AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "y
 
 AX_THRIFT_LIB(csharp, [C#], yes)
 if test "$with_csharp" = "yes";  then
+  PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
+  if test "$mono_2_11" == "yes"; then
+    AC_PATH_PROG([MCS], [mcs])
+    if test "x$MCS" != "x"; then
+      mono_mcs="yes"
+    fi
+  fi
   PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
   PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
   if test "$have_mono" = "yes" ; then
@@ -206,6 +213,7 @@ if test "$with_csharp" = "yes";  then
 fi
 AM_CONDITIONAL(WITH_MONO, [test "$have_csharp" = "yes"])
 AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"])
+AM_CONDITIONAL(MONO_MCS, [test "$mono_mcs" = "yes"])
 
 AX_THRIFT_LIB(java, [Java], yes)
 if test "$with_java" = "yes";  then

http://git-wip-us.apache.org/repos/asf/thrift/blob/96d80200/lib/csharp/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/csharp/Makefile.am b/lib/csharp/Makefile.am
index 2e2d7fe..611405d 100644
--- a/lib/csharp/Makefile.am
+++ b/lib/csharp/Makefile.am
@@ -69,7 +69,11 @@ THRIFTCODE= \
             src/TException.cs \
             src/TApplicationException.cs
 
+if MONO_MCS
+CSC=mcs
+else
 CSC=gmcs
+endif
 
 if NET_2_0
 MONO_DEFINES=/d:NET_2_0

http://git-wip-us.apache.org/repos/asf/thrift/blob/96d80200/lib/csharp/test/ThriftTest/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/csharp/test/ThriftTest/Makefile.am b/lib/csharp/test/ThriftTest/Makefile.am
index fcde6fc..7125c90 100644
--- a/lib/csharp/test/ThriftTest/Makefile.am
+++ b/lib/csharp/test/ThriftTest/Makefile.am
@@ -18,7 +18,11 @@
 #
 
 THRIFT = $(top_builddir)/compiler/cpp/thrift
+if MONO_MCS
+CSC=mcs
+else
 CSC=gmcs
+endif
 
 stubs: $(top_srcdir)/test/ThriftTest.thrift
 	$(THRIFT) --gen csharp -o . $(top_srcdir)/test/ThriftTest.thrift