On Wed, 15 Jun 2011 16:29:39 +0200
Patrick Ohly <[email protected]> wrote:
> On Mi, 2011-06-15 at 15:22 +0100, Zhu, Yongsheng wrote:
> > Preparation Results
> > prepare
> > Value
> > libsynthesis-fetch-config
> > okay
> > syncevolution-fetch-config
> > okay
> > compile
> > failed
> > dist
> > skipped
> > Total passed cases (all: 4)
> > 2
>
>
> configure: error: required mlite package not found, use
> --disable-mlite to compile without mlite based notifications
>
> Salvatore, please change the configure logic so that mlite support is
> disabled by default. It should have to be enabled explicitly. When
> enabled explicitly, fail hard if it is not found.
>
> The rationale is that normal users shouldn't have to worry about
> adding --disable-mlite, a feature which will only be useful in MeeGo.
Hi Patrick,
please review the following patch:
diff --git a/configure-pre.in b/configure-pre.in
index 65a06b5..9d6cc50 100644
--- a/configure-pre.in
+++ b/configure-pre.in
@@ -501,15 +501,17 @@ if test $enable_dbus_service = "yes"; then
AC_DEFINE(HAS_NOTIFY, 1, [define if libnotify could be used in dbus
service])
fi
- # Here we're using QtGui too because mlite fails to depend on it,
- # despite using QAction.
- PKG_CHECK_MODULES(MLITE, [mlite QtGui], HAVE_MLITE=yes, HAVE_MLITE=no)
+ AS_IF([test "x$enable_mlite" = "xyes"],
+ # Here we're using QtGui too because mlite fails to depend on it,
+ # despite using QAction.
+ PKG_CHECK_MODULES(MLITE, [mlite QtGui], HAVE_MLITE=yes,
HAVE_MLITE=no),
+ [])
AC_ARG_ENABLE(mlite,
AS_HELP_STRING([--enable-mlite],
[send notifications for automatic sync
events, using mlite]),
- [ test "$enableval" = "no" || test $HAVE_MLITE = "yes" ||
AC_ERROR([required mlite package not found]) ],
- [ test $HAVE_MLITE = "yes" || AC_ERROR([required mlite
package not found, use --disable-mlite to compile without mlite based
notifications]) ])
- if test $HAVE_MLITE = "yes"; then
+ [test "$enableval" = "yes" && test $HAVE_MLITE = "no" &&
AC_ERROR([requested mlite package not found]) ],
+ [ test $HAVE_MLITE = "yes" && enable_mlite=yes ])
+ if test $enable_mlite = "yes"; then
AC_DEFINE(HAS_MLITE, 1, [define if mlite could be used in dbus
service])
fi
AC_DEFINE(DBUS_SERVICE, 1, [define if dbus service is enabled])
diff --git a/src/NotificationBackendMLite.cpp b/src/NotificationBackendMLite.cpp
index 040fdd0..e3abb1f 100644
--- a/src/NotificationBackendMLite.cpp
+++ b/src/NotificationBackendMLite.cpp
@@ -17,6 +17,8 @@
* 02110-1301 USA
*/
+#ifdef HAS_MLITE
+
#include "NotificationBackendMLite.h"
#include <mlite/MNotification>
@@ -63,3 +65,5 @@ void NotificationBackendMLite::publish(
SE_END_CXX
+#endif
+
--
Salvatore Iovene <[email protected]>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution