Merge lp:~evgeni/libappindicator/optional-mono into lp:libappindicator/12.10

Proposed by Evgeni Golov
Status: Merged
Approved by: Charles Kerr
Approved revision: 241
Merged at revision: 242
Proposed branch: lp:~evgeni/libappindicator/optional-mono
Merge into: lp:libappindicator/12.10
Diff against target: 102 lines (+23/-13)
2 files modified
bindings/Makefile.am (+4/-2)
configure.ac (+19/-11)
To merge this branch: bzr merge lp:~evgeni/libappindicator/optional-mono
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+109509@code.launchpad.net

Description of the change

there are archs (mips, mipsel, s390, hurd) which do not support mono,
let's build the mono buildings only when mono is available (and write a notice otherwise).
this allows non-mono apps to use libappindicator on non-mono archs.

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

Good patch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bindings/Makefile.am'
2--- bindings/Makefile.am 2011-02-03 15:22:06 +0000
3+++ bindings/Makefile.am 2012-06-10 07:47:19 +0000
4@@ -1,10 +1,12 @@
5 if USE_GTK3
6 SUBDIRS = \
7- mono \
8 vala
9 else
10 SUBDIRS = \
11- mono \
12 python \
13 vala
14 endif
15+
16+if HAS_MONO
17+SUBDIRS += mono
18+endif
19
20=== modified file 'configure.ac'
21--- configure.ac 2012-04-12 15:13:15 +0000
22+++ configure.ac 2012-06-10 07:47:19 +0000
23@@ -106,10 +106,11 @@
24
25 MONO_REQUIRED_VERSION=1.0
26 PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
27+AM_CONDITIONAL(HAS_MONO, [test "x$has_mono" = "xtrue"])
28
29 AC_PATH_PROG(AL, al, no)
30 if test "x$AL" = "xno" ; then
31- AC_MSG_ERROR([No al tool found. You need to install Mono.])
32+ AC_MSG_NOTICE([No al tool found. You need to install Mono.])
33 fi
34
35 if test "x$has_mono" = "xtrue" ; then
36@@ -126,12 +127,12 @@
37 fi
38
39 if test "x$CSC" = "xno" ; then
40- AC_MSG_ERROR([No Mono compiler found.])
41+ AC_MSG_NOTICE([No Mono compiler found.])
42 fi
43
44 AC_PATH_PROG(GACUTIL, gacutil, no)
45 if test "x$GACUTIL" = "xno" ; then
46- AC_MSG_ERROR([No gacutil tool found])
47+ AC_MSG_NOTICE([No gacutil tool found])
48 fi
49
50 AC_SUBST(RUNTIME)
51@@ -143,9 +144,9 @@
52
53 GLIB_SHARP_REQ_VERSION=2.12.1
54 GTK_SHARP_REQ_VERSION=2.12
55-PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION)
56+PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION, has_gtksharp=true, has_gtksharp=false)
57
58-PKG_CHECK_MODULES(GAPI, gapi-2.0 >= $GLIB_SHARP_REQ_VERSION)
59+PKG_CHECK_MODULES(GAPI, gapi-2.0 >= $GLIB_SHARP_REQ_VERSION, has_gapi=true, has_gapi=false)
60 AC_PATH_PROG(GAPI_PARSER, gapi2-parser, no)
61 AC_SUBST(GAPI_PARSER)
62 AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no)
63@@ -238,12 +239,6 @@
64 src/appindicator-0.1.pc
65 src/appindicator3-0.1.pc
66 bindings/Makefile
67-bindings/mono/Makefile
68-bindings/mono/appindicator-sharp.dll.config
69-bindings/mono/appindicator-sharp-0.1.pc
70-bindings/mono/app-indicator.sources.xml
71-bindings/mono/examples/Makefile
72-bindings/mono/examples/indicator-example
73 bindings/python/Makefile
74 bindings/python/appindicator.override
75 bindings/vala/Makefile
76@@ -255,6 +250,18 @@
77 docs/reference/version.xml
78 docs/reference/libappindicator-docs.sgml
79 ])
80+
81+if test "x$has_mono" = "xtrue" ; then
82+ AC_CONFIG_FILES([
83+ bindings/mono/Makefile
84+ bindings/mono/appindicator-sharp.dll.config
85+ bindings/mono/appindicator-sharp-0.1.pc
86+ bindings/mono/app-indicator.sources.xml
87+ bindings/mono/examples/Makefile
88+ bindings/mono/examples/indicator-example
89+ ])
90+fi
91+
92 AC_OUTPUT
93
94 ###########################
95@@ -267,6 +274,7 @@
96
97 Prefix: $prefix
98 GTK+ Version: $with_gtk
99+ Mono: $has_mono
100 Tests: $enable_tests
101 Mono tests: $have_nunit
102 gcov: $use_gcov

Subscribers

People subscribed via source and target branches