1 AC_DEFUN([MOONLIGHT_CHECK_MONO],
3 MONO_REQUIRED_VERSION=2.0
4 MONO_REQUIRED_BROWSER_VERSION=2.5
6 MOON_ARG_ENABLED_BY_DEFAULT([browser-support], [Disable the browser plugin])
7 browser_support=$enableval
8 if test "x$browser_support" = xyes; then
9 MONO_REQUIRED_VERSION=$MONO_REQUIRED_BROWSER_VERSION
12 dnl path to mcs checkout
14 AC_ARG_WITH(mcspath, AC_HELP_STRING([--with-mcspath=<path>], []),
15 [], [with_mcspath=$srcdir/../mcs])
17 if test "x$with_mcspath" = "xno"; then
18 AC_ERROR(You need to set the path to mcs)
21 if test ! -d "$with_mcspath"; then
22 AC_ERROR(mcs_path doesn't exist)
25 MCS_PATH=$(cd "$with_mcspath" && pwd)
29 dnl path to mono-basic checkout
31 AC_ARG_WITH(mono_basic_path, AC_HELP_STRING([--with-mono-basic-path=<path>], []),
32 [], [with_mono_basic_path=$srcdir/../mono-basic])
34 if test "x$with_mono_basic_path" = "xno"; then
35 AC_MSG_WARN([You need to set the path to mono-basic to include Microsoft.VisualBasic.dll in your Moonlight install])
36 with_mono_basic_path="no"
38 if test ! -d "$with_mono_basic_path"; then
39 AC_MSG_WARN([The path to mono-basic does not exist, you need to set it to an existing directory to include Microsoft.VisualBasic.dll in your Moonlight install])
40 with_mono_basic_path="no"
44 if test "x$with_mono_basic_path" = "xno"; then
45 AM_CONDITIONAL([HAVE_MONO_BASIC], false)
47 MONO_BASIC_PATH=$(cd "$with_mono_basic_path" && pwd)
48 AC_SUBST(MONO_BASIC_PATH)
49 AM_CONDITIONAL([HAVE_MONO_BASIC], true)
52 AC_DEFINE([PLUGIN_SL_2_0], [1], [Enable Silverlight 2.0 support for the plugin])
54 AM_CONDITIONAL([HAVE_MONO_BASIC], false)
57 MOON_ARG_ENABLED_BY_DEFAULT([desktop-support], [Disable support for Moonlight-based desktop applications])
58 desktop_support=$enableval
59 if test "x$desktop_support" = xyes; then
60 PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0)
62 PKG_CHECK_MODULES(WNCKSHARP, wnck-sharp-1.0)
64 rsvg_sharp_pcs="rsvg-sharp-2.0 rsvg2-sharp-2.0"
65 for pc in $rsvg_sharp_pcs; do
66 PKG_CHECK_EXISTS($pc, [rsvg_sharp=$pc])
69 PKG_CHECK_MODULES(RSVGSHARP, $rsvg_sharp, [
70 RSVG_SHARP=$rsvg_sharp
72 AM_CONDITIONAL(HAVE_RSVG_SHARP, true)
74 AM_CONDITIONAL(HAVE_RSVG_SHARP, false)
77 AM_CONDITIONAL(HAVE_RSVG_SHARP, false)
80 if test "x$desktop_support" = xno -a "x$browser_support" = xno; then
81 AC_ERROR(You cannot disable both Browser and Desktop support)
84 PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED_VERSION)
86 PKG_CHECK_MODULES(MONO_EXTENDED, mono >= $MONO_REQUIRED_BROWSER_VERSION,
87 mono_extended=yes, mono_extended=no)
88 if test x$mono_extended = xyes; then
89 dnl the logistics for these defines might change in the future
90 dnl when 2.5+ becomes readily available and it turns out that
91 dnl we should always be disabling these features in the
92 dnl desktop-only scenario, but for now the 2.5 check is ok
94 AC_DEFINE([MONO_ENABLE_APP_DOMAIN_CONTROL], [1],
95 [Whether Mono 2.5 is available and Deployment should create/destroy App Domains])
97 AC_DEFINE([MONO_ENABLE_CORECLR_SECURITY], [1],
98 [Whether Mono 2.5 is available and CoreCLR security should be enabled])
101 AC_DEFINE([SL_2_0], [1], [Enable Silverlight 2.0 support in the runtime])
103 AM_CONDITIONAL(INCLUDE_MANAGED_CODE, true)
104 AM_CONDITIONAL(INCLUDE_BROWSER_MANAGED_CODE, test x$browser_support = xyes)
105 AM_CONDITIONAL(INCLUDE_DESKTOP_MANAGED_CODE, test x$desktop_support = xyes)
108 AC_SUBST([SL_PROFILE])