Check properly the contents of the clipboard before
[modest] / configure.ac
index ca2e615..89c016b 100644 (file)
@@ -69,6 +69,12 @@ PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gcon
 AC_SUBST(MODEST_GSTUFF_CFLAGS)
 AC_SUBST(MODEST_GSTUFF_LIBS)
 
+__COPY_LIBS="$LIBS"
+LIBS="$LIBS $MODEST_GSTUFF_LIBS"
+AC_CHECK_FUNCS(gtk_html_get_selection_area)
+LIBS="$__COPY_LIBS"
+AC_SUBST(HAVE_GTK_HTML_GET_SELECTION_AREA)
+
 dnl dnl now, determine what to build
 AC_MSG_NOTICE([Determining what platform to build])
 PKG_CHECK_MODULES(MODEST_MAEMO_LIBS,libosso,[with_platform=maemo],true)
@@ -82,29 +88,28 @@ AC_ARG_WITH(platform,
 esac], [MODEST_PLATFORM=gnome
                with_platform=gnome])
 
-
+have_easysetup=false
 if test "x$with_platform" == "xgnome"; then
       PKG_CHECK_MODULES(MODEST_PLATFORM,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8 gtk+-2.0 >= 2.10 libnotify)
     AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
+    AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo build instead])
 else
+    have_easysetup=true
     PKG_CHECK_MODULES(MODEST_PLATFORM,libosso conic libtinymail-maemo-1.0 osso-addressbook-1.0 libebook-1.2 libalarm)
     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                 
 
-
-
+AM_CONDITIONAL(MODEST_HAVE_EASYSETUP,test "x$have_easysetup" == "xtrue")
 AC_SUBST(MODEST_PLATFORM)
 
 
 
 
-
-
-
-
 #
-# check for wpeditor or libwpeditor-plus
+# check for wpeditor or libwpeditor-plus (on maemo)
 #
+if test "x$with_platform" == "xmaemo"; then  
 PKG_CHECK_MODULES(MODEST_WPEDITOR,wpeditor,have_wpeditor=true,have_wpeditor=false)
 if test "x$have_wpeditor" == "xfalse"; then
    PKG_CHECK_MODULES(MODEST_WPEDITOR,libwpeditor-plus,have_libwpeditorplus=true,have_libwpeditorplus=false)    
@@ -118,12 +123,13 @@ else
    wpeditor="wpeditor" 
    AC_DEFINE_UNQUOTED(MODEST_HAVE_WPEDITOR, 1, ["Whether wpeditor is used."])          
 fi
-
+fi
 
 
 #
-# check the providers-data
+# check the providers-data (on maemo)
 #
+if test "x$with_platform" == "xmaemo"; then  
 PKG_CHECK_MODULES(MODEST_PROVIDERS_DATA,modest-providers-data,have_modest_providers_data=true,have_modest_providers_data=false)
 if test "x$have_modest_providers_data" == "xfalse"; then
    PKG_CHECK_MODULES(MODEST_PROVIDERS_DATA,maemo-providers-data,have_maemo_providers_data=true,have_maemo_providers_data=false)
@@ -140,7 +146,7 @@ else
   AC_DEFINE_UNQUOTED([MODEST_PROVIDERS_DATA_PATH],["`$PKG_CONFIG --variable=path modest-providers-data`"],[modest-providers-data file path])
   providers_data="modest-providers-data"                                                               
 fi
-      
+fi      
    
 
 
@@ -170,7 +176,7 @@ fi
 #
 if test "x$with_platform" == "xmaemo"; then  
    PKG_CHECK_MODULES(MODEST_HILDON_NOTIFY,hildon-notify libnotify,have_hildon_notify=true,have_hildon_notify=false)
-   if test "x$have_hildon_notify"="xtrue"; then
+   if test "x$have_hildon_notify" == "xtrue"; then
       AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_NOTIFY, 1, ["Whether hildon-notify is available"])      
    fi
 fi
@@ -190,15 +196,36 @@ if test "x$with_platform" == "xmaemo"; then
        AC_MSG_ERROR([you need to have either osso-mime or hildon-mime installed])
       fi
    else
-     helplib="hildon-mime"     
+     mimelib="hildon-mime"     
      AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_MIME, 1, ["Whether hildon-mime is used."])          
    fi
 fi
 
+PKG_CHECK_MODULES(MODEST_MOZEMBED, libtinymailui-mozembed-1.0, have_mozembed=true, have_mozembed=false)
+AC_ARG_ENABLE(mozembed,
+AC_HELP_STRING([--enable-mozembed],
+       [Build with GtkMozEmbed (yes, no)]),
+[case "${enableval}" in
+      yes)
+       if test x$have_mozembed = xfalse; then
+          AC_MSG_ERROR([building of GtkMozEmbed support requested and gtkmozembed not found])
+       fi
+       use_mozembed=true
+       ;;
+      *)
+        use_mozembed=false
+       ;;
+esac],[use_mozembed=false])
+
+AM_CONDITIONAL(BUILD_MOZEMBED, test x$use_mozembed = xtrue)
 
+if test x$use_mozembed = xtrue; then
+       AC_DEFINE_UNQUOTED(MODEST_USE_MOZEMBED, 1, ["Whether we use GtkMozEmbed."])
+fi
 
 #dnl wether we can and should build the 
-#dnl search plugin
+#dnl search plugin (on maemo)
+if test "x$with_platform" == "xmaemo"; then  
 PKG_CHECK_MODULES(MODEST_OGS, libosso >= 0.8.5 libogs-1.2, have_ogs=true, have_ogs=false)
 have_ogs_support=false
 AC_ARG_ENABLE(ogs_support,
@@ -218,6 +245,7 @@ esac],[have_ogs_support=$have_ogs])
 if test x$have_ogs_support = xtrue; then
        AC_DEFINE_UNQUOTED(MODEST_HAVE_OGS, 1, ["Whether ogs is available."])
 fi
+fi
 
 
 
@@ -389,6 +417,7 @@ echo "Editor lib       : $wpeditor"
 echo "Help lib         : $helplib"
 echo "Hildon-Notify    : $have_hildon_notify"    
 echo "LibOGS support   : $have_ogs_support"
+echo "MozEmbed support : $use_mozembed"
 echo "CFLAGS           : $CFLAGS"
 echo "Gettext Packages : $GETTEXT_PACKAGE"
 echo "Debug version    : $with_debug"