File dmcs_net40_build.patch of Package mono-uia

diff -uprN mono-uia-2.1.old/build/common/Consts.cs.in mono-uia-2.1.new/build/common/Consts.cs.in
--- mono-uia-2.1.old/build/common/Consts.cs.in	2010-08-21 01:28:05.000000000 +0400
+++ mono-uia-2.1.new/build/common/Consts.cs.in	2015-05-05 02:57:30.994357064 +0300
@@ -49,8 +49,13 @@ internal
 	public const string MonoCompany = "MONO development team";
 	public const string MonoProduct = "MONO Common language infrastructure";
 	public const string MonoCopyright = "(c) various MONO Authors";
-
-#if NET_3_5
+#if NET_4_0
+	// Versions of .NET Framework 4.0
+	public const string FxVersion = "4.0.0.0";
+	public const string FxFileVersion = "4.0.30319.1";
+	public const string WinFileVersion = "6.0.6001.17014";
+	public const string VsVersion = "0.0.0.0"; // Useless ?
+#elif NET_3_5
 	// Versions of .NET Framework 3.5 RTM
 	public const string FxVersion = "3.5.0.0";
 	public const string FxFileVersion = "3.5.21022.8";
diff -uprN mono-uia-2.1.old/configure.ac mono-uia-2.1.new/configure.ac
--- mono-uia-2.1.old/configure.ac	2010-08-21 01:28:05.000000000 +0400
+++ mono-uia-2.1.new/configure.ac	2015-05-05 02:54:46.136882816 +0300
@@ -22,9 +22,9 @@ if test "x$MONO" = "xno"; then
 fi
 AC_SUBST(MONO)
 
-AC_PATH_PROG(GMCS, gmcs, no)
-if test "x$GMCS" = "xno"; then
-        AC_MSG_ERROR([gmcs Not found])
+AC_PATH_PROG(DMCS, dmcs, no)
+if test "x$DMCS" = "xno"; then
+        AC_MSG_ERROR([dmcs Not found])
 fi
 
 AC_PATH_PROG(GACUTIL, gacutil, no)
@@ -74,7 +74,7 @@ if test "x$nunit_247" = "xno"; then
 	AC_MSG_WARN([Could not find nunit >= 2.4.7; unit tests will not be available.])
 	enable_tests=no
 else
-	NUNIT_PATH=`pkg-config --variable=libdir mono-nunit`/mono/2.0/
+	NUNIT_PATH=`pkg-config --variable=libdir mono-nunit`/mono/4.0/
 fi
 
 AC_SUBST(NUNIT_PATH)
@@ -83,12 +83,13 @@ AM_CONDITIONAL(ENABLE_TESTS, test "x$ena
 
 dnl package checks, common for all configs
 
-PKG_CHECK_MODULES([MONO], [mono >= 2.0])
+PKG_CHECK_MODULES([MONO], [mono >= 3.0])
 if test "x$enable_winfxcore" = "xno"; then
-	if pkg-config --atleast-version=2.5 mono; then
-		SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+	if pkg-config --atleast-version=3.0 mono; then
+		_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(
+			4.0,
 			WindowsBase
-		])
+		)
 		WINDOWSBASE_LIBS=-r:WindowsBase
 		AC_SUBST(WINDOWSBASE_LIBS)
 		has_mono_2_5=yes
diff -uprN mono-uia-2.1.old/UIAutomationBridge/Makefile.am mono-uia-2.1.new/UIAutomationBridge/Makefile.am
--- mono-uia-2.1.old/UIAutomationBridge/Makefile.am	2015-05-05 02:24:50.540437764 +0300
+++ mono-uia-2.1.new/UIAutomationBridge/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,8 +1,8 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
-ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
+ASSEMBLY_COMPILER_COMMAND = dmcs
+ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/4.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_4_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
 
 ASSEMBLY = ../bin/UIAutomationBridge.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff -uprN mono-uia-2.1.old/UIAutomationClient/Makefile.am mono-uia-2.1.new/UIAutomationClient/Makefile.am
--- mono-uia-2.1.old/UIAutomationClient/Makefile.am	2015-05-05 02:24:50.540437764 +0300
+++ mono-uia-2.1.new/UIAutomationClient/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,8 +1,8 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
-ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
+ASSEMBLY_COMPILER_COMMAND = dmcs
+ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/4.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_4_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
 
 ASSEMBLY = ../bin/UIAutomationClient.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff -uprN mono-uia-2.1.old/UIAutomationClientTests/AtspiUiaClientTests/Makefile.am mono-uia-2.1.new/UIAutomationClientTests/AtspiUiaClientTests/Makefile.am
--- mono-uia-2.1.old/UIAutomationClientTests/AtspiUiaClientTests/Makefile.am	2010-08-21 01:28:05.000000000 +0400
+++ mono-uia-2.1.new/UIAutomationClientTests/AtspiUiaClientTests/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,7 +1,7 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_COMMAND = dmcs
 ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG"
 
 ASSEMBLY = bin/Debug/AtspiUiaClientTests.dll
