Merge pull request #3977 from techee/filetype_groups
[geany-mirror.git] / m4 / geany-plugins.m4
blob665003dc430c20fdd332eb2295a5d53cd1ef9db4
1 dnl GEANY_CHECK_PLUGINS
2 dnl Checks whether to enable plugins support
3 dnl AC_DEFINEs HAVE_PLUGINS and AM_CONDITIONALs PLUGINS
4 dnl Result is available in the geany_enable_plugins variable
5 AC_DEFUN([GEANY_CHECK_PLUGINS],
7         AC_REQUIRE([AC_DISABLE_STATIC])
8         AC_REQUIRE([LT_INIT])
10         AC_ARG_ENABLE([plugins],
11                         [AS_HELP_STRING([--disable-plugins], [compile without plugin support [default=no]])],
12                         [geany_enable_plugins=$enableval],
13                         [geany_enable_plugins=yes])
15         dnl silent libtool if it's not already done
16         AS_CASE(["$LIBTOOL"],
17                         [*--silent*], [],
18                         [LIBTOOL="$LIBTOOL --silent"
19                          AC_SUBST([LIBTOOL])])
21         if test "x$geany_enable_plugins" = "xyes" ; then
22                 AC_DEFINE([HAVE_PLUGINS], [1], [Define if plugins are enabled.])
23                 AM_CONDITIONAL([PLUGINS], true)
24         else
25                 AM_CONDITIONAL([PLUGINS], false)
26         fi
28         GEANY_STATUS_ADD([Build with plugin support], [$geany_enable_plugins])