Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 17 Nov 2018 18:43:55 UTC Commit: 81957e3104800afec0fa86936e053e2bc99a1b3c https://github.com/geany/geany-plugins/commit/81957e3104800afec0fa86936e053e...
Log Message: ----------- Move checks for utilslib VTE support in utils.m4
This adds GP_CHECK_UTILSLIB_VTECOMPAT for a plugin to request the VTE compatibility support.
Modified Paths: -------------- build/scope.m4 build/utils.m4 utils/src/Makefile.am
Modified: build/scope.m4 21 lines changed, 8 insertions(+), 13 deletions(-) =================================================================== @@ -2,22 +2,17 @@ AC_DEFUN([GP_CHECK_SCOPE], [ GP_ARG_DISABLE([Scope], [auto])
- case "$host_os" in - cygwin* | mingw* | win32*) - PTY_LIBS="" - ;; + AS_CASE([$host_os], + [cygwin* | mingw* | win32*], + [PTY_LIBS=""],
- *) + [GP_CHECK_GTK3([vte_package=vte-2.91], [vte_package="vte >= 0.17"]) + GP_CHECK_PLUGIN_DEPS([scope], [VTE], [$vte_package]) + GP_CHECK_UTILSLIB_VTECOMPAT([Scope])
- GP_CHECK_GTK3([vte_package=vte-2.91], [vte_package="vte >= 0.17"]) - GP_CHECK_PLUGIN_DEPS([scope], [VTE], [$vte_package]) + AC_CHECK_HEADERS([util.h pty.h libutil.h]) + PTY_LIBS="-lutil"])
- AC_CHECK_HEADERS([util.h pty.h libutil.h]) - PTY_LIBS="-lutil" - ;; - esac - - AM_CONDITIONAL([SCOPE_USE_VTE291], [test "$enable_scope" != no && test "$vte_package" = vte-2.91]) AC_SUBST(PTY_LIBS)
GP_COMMIT_PLUGIN_STATUS([Scope])
Modified: build/utils.m4 18 lines changed, 18 insertions(+), 0 deletions(-) =================================================================== @@ -7,6 +7,22 @@ AC_DEFUN([_GP_UTILSLIB_ARG], [enable_utilslib=auto]) ])
+dnl GP_CHECK_UTILSLIB_VTECOMPAT(PluginName) +AC_DEFUN([GP_CHECK_UTILSLIB_VTECOMPAT], +[ + AS_IF([test "$m4_tolower(AS_TR_SH(enable_$1))" != no], + [GP_CHECK_GTK3([utilslib_vte_package=vte-2.91], + [utilslib_vte_package=vte]) + PKG_CHECK_MODULES([UTILSLIB], [$utilslib_vte_package], + [utilslib_have_vte=yes], + [utilslib_have_vte=no]) + AS_IF([test "$utilslib_have_vte" != yes || test "$enable_utilslib" = no], + [AS_IF([test "$m4_tolower(AS_TR_SH(enable_$1))" = yes], + [AC_MSG_ERROR([Plugin $1 depends on utilslib VTE support which is not available])], + [m4_tolower(AS_TR_SH(enable_$1))=no])], + [enable_utilslib=yes])]) +]) + dnl GP_CHECK_UTILSLIB(PluginName) dnl Check for utils library AC_DEFUN([GP_CHECK_UTILSLIB], @@ -30,5 +46,7 @@ AC_DEFUN([GP_COMMIT_UTILSLIB_STATUS], ])], [enable_utilslib=no]) AM_CONDITIONAL([ENABLE_UTILSLIB], [test "$enable_utilslib" = "yes"]) + AM_CONDITIONAL([ENABLE_UTILSLIB_VTECOMPAT], [test "$enable_utilslib" = yes && test "$utilslib_have_vte" = yes]) GP_STATUS_FEATURE_ADD([Utility library], [$enable_utilslib]) + GP_STATUS_FEATURE_ADD([Utility library VTE support], [${utilslib_have_vte-no}]) ])
Modified: utils/src/Makefile.am 7 lines changed, 3 insertions(+), 4 deletions(-) =================================================================== @@ -6,16 +6,15 @@ libgeanypluginutils_la_SOURCES = \ filelist.h \ filelist.c
-if SCOPE_USE_VTE291 +if ENABLE_UTILSLIB_VTECOMPAT libgeanypluginutils_la_SOURCES += \ gp_vtecompat.h \ gp_vtecompat.c endif
libgeanypluginutils_la_CPPFLAGS = $(AM_CPPFLAGS) \ -DG_LOG_DOMAIN="Utils" -libgeanypluginutils_la_CFLAGS = $(AM_CFLAGS) $(VTE_CFLAGS) -libgeanypluginutils_la_LIBADD = $(COMMONLIBS) $(VTE_LIBS) +libgeanypluginutils_la_CFLAGS = $(AM_CFLAGS) $(UTILSLIB_CFLAGS) +libgeanypluginutils_la_LIBADD = $(COMMONLIBS) $(UTILSLIB_LIBS) libgeanypluginutils_la_LDFLAGS = -no-undefined $(GP_LDFLAGS) include $(top_srcdir)/build/cppcheck.mk -
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).