diff options
author | Jens Geyer <jensg@apache.org> | 2015-09-03 21:14:30 +0200 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2015-09-03 21:14:30 +0200 |
commit | 96d80200c5dae4fa95b8fa068c6a712773ec321b (patch) | |
tree | be6651f34dada6a3d426885d3cd112bf843d80ec | |
parent | 1f1c206b08323111d7e9dd06321846339ca8f5b0 (diff) | |
download | thrift-96d80200c5dae4fa95b8fa068c6a712773ec321b.tar.gz |
THRIFT-3295 C# library does not build on Mono 4.0.2.5 or later
Client: C#
Patch: Nobuaki Sukegawa <nsukeg@gmail.com>
This closes #586
-rwxr-xr-x | configure.ac | 8 | ||||
-rw-r--r-- | lib/csharp/Makefile.am | 4 | ||||
-rw-r--r-- | lib/csharp/test/ThriftTest/Makefile.am | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 71d651708..880cc3225 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 diff --git a/lib/csharp/Makefile.am b/lib/csharp/Makefile.am index 2e2d7fe94..611405d91 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 diff --git a/lib/csharp/test/ThriftTest/Makefile.am b/lib/csharp/test/ThriftTest/Makefile.am index fcde6fc93..7125c9055 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 |