Richard Hughes <[email protected]> wrote: > I think magic deps like this are nearly always a bad idea, as on my > system I have mx-devel, but not on koji. The attached patch gets > things building for me.
There are two examples in Mash and one of them doesn't require Mx so I don't think it makes sense to call the option --enable-examples because disabling Mx only disables one of the examples. Would this patch be enough? It adds a --without-mx. Regards, - Neil
>From 872e14ec9e0b85411349da21a5da3e5490b7a526 Mon Sep 17 00:00:00 2001 From: Neil Roberts <[email protected]> Date: Wed, 21 Sep 2011 15:53:28 +0100 Subject: [PATCH] configure: Add a --with-mx option To make it easier to control the build behaviour of Mash when packaging this adds an option to explicitly disable the autodetection of Mx. This only makes a difference for the examples which don't get installed anyway so when packaging it would make sense to disable mx. --- configure.ac | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 8046636..1a597c3 100644 --- a/configure.ac +++ b/configure.ac @@ -71,10 +71,23 @@ PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16 gobject-2.0 >= 2.16]) PKG_CHECK_MODULES(CLUTTER, [clutter-1.0 >= 1.5.10]) dnl Optionally depend on Mx just for the test-lights example -PKG_CHECK_MODULES(MX, [mx-1.0 >= 1.1.0], [have_mx=yes], [have_mx=no]) - -AS_IF([test "x$have_mx" = "xno"], - AC_MSG_WARN([Mx was not found. It is not required but the lighting example will not be built without it])) +AC_ARG_WITH(mx, + [AS_HELP_STRING([--with-mx], + [build examples needing mx @<:@default=auto@:>@])], + [], + [with_mx=auto]) +AS_CASE([$with_mx], + [yes|no|auto], [], + [AC_MSG_ERROR([Invalid value for --with-mx])]) + +have_mx=no + +AS_IF([test "x$with_mx" != "xno"], + [PKG_CHECK_MODULES(MX, [mx-1.0 >= 1.1.0], [have_mx=yes], [have_mx=no]) + AS_IF([test "x$have_mx" = "xno"], + AS_IF([test "x$with_mx" = "xyes"], + [AC_MSG_ERROR([Mx was requested but not found])], + [AC_MSG_WARN([Mx was not found. It is not required but the lighting example will not be built without it])]))]) AM_CONDITIONAL([HAVE_MX], [test "x$have_mx" = "xyes"]) -- 1.7.3.16.g9464b
_______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
