mc-with-internal-edit.m4 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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(
  19. [--enable-aspell@<:@=prefix@:>@],
  20. [Enable aspell support for internal editor @<:@no@:>@] and optionally set path to aspell installation prefix @<:@default=/usr@:>@),
  21. [
  22. if test "x$enableval" = xno; then
  23. enable_aspell=no
  24. else
  25. test -d "$enable_aspell/include" && CPPFLAGS="$CPPFLAGS -I$enable_aspell/include"
  26. enable_aspell=yes
  27. fi
  28. ],
  29. [enable_aspell=no]
  30. )
  31. if test x$with_internal_edit != xno -a x$enable_aspell != xno; then
  32. AC_CHECK_HEADERS([aspell.h], [], [
  33. AC_MSG_ERROR([Could not find aspell development headers])
  34. ], [])
  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_ERROR([aspell support is disabled because gmodule support is not available])
  42. fi
  43. fi
  44. ])