PKG_CHECK_MODULES(TERMINAL,
                  [vte-2.91 >= 0.40.2],
                  [have_vte=yes],
                  [have_vte=no])

AC_ARG_ENABLE([enable-terminal-plugin],
              [AS_HELP_STRING([--enable-terminal-plugin=@<:@auto/yes/no@:>@],
                              [Build with support for a VTE-based terminal.])],
              [],
              [enable_terminal_plugin=$have_vte])

AS_IF([test "$enable_terminal_plugin" = "yes" && test "$have_vte" = "no"],[
	AC_MSG_ERROR([Failed to locate vte dependencies. Try installing vte291-devel.])
])

# for if ENABLE_CLANG_PLUGIN in Makefile.am
AM_CONDITIONAL(ENABLE_TERMINAL_PLUGIN, test x$enable_terminal_plugin = xyes)

# Ensure our makefile is generated by autoconf
AC_CONFIG_FILES([plugins/terminal/Makefile])
