Updating NEWS-file a bit with recent changes done by frlan
[geany-mirror.git] / m4 / geany-vte.m4
blob1cc4efaadc0dae4145eea1b37c083c2d46b6b370
1 dnl _GEANY_CHECK_VTE_PREREQ
2 AC_DEFUN([_GEANY_CHECK_VTE_PREREQ],
4         AC_ARG_ENABLE([vte],
5                         [AS_HELP_STRING([--enable-vte],
6                                         [enable if you want virtual terminal support [default=yes]])],
7                         [geany_enable_vte="$enableval"],
8                         [geany_enable_vte="yes"])
9         AC_ARG_WITH([vte-module-path],
10                         [AS_HELP_STRING([--with-vte-module-path=PATH],
11                                         [Path to a loadable libvte [default=None]])],
12                         [AC_DEFINE_UNQUOTED([VTE_MODULE_PATH],
13                                         ["$withval"], [Path to a loadable libvte])])
16 dnl GEANY_CHECK_VTE([enable])
17 AC_DEFUN([GEANY_CHECK_VTE],
19         AC_REQUIRE([_GEANY_CHECK_VTE_PREREQ])
21         dnl this way of calling once is a bit ugly, but we need to be able to
22         dnl call this from one or more locations, the first one maybe in a shell
23         dnl conditional.
24         dnl see geany-socket.m4
25         if test "x$_geany_enable_vte_done" = x; then
26                 dnl This one gives precedence for user choice
27                 dnl if test "x$geany_enable_vte" = xauto; then
28                 dnl     if test -n "$1"; then
29                 dnl             geany_enable_vte="$1"
30                 dnl     else
31                 dnl             geany_enable_vte=yes
32                 dnl     fi
33                 dnl fi
34                 if test -n "$1"; then
35                         geany_enable_vte="$1"
36                 elif test "x$geany_enable_vte" = xauto; then
37                         geany_enable_vte=yes
38                 fi
40                 if test "x$geany_enable_vte" = xyes; then
41                         AC_DEFINE([HAVE_VTE], [1], [Define if you want VTE support])
42                 fi
44                 GEANY_STATUS_ADD([Use virtual terminal support], [$geany_enable_vte])
45                 _geany_enable_vte_done=yes
46         fi