commit c620991ac856567096ed466ee61b14d16cc5130d
Author: Christophe Fergeau <[email protected]>
Date: Wed Jun 16 21:19:38 2010 +0200
[mono] add auto-enabling of mono bindings
This will enable mono bindings if all its dependencies are met,
and disable them or not. If --with-mono is used and the dependencies
aren't met, configure will fail. "auto" is the default. Before this
change, configure was aborting if no mono was installed.
m4/mono.m4 | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/m4/mono.m4 b/m4/mono.m4
index b9b9707..7b9d412 100644
--- a/m4/mono.m4
+++ b/m4/mono.m4
@@ -24,7 +24,11 @@ AC_DEFUN([SHAMROCK_FIND_PROGRAM_OR_BAIL],
[
SHAMROCK_FIND_PROGRAM($1, $2, no)
if test "x$$1" = "xno"; then
- AC_MSG_ERROR([You need to install '$2'])
+ if test "X$with_mono" = "Xyes"; then
+ AC_MSG_ERROR([You need to install '$2'])
+ else
+ mono_detected=no
+ fi
fi
])
@@ -40,7 +44,14 @@ AC_DEFUN([SHAMROCK_FIND_MONO_RUNTIME],
AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE],
[
- PKG_CHECK_MODULES(MONO_MODULE, mono >= $1)
+ PKG_CHECK_MODULES(MONO_MODULE, mono >= $1, found_mono="yes",
found_mono="no")
+ if test "x$found_mono" = "xno"; then
+ if test "X$with_mono" = "Xyes"; then
+ AC_MSG_ERROR([You need to install mono])
+ else
+ mono_detected=no
+ fi
+ fi
])
AC_DEFUN([CHECK_GLIB_GTK_SHARP],
@@ -53,6 +64,13 @@ AC_DEFUN([CHECK_GLIB_GTK_SHARP],
PKG_CHECK_MODULES(GLIBSHARP,
glib-sharp-2.0 >= $GTK_SHARP_MIN_VERSION, [],
found_gtksharp="no")
AC_SUBST(GLIBSHARP_LIBS)
+ if test "X$found_gtksharp" != "Xyes"; then
+ if test "X$with_mono" = "Xyes"; then
+ AC_MSG_ERROR([You need to install gtk-sharp])
+ else
+ mono_detected=no
+ fi
+ fi
])
dnl check for mono and required dependencies
@@ -60,22 +78,20 @@ AC_DEFUN([LIBGPOD_CHECK_MONO],
[
AC_ARG_WITH(mono,
AC_HELP_STRING([--with-mono],
- [build mono bindings [[default=yes]]]),
- [with_mono=$withval],[with_mono=yes])
+ [build mono bindings [[default=auto]]]),
+ [with_mono=$withval],[with_mono=auto])
AC_MSG_CHECKING(whether to build mono bindings)
- if test "X$with_mono" != Xno; then
- with_mono=yes
- fi
AC_MSG_RESULT($with_mono)
- if test "X$with_mono" = Xyes; then
+ if test "X$with_mono" != Xno; then
+ mono_detected="yes"
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_CHECK_MONO_MODULE($MONO_MIN_VERSION)
SHAMROCK_FIND_MONO_2_0_COMPILER
SHAMROCK_FIND_MONO_RUNTIME
CHECK_GLIB_GTK_SHARP
- if test "X$found_gtksharp" != "Xyes"; then
+ if test "X$mono_detected" = "Xno"; then
with_mono="no"
fi
fi
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2