← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~sargentd/libindicate/opional-mono into lp:libindicate

 

Evgeni Golov has proposed merging lp:~sargentd/libindicate/opional-mono into lp:libindicate.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)

For more details, see:
https://code.launchpad.net/~sargentd/libindicate/opional-mono/+merge/73989

Sometimes, one wants to build libindicate w/o Mono bindings, like on Sparc, where there is just no mono at all.
This branch makes it possible (and is used in debian for quite some time)
-- 
https://code.launchpad.net/~sargentd/libindicate/opional-mono/+merge/73989
Your team ayatana-commits is subscribed to branch lp:libindicate.
=== modified file 'bindings/Makefile.am'
--- bindings/Makefile.am	2010-06-02 16:19:59 +0000
+++ bindings/Makefile.am	2011-09-04 09:48:26 +0000
@@ -1,1 +1,5 @@
-SUBDIRS = mono python
+SUBDIRS = python
+
+if HAS_MONO
+SUBDIRS += mono
+endif

=== modified file 'configure.ac'
--- configure.ac	2011-09-03 04:34:54 +0000
+++ configure.ac	2011-09-04 09:48:26 +0000
@@ -132,7 +132,7 @@
 
 AC_PATH_PROG(AL, al, no)
 if test "x$AL" = "xno" ; then
-   AC_MSG_ERROR([No al tool found.  You need to install Mono.])
+   AC_MSG_NOTICE([No al tool found.  You need to install Mono.])
 fi
 
 if test "x$has_mono" = "xtrue" ; then
@@ -149,12 +149,12 @@
 fi
 
 if test "x$CSC" = "xno" ; then
-   AC_MSG_ERROR([No Mono compiler found.])
+   AC_MSG_NOTICE([No Mono compiler found.])
 fi
 
 AC_PATH_PROG(GACUTIL, gacutil, no)
 if test "x$GACUTIL" = "xno" ; then
-   AC_MSG_ERROR([No gacutil tool found])
+   AC_MSG_NOTICE([No gacutil tool found])
 fi
 
 AC_SUBST(RUNTIME)
@@ -166,11 +166,11 @@
 
 GLIB_SHARP_REQ_VERSION=2.12.1
 GTK_SHARP_REQ_VERSION=2.12
-PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION)
+PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION, has_gtksharp=true, has_gtksharp=false)
 AC_SUBST(GTK_SHARP_LIBS)
 AC_SUBST(GTK_SHARP_CFLAGS)
 
-PKG_CHECK_MODULES(GAPI, gapi-2.0 >= $GLIB_SHARP_REQ_VERSION)
+PKG_CHECK_MODULES(GAPI, gapi-2.0 >= $GLIB_SHARP_REQ_VERSION, has_gapi=true, has_gapi=false)
 AC_PATH_PROG(GAPI_PARSER, gapi2-parser, no)
 AC_SUBST(GAPI_PARSER)
 AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no)
@@ -265,7 +265,9 @@
 # Files
 ###########################
 
-AC_OUTPUT([
+AM_CONDITIONAL([HAS_MONO], [test "x$has_mono" = "xtrue"])
+
+AC_CONFIG_FILES([
 Makefile
 libindicate/Makefile
 libindicate/indicate-0.6.pc
@@ -273,24 +275,31 @@
 libindicate-gtk/indicate-gtk-0.6.pc
 libindicate-gtk/indicate-gtk3-0.6.pc
 examples/Makefile
-examples/indicator-mono-example
 tests/Makefile
 docs/Makefile
 docs/reference/Makefile
 docs/reference/version.xml
 bindings/Makefile
 bindings/python/Makefile
-bindings/mono/Makefile
-bindings/mono/indicate/Makefile
-bindings/mono/indicate/indicate-sharp.dll.config
-bindings/mono/indicate/indicate-sharp-0.1.pc
-bindings/mono/indicate/AssemblyInfo.cs
-bindings/mono/indicate-gtk/Makefile
-bindings/mono/indicate-gtk/indicate-gtk-sharp.dll.config
-bindings/mono/indicate-gtk/indicate-gtk-sharp-0.1.pc
-bindings/mono/indicate-gtk/AssemblyInfo.cs
 ])
 
+if test "x$has_mono" = "xtrue" ; then
+   AC_CONFIG_FILES([
+   examples/indicator-mono-example
+   bindings/mono/Makefile
+   bindings/mono/indicate/Makefile
+   bindings/mono/indicate/indicate-sharp.dll.config
+   bindings/mono/indicate/indicate-sharp-0.1.pc
+   bindings/mono/indicate/AssemblyInfo.cs
+   bindings/mono/indicate-gtk/Makefile
+   bindings/mono/indicate-gtk/indicate-gtk-sharp.dll.config
+   bindings/mono/indicate-gtk/indicate-gtk-sharp-0.1.pc
+   bindings/mono/indicate-gtk/AssemblyInfo.cs
+   ])
+fi
+
+AC_OUTPUT
+
 ###########################
 # Results
 ###########################

=== modified file 'examples/Makefile.am'
--- examples/Makefile.am	2011-09-03 05:13:02 +0000
+++ examples/Makefile.am	2011-09-04 09:48:26 +0000
@@ -104,4 +104,6 @@
 	$(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(srcdir)/$(CSFILES)
 	chmod a+x indicator-mono-example
 
+if HAS_MONO
 check: $(ASSEMBLY)
+endif


Follow ups