Check for GnuTLS >= 2.11 only if we have GnuTLS >= 2.2
[claws.git] / configure.ac
index d957f8034b3789aec60ee10c274295574a757dcd..0740ec1c5d6e74b8e0a22c977ae331b3bedfd81d 100644 (file)
@@ -206,7 +206,7 @@ AC_CHECK_FUNCS(bind_textdomain_codeset)
 LIBS=$syl_save_LIBS
 
 dnl for gettext
-ALL_LINGUAS="bg ca cs de en_GB es fi fr he hu id_ID it ja lt nl pl pt_BR pt_PT ru sk sv uk zh_CN zh_TW"
+ALL_LINGUAS="bg ca cs de en_GB eo es fi fr he hu id_ID it ja lt nl pl pt_BR pt_PT ru sk sv uk zh_CN zh_TW"
 GETTEXT_PACKAGE=claws-mail
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
@@ -474,18 +474,18 @@ if test "x$enable_gnutls" != "xno"; then
         [
                 AC_DEFINE(USE_GNUTLS, 1, gnutls)
                 echo "Building with GnuTLS"
+               PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
+               [
+                       dnl No linking against libgcrypt needed
+               ],
+               [
+                       dnl linking against libgcrypt *is* needed
+                       GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
+               ])
         ],
         [
                 echo "Building without gnutls"
         ])
-        PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
-        [
-                dnl No linking against libgcrypt needed
-        ],
-        [
-                dnl linking against libgcrypt *is* needed
-                GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
-        ])
         AC_SUBST(GNUTLS_LIBS)
         AC_SUBST(GNUTLS_CFLAGS)
 fi
@@ -964,6 +964,10 @@ AC_ARG_ENABLE(geolocation-plugin,
                [  --disable-geolocation-plugin    Do not build geolocation plugin],
                [enable_geolocation_plugin=$enableval], [enable_geolocation_plugin=auto])
 
+AC_ARG_ENABLE(libravatar-plugin,
+               [  --disable-libravatar-plugin     Do not build libravatar  plugin],
+               [enable_libravatar_plugin=$enableval], [enable_libravatar_plugin=auto])
+
 AC_ARG_ENABLE(mailmbox-plugin,
                [  --disable-mailmbox-plugin       Do not build mailmbox plugin],
                [enable_mailmbox_plugin=$enableval], [enable_mailmbox_plugin=auto])
@@ -1040,7 +1044,8 @@ dnl either yes or no, and do the AC_SUBST calls.
 dnl Archive:           libarchive
 dnl Fancy:             Webkit, curl, optionally libsoup-gnome
 dnl Gdata:             libgdata
-dnl Geolocation                libchamplain, libsoup
+dnl Geolocation:       libchamplain, libsoup
+dnl Libravatar:                libcurl
 dnl Notification:      optionally libnotify libindicate libcanberra_gtk hotkey
 dnl Pdf-Viewer:                libpoppler
 dnl Perl:              sed perl
@@ -1470,6 +1475,31 @@ else
        AC_MSG_RESULT(no)
 fi
 
+AC_MSG_CHECKING([whether to build libravatar plugin])
+if test x"$enable_libravatar_plugin" != xno; then
+       dependencies_missing=""
+
+       if test x"$HAVE_CURL" = xno; then
+               dependencies_missing="libcurl $dependencies_missing"
+       fi
+
+       if test x"$dependencies_missing" = x; then
+               PLUGINS="$PLUGINS libravatar"
+               AC_MSG_RESULT(yes)
+       elif test x"$enable_libravatar_plugin" = xauto; then
+               AC_MSG_RESULT(no)
+               AC_MSG_WARN("Plugin libravatar will not be built; missing $dependencies_missing")
+               enable_libravatar_plugin=no
+               MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS libravatar"
+       else
+               AC_MSG_RESULT(no)
+               AC_MSG_ERROR("Plugin libravatar cannot be built; missing $dependencies_missing")
+       fi
+else
+       DISABLED_PLUGINS="$DISABLED_PLUGINS libravatar"
+       AC_MSG_RESULT(no)
+fi
+
 AC_MSG_CHECKING([whether to build mailmbox plugin])
 if test x"$enable_mailmbox_plugin" != xno; then
        PLUGINS="$PLUGINS mailmbox"
@@ -1830,6 +1860,7 @@ AM_CONDITIONAL(BUILD_FANCY_PLUGIN,                test x"$enable_fancy_plugin" != xno)
 AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN,         test x"$enable_fetchinfo_plugin" != xno)
 AM_CONDITIONAL(BUILD_GDATA_PLUGIN,             test x"$enable_gdata_plugin" != xno)
 AM_CONDITIONAL(BUILD_GEOLOCATION_PLUGIN,       test x"$enable_geolocation_plugin" != xno)
+AM_CONDITIONAL(BUILD_LIBRAVATAR_PLUGIN,                test x"$enable_libravatar_plugin" != xno)
 AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN,          test x"$enable_mailmbox_plugin" != xno)
 AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN,           test x"$enable_newmail_plugin" != xno)
 AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN,      test x"$enable_notification_plugin" != xno)
@@ -1877,6 +1908,7 @@ src/plugins/fancy/Makefile
 src/plugins/fetchinfo/Makefile
 src/plugins/gdata/Makefile
 src/plugins/geolocation/Makefile
+src/plugins/libravatar/Makefile
 src/plugins/mailmbox/Makefile
 src/plugins/newmail/Makefile
 src/plugins/notification/Makefile