2012-04-26 14:05:48 +04:00
|
|
|
dnl
|
|
|
|
dnl Internal editor support.
|
|
|
|
dnl
|
2016-01-04 21:43:19 +03:00
|
|
|
AC_DEFUN([mc_WITH_INTERNAL_EDIT], [
|
2012-04-26 14:05:48 +04:00
|
|
|
|
2013-06-15 12:55:16 +04:00
|
|
|
AC_ARG_WITH([internal_edit],
|
|
|
|
AS_HELP_STRING([--with-internal-edit], [Enable internal editor @<:@yes@:>@]))
|
2012-04-26 14:05:48 +04:00
|
|
|
|
2013-06-15 12:55:16 +04:00
|
|
|
if test x$with_internal_edit != xno; then
|
2012-04-26 14:05:48 +04:00
|
|
|
AC_DEFINE(USE_INTERNAL_EDIT, 1, [Define to enable internal editor])
|
2013-06-15 12:55:16 +04:00
|
|
|
use_internal_edit=yes
|
2012-04-26 14:05:48 +04:00
|
|
|
AC_MSG_NOTICE([using internal editor])
|
2013-06-15 12:55:16 +04:00
|
|
|
edit_msg="yes"
|
2012-04-26 14:05:48 +04:00
|
|
|
else
|
2013-06-15 12:55:16 +04:00
|
|
|
use_internal_edit=no
|
2012-04-26 14:05:48 +04:00
|
|
|
edit_msg="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ASpell support.
|
|
|
|
AC_ARG_ENABLE([aspell],
|
2024-06-04 12:15:23 +03:00
|
|
|
AS_HELP_STRING(
|
|
|
|
[--enable-aspell@<:@=prefix@:>@],
|
|
|
|
[Enable aspell support for internal editor @<:@no@:>@] and optionally set path to aspell installation prefix @<:@default=/usr@:>@),
|
2012-04-26 14:05:48 +04:00
|
|
|
[
|
|
|
|
if test "x$enableval" = xno; then
|
|
|
|
enable_aspell=no
|
|
|
|
else
|
2024-06-04 12:15:23 +03:00
|
|
|
test -d "$enable_aspell/include" && CPPFLAGS="$CPPFLAGS -I$enable_aspell/include"
|
2012-04-26 14:05:48 +04:00
|
|
|
enable_aspell=yes
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[enable_aspell=no]
|
|
|
|
)
|
|
|
|
|
2013-06-15 12:55:16 +04:00
|
|
|
if test x$with_internal_edit != xno -a x$enable_aspell != xno; then
|
2012-04-26 14:05:48 +04:00
|
|
|
AC_CHECK_HEADERS([aspell.h], [], [
|
2019-01-08 10:34:42 +03:00
|
|
|
AC_MSG_ERROR([Could not find aspell development headers])
|
2012-04-26 14:05:48 +04:00
|
|
|
], [])
|
|
|
|
|
|
|
|
if test x"$g_module_supported" != x; then
|
|
|
|
AC_DEFINE(HAVE_ASPELL, 1, [Define to enable aspell support])
|
|
|
|
edit_msg="yes with aspell support"
|
|
|
|
AC_MSG_NOTICE([using aspell for internal editor])
|
|
|
|
else
|
|
|
|
enable_aspell=no
|
2024-06-04 12:15:23 +03:00
|
|
|
AC_MSG_ERROR([aspell support is disabled because gmodule support is not available])
|
2012-04-26 14:05:48 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
])
|