Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Wed, 30 Jan 2013 21:24:55 UTC Commit: 4710d851d7914baf302eeff54cec6e04bbdae70e https://github.com/geany/geany-plugins/commit/4710d851d7914baf302eeff54cec6e...
Log Message: ----------- Disable plugins that check for a dependency on an incompatible GTK
Modified Paths: -------------- build/common.m4 build/gtk.m4
Modified: build/common.m4 7 files changed, 7 insertions(+), 0 deletions(-) =================================================================== @@ -18,6 +18,13 @@ dnl Checks whether modules exist using PKG_CHECK_MODULES, and enables/disables dnl plugins appropriately if enable_$plugin=auto AC_DEFUN([GP_CHECK_PLUGIN_DEPS], [ + AC_REQUIRE([GP_CHECK_GTK_VERSION]) + + gtk_dep=m4_bmatch([$3], [gtk+-2.0], [2], [gtk+-3.0], [3], [0]) + if test $gtk_dep -ne 0; then + GP_CHECK_PLUGIN_GTKN_ONLY([$1], [$gtk_dep]) + fi + if test "$m4_tolower(AS_TR_SH(enable_$1))" = "yes"; then PKG_CHECK_MODULES([$2], [$3]) elif test "$m4_tolower(AS_TR_SH(enable_$1))" = "auto"; then
Modified: build/gtk.m4 28 files changed, 28 insertions(+), 0 deletions(-) =================================================================== @@ -21,3 +21,31 @@ AC_DEFUN([GP_CHECK_GTK3], AC_REQUIRE([GP_CHECK_GTK_VERSION]) AS_IF([test ${GP_GTK_VERSION_MAJOR} = 3],[$1],[$2]) ]) + +dnl GP_CHECK_PLUGIN_GTKN_ONLY pluginname gtkversion +AC_DEFUN([GP_CHECK_PLUGIN_GTKN_ONLY], +[ + AC_REQUIRE([GP_CHECK_GTK_VERSION]) + + AS_IF([test "$m4_tolower(AS_TR_SH(enable_$1))" = no],[], + [AC_MSG_CHECKING([whether the GTK version in use is compatible with plugin $1]) + AS_IF([test ${GP_GTK_VERSION_MAJOR} = $2], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AS_IF([test "$m4_tolower(AS_TR_SH(enable_$1))" = yes], + [AC_MSG_ERROR([$1 is not compatible with the GTK version in use])], + [test "$m4_tolower(AS_TR_SH(enable_$1))" = auto], + [m4_tolower(AS_TR_SH(enable_$1))=no])])]) +]) + +dnl GP_CHECK_PLUGIN_GTK2_ONLY pluginname +AC_DEFUN([GP_CHECK_PLUGIN_GTK2_ONLY], +[ + GP_CHECK_PLUGIN_GTKN_ONLY([$1], [2]) +]) + +dnl GP_CHECK_PLUGIN_GTK3_ONLY pluginname +AC_DEFUN([GP_CHECK_PLUGIN_GTK3_ONLY], +[ + GP_CHECK_PLUGIN_GTKN_ONLY([$1], [3]) +])
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org