mc-with-internal-edit.m4 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. dnl
  2. dnl Internal editor support.
  3. dnl
  4. AC_DEFUN([mc_WITH_INTERNAL_EDIT], [
  5. AC_ARG_WITH([internal_edit],
  6. AS_HELP_STRING([--with-internal-edit], [Enable internal editor @<:@yes@:>@]))
  7. if test x$with_internal_edit != xno; then
  8. AC_DEFINE(USE_INTERNAL_EDIT, 1, [Define to enable internal editor])
  9. use_internal_edit=yes
  10. AC_MSG_NOTICE([using internal editor])
  11. edit_msg="yes"
  12. else
  13. use_internal_edit=no
  14. edit_msg="no"
  15. fi
  16. dnl ASpell support.
  17. AC_ARG_ENABLE([aspell],
  18. AS_HELP_STRING([--enable-aspell], [Enable aspell support for internal editor @<:@no@:>@]),
  19. [
  20. if test "x$enableval" = xno; then
  21. enable_aspell=no
  22. else
  23. enable_aspell=yes
  24. fi
  25. ],
  26. [enable_aspell=no]
  27. )
  28. if test x$with_internal_edit != xno -a x$enable_aspell != xno; then
  29. AC_CHECK_HEADERS([aspell.h], [], [
  30. AC_ERROR([Could not find aspell development headers])
  31. ], [])
  32. if test x"$g_module_supported" != x; then
  33. AC_DEFINE(HAVE_ASPELL, 1, [Define to enable aspell support])
  34. edit_msg="yes with aspell support"
  35. AC_MSG_NOTICE([using aspell for internal editor])
  36. else
  37. enable_aspell=no
  38. AC_MSG_NOTICE([aspell support is disabled because gmodule support is not available])
  39. fi
  40. fi
  41. ])