This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
/
mono.m4
112 lines (88 loc) · 3.18 KB
/
mono.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
AC_DEFUN([MOONLIGHT_CHECK_MONO],
[
MONO_REQUIRED_VERSION=2.0
MONO_REQUIRED_BROWSER_VERSION=2.5
AC_ARG_WITH([mcs-path],
[ --with-mcs-path=/path/to/mcs Specify an alternate mcs source tree],
[],
[with_mcs_path=$srcdir/../mono/mcs]
)
AC_ARG_WITH([mono-path],
[ --with-mono-path=/path/to/mono Specify an alternate mono source tree],
[],
[with_mono_path=$srcdir/../mono]
)
MOON_ARG_ENABLED_BY_DEFAULT([browser-support], [Disable the browser plugin])
browser_support=$enableval
if test "x$browser_support" = xyes; then
MONO_REQUIRED_VERSION=$MONO_REQUIRED_BROWSER_VERSION
if test ! -d "$with_mcs_path"; then
AC_ERROR($with_mcs_path doesn't exist)
fi
if test ! -d $with_mono_path; then
with_mono_path=$with_mcs_path/..
fi
MCS_PATH=$(cd "$with_mcs_path" && pwd)
AC_SUBST(MCS_PATH)
MONO_PATH=$(cd "$with_mono_path" && pwd)
AC_SUBST(MONO_PATH)
dnl
dnl path to mono-basic checkout
dnl
with_mono_basic_path=$srcdir/../mono-basic
if test ! -d "$with_mono_basic_path"; then
AC_ERROR($with_mono_basic_path doesn't exist)
fi
MONO_BASIC_PATH=$(cd "$with_mono_basic_path" && pwd)
AC_SUBST(MONO_BASIC_PATH)
AM_CONDITIONAL([HAVE_MONO_BASIC], true)
AC_DEFINE([PLUGIN_SL_2_0], [1], [Enable Silverlight 2.0 support for the plugin])
else
AM_CONDITIONAL([HAVE_MONO_BASIC], false)
fi
MOON_ARG_ENABLED_BY_DEFAULT([desktop-support], [Disable support for Moonlight-based desktop applications])
desktop_support=$enableval
if test "x$desktop_support" = xyes; then
PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0)
PKG_CHECK_MODULES(WNCKSHARP, wnck-sharp-1.0)
rsvg_sharp_pcs="rsvg-sharp-2.0 rsvg2-sharp-2.0"
for pc in $rsvg_sharp_pcs; do
PKG_CHECK_EXISTS($pc, [rsvg_sharp=$pc])
done
PKG_CHECK_MODULES(RSVGSHARP, $rsvg_sharp, [
RSVG_SHARP=$rsvg_sharp
AC_SUBST(RSVG_SHARP)
AM_CONDITIONAL(HAVE_RSVG_SHARP, true)
], [
AM_CONDITIONAL(HAVE_RSVG_SHARP, false)
])
else
AM_CONDITIONAL(HAVE_RSVG_SHARP, false)
fi
if test "x$desktop_support" = xno -a "x$browser_support" = xno; then
AC_ERROR(You cannot disable both Browser and Desktop support)
fi
MONO_CFLAGS=-I$MONO_PATH
AC_DEFINE([MONO_ENABLE_APP_DOMAIN_CONTROL], [1], [Whether Mono 2.5 is available and Deployment should create/destroy App Domains])
AC_DEFINE([MONO_ENABLE_CORECLR_SECURITY], [1], [Whether Mono 2.5 is available and CoreCLR security should be enabled])
AC_DEFINE([SL_2_0], [1], [Enable Silverlight 2.0 support in the runtime])
AM_CONDITIONAL(INCLUDE_MANAGED_CODE, true)
AM_CONDITIONAL(INCLUDE_BROWSER_MANAGED_CODE, test x$browser_support = xyes)
AM_CONDITIONAL(INCLUDE_DESKTOP_MANAGED_CODE, test x$desktop_support = xyes)
SL_PROFILE=3.0
AC_SUBST([SL_PROFILE])
dnl
dnl monodevelop sdk installation
dnl
MOON_ARG_ENABLED_BY_DEFAULT([sdk], [Disable installation of the monodevelop sdk])
enable_sdk=$enableval
if test "x$enable_sdk" = xyes -a "x$browser_support" = xno; then
enabled_sdk=no
sdk_reason="(SDK requires browser support)"
fi
if test "x$enable_sdk" = xyes -a "x$with_mono_basic_path" = "xno"; then
enabled_sdk=no
sdk_reason="(SDK requires mono-basic support)"
fi
AM_CONDITIONAL([INSTALL_MONODEVELOP_SDK],test x$enable_sdk = xyes)
])