changed mcedit man.
[midnight-commander.git] / m4.include / mc-with-edit.m4
blobcbfd9598896b04217a0fddef8c6db727d3c503a8
1 dnl
2 dnl Internal editor support.
3 dnl
4 AC_DEFUN([MC_WITH_EDIT], [
6     AC_ARG_WITH([edit], AS_HELP_STRING([--with-edit], [Enable internal editor @<:@yes@:>@]))
8     if test x$with_edit != xno; then
9             AC_DEFINE(USE_INTERNAL_EDIT, 1, [Define to enable internal editor])
10             use_edit=yes
11             AC_MSG_NOTICE([using internal editor])
12     else
13             use_edit=no
14             edit_msg="no"
15     fi
17     dnl ASpell support.
18     AC_ARG_ENABLE([aspell],
19         AS_HELP_STRING([--enable-aspell], [Enable aspell support for internal editor @<:@no@:>@]),
20         [
21             if test "x$enableval" = xno; then
22                 enable_aspell=no
23             else
24                 enable_aspell=yes
25             fi
26         ],
27         [enable_aspell=no]
28     )
30     if test x$with_edit != xno -a x$enable_aspell != xno; then
31             AC_CHECK_HEADERS([aspell.h], [], [
32                 AC_ERROR([Could not find aspell development headers])
33             ], [])
35             if test x"$g_module_supported" != x; then
36                 AC_DEFINE(HAVE_ASPELL, 1, [Define to enable aspell support])
37                 edit_msg="yes with aspell support"
38                 AC_MSG_NOTICE([using aspell for internal editor])
39             else
40                 enable_aspell=no
41                 AC_MSG_NOTICE([aspell support is disabled because gmodule support is not available])
42             fi
43     else
44             edit_msg="yes"
45     fi