mc-with-edit.m4 1.4 KB

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