From 1881edeebc36271aba89cb1b35e09567a2904731 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 26 Nov 2007 19:23:08 +0000 Subject: [PATCH] * modest-outside-scratchbox patch 3: - make conic optional, even when building the maemo frontend pmo-trunk-r3821 --- configure.ac | 16 +++++++++++++++- libmodest-dbus-client/Makefile.am | 1 + src/maemo/modest-connection-specific-smtp-window.c | 5 ++++- src/maemo/modest-maemo-global-settings-dialog.c | 4 ++++ src/modest-tny-account-store.c | 4 ++-- src/widgets/Makefile.am | 3 ++- 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 4461b12..7530d50 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,7 @@ dnl AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo else have_easysetup=true have_dbusapi=true - PKG_CHECK_MODULES(MODEST_PLATFORM,libosso conic libtinymail-maemo-1.0 libebook-1.2 microb-engine-nss) + PKG_CHECK_MODULES(MODEST_PLATFORM,libosso dbus-1 libtinymail-maemo-1.0 libebook-1.2 ) AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."]) AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"]) fi @@ -144,6 +144,20 @@ fi fi + +# +# check for libconic; this is a trick to check whether we run +# on a 'real' maemo platform, or on, say, ubuntu embedded +# this determines whether we build with the non-hildon GTK+ +# +if test "x$with_platform" == "xmaemo"; then +PKG_CHECK_MODULES(MODEST_LIBCONIC,conic,have_libconic=true,have_libconic=false) +if test "x$have_libconic" == "xtrue"; then + AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_GTK,1,["Whether modest is being built with Hildon/Gtk"]) + AC_DEFINE_UNQUOTED(MODEST_HAVE_CONIC,1,["Whether modest has conic available"]) +fi +fi + # # check hildon-help (only for maemo) # diff --git a/libmodest-dbus-client/Makefile.am b/libmodest-dbus-client/Makefile.am index 13b7ffb..5e85cd6 100644 --- a/libmodest-dbus-client/Makefile.am +++ b/libmodest-dbus-client/Makefile.am @@ -30,6 +30,7 @@ INCLUDES=\ $(MODEST_GSTUFF_CFLAGS)\ $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \ $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \ + $(MODEST_PLATFORM_CFLAGS) \ -I$(MODEST_PLATFORM) \ -I$(top_srcdir)/src \ -DPREFIX=\"@prefix@\" \ diff --git a/src/maemo/modest-connection-specific-smtp-window.c b/src/maemo/modest-connection-specific-smtp-window.c index 45ce533..0529b3a 100644 --- a/src/maemo/modest-connection-specific-smtp-window.c +++ b/src/maemo/modest-connection-specific-smtp-window.c @@ -154,8 +154,10 @@ modest_connection_specific_smtp_window_class_init (ModestConnectionSpecificSmtpW /* #define DEBUG_WITHOUT_LIBCONIC 1 */ void -modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSpecificSmtpWindow *self, ModestAccountMgr *account_manager) +modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSpecificSmtpWindow *self, + ModestAccountMgr *account_manager) { +#ifdef MODEST_HAVE_CONIC ModestConnectionSpecificSmtpWindowPrivate *priv = CONNECTION_SPECIFIC_SMTP_WINDOW_GET_PRIVATE (self); priv->account_manager = account_manager; @@ -215,6 +217,7 @@ modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSp #endif update_model_server_names (self); +#endif /*MODEST_HAVE_CONIC */ } static void diff --git a/src/maemo/modest-maemo-global-settings-dialog.c b/src/maemo/modest-maemo-global-settings-dialog.c index 2c71d02..8499fb9 100644 --- a/src/maemo/modest-maemo-global-settings-dialog.c +++ b/src/maemo/modest-maemo-global-settings-dialog.c @@ -508,6 +508,7 @@ current_connection (void) if (!tny_device_is_online (device)) return MODEST_CONNECTED_VIA_ANY; +#ifdef MODEST_HAVE_CONIC /* Get iap id */ const gchar *iap_id = tny_maemo_conic_device_get_current_iap_id (TNY_MAEMO_CONIC_DEVICE (device)); if (iap_id) { @@ -524,6 +525,9 @@ current_connection (void) g_object_unref (iap); } +#else + retval = MODEST_CONNECTED_VIA_WLAN; /* assume WLAN (fast) internet */ +#endif /* MODEST_HAVE_CONIC */ g_object_unref (device); diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 4539336..b9061d0 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1371,7 +1371,7 @@ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection g_return_val_if_fail (self, NULL); -#ifdef MODEST_PLATFORM_MAEMO +#ifdef MODEST_HAVE_CONIC g_assert (TNY_IS_MAEMO_CONIC_DEVICE (device)); TnyMaemoConicDevice *maemo_device = TNY_MAEMO_CONIC_DEVICE (device); const gchar* iap_id = tny_maemo_conic_device_get_current_iap_id (maemo_device); @@ -1417,7 +1417,7 @@ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection return account; #else return NULL; /* TODO: Implement this for GNOME, instead of just Maemo? */ -#endif /* MODEST_PLATFORM_MAEMO */ +#endif /* MODEST_HAVE_CONIC */ } diff --git a/src/widgets/Makefile.am b/src/widgets/Makefile.am index 7470870..6c8370b 100644 --- a/src/widgets/Makefile.am +++ b/src/widgets/Makefile.am @@ -1,11 +1,12 @@ # # Makefile.am -# Time-stamp: <2007-06-23 15:40:04 (djcb)> +# Time-stamp: <2007-11-24 13:34:06 (djcb)> INCLUDES=\ $(MODEST_GSTUFF_CFLAGS) \ $(MODEST_PLATFORM_CFLAGS) \ $(MODEST_HILDON_WIDGETS_CFLAGS) \ + $(MODEST_HILDON_HELP_CFLAGS) \ $(MODEST_MOZEMBED_CFLAGS) \ -I ${top_srcdir}/src/$(MODEST_PLATFORM) \ -I ${top_srcdir}/src \ -- 1.7.9.5