diff -uprN mono-uia-2.1.old/UIAutomationClientTests/GtkForm/Makefile.am mono-uia-2.1.new/UIAutomationClientTests/GtkForm/Makefile.am
--- mono-uia-2.1.old/UIAutomationClientTests/GtkForm/Makefile.am	2010-08-21 01:28:05.000000000 +0400
+++ mono-uia-2.1.new/UIAutomationClientTests/GtkForm/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,7 +1,7 @@
 EXTRA_DIST =
 
 if ENABLE_DEBUG
-ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_COMMAND = dmcs
 ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG"
 
 ASSEMBLY = bin/Debug/GtkForm.exe
@@ -16,7 +16,7 @@ GTKFORM_EXE_MDB=$(BUILD_DIR)/GtkForm.exe
 endif
 
 if ENABLE_RELEASE
-ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_COMMAND = dmcs
 ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -keyfile:$(top_srcdir)/mono-uia.snk
 ASSEMBLY = bin/Release/GtkForm.exe
 ASSEMBLY_MDB = 
diff -uprN mono-uia-2.1.old/UIAutomationClientTests/SampleForm/Makefile.am mono-uia-2.1.new/UIAutomationClientTests/SampleForm/Makefile.am
--- mono-uia-2.1.old/UIAutomationClientTests/SampleForm/Makefile.am	2010-08-21 01:28:05.000000000 +0400
+++ mono-uia-2.1.new/UIAutomationClientTests/SampleForm/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,7 +1,7 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_COMMAND = dmcs
 ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
 ASSEMBLY = bin/Debug/SampleForm.exe
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff -uprN mono-uia-2.1.old/UIAutomationClientTests/UIAutomationClientTests/Makefile.am mono-uia-2.1.new/UIAutomationClientTests/UIAutomationClientTests/Makefile.am
--- mono-uia-2.1.old/UIAutomationClientTests/UIAutomationClientTests/Makefile.am	2010-08-21 01:28:05.000000000 +0400
+++ mono-uia-2.1.new/UIAutomationClientTests/UIAutomationClientTests/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,7 +1,7 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
+ASSEMBLY_COMPILER_COMMAND = dmcs
 ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
 ASSEMBLY = bin/Debug/UIAutomationClientTests.dll
 
diff -uprN mono-uia-2.1.old/UIAutomationProvider/Makefile.am mono-uia-2.1.new/UIAutomationProvider/Makefile.am
--- mono-uia-2.1.old/UIAutomationProvider/Makefile.am	2015-05-05 02:24:22.466696639 +0300
+++ mono-uia-2.1.new/UIAutomationProvider/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,8 +1,8 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
-ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
+ASSEMBLY_COMPILER_COMMAND = dmcs
+ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/4.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_4_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
 
 ASSEMBLY = ../bin/UIAutomationProvider.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff -uprN mono-uia-2.1.old/UIAutomationSource/Makefile.am mono-uia-2.1.new/UIAutomationSource/Makefile.am
--- mono-uia-2.1.old/UIAutomationSource/Makefile.am	2015-05-05 02:24:22.466696639 +0300
+++ mono-uia-2.1.new/UIAutomationSource/Makefile.am	2015-05-05 02:54:46.136882816 +0300
@@ -1,8 +1,8 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
-ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
+ASSEMBLY_COMPILER_COMMAND = dmcs
+ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/4.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_4_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
 
 ASSEMBLY = ../bin/UIAutomationSource.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff -uprN mono-uia-2.1.old/UIAutomationTypes/Makefile.am mono-uia-2.1.new/UIAutomationTypes/Makefile.am
--- mono-uia-2.1.old/UIAutomationTypes/Makefile.am	2015-05-05 02:24:22.467696630 +0300
+++ mono-uia-2.1.new/UIAutomationTypes/Makefile.am	2015-05-05 02:54:46.137882807 +0300
@@ -1,8 +1,8 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
-ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
+ASSEMBLY_COMPILER_COMMAND = dmcs
+ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/4.0 -lib:../bin -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_4_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
 
 ASSEMBLY = ../bin/UIAutomationTypes.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff -uprN mono-uia-2.1.old/WindowsBase/Makefile.am mono-uia-2.1.new/WindowsBase/Makefile.am
--- mono-uia-2.1.old/WindowsBase/Makefile.am	2015-05-05 02:24:22.467696630 +0300
+++ mono-uia-2.1.new/WindowsBase/Makefile.am	2015-05-05 02:54:46.137882807 +0300
@@ -1,8 +1,8 @@
 
 EXTRA_DIST =  
 
-ASSEMBLY_COMPILER_COMMAND = gmcs
-ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
+ASSEMBLY_COMPILER_COMMAND = dmcs
+ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/4.0 -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_4_0 -delaysign+ -keyfile:@abs_top_srcdir@/winfx3.pub
 
 ASSEMBLY = ../bin/WindowsBase.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb