summaryrefslogtreecommitdiffstats
path: root/m4.include/mc-with-internal-edit.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:12 +0000
commit8ccb487c21368a7fdc8c7c72315325bf0aa06147 (patch)
treeb2056fae01d325924508a41731edfbd4c3cddd23 /m4.include/mc-with-internal-edit.m4
parentInitial commit. (diff)
downloadmc-8ccb487c21368a7fdc8c7c72315325bf0aa06147.tar.xz
mc-8ccb487c21368a7fdc8c7c72315325bf0aa06147.zip
Adding upstream version 3:4.8.29.upstream/3%4.8.29upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4.include/mc-with-internal-edit.m4')
-rw-r--r--m4.include/mc-with-internal-edit.m446
1 files changed, 46 insertions, 0 deletions
diff --git a/m4.include/mc-with-internal-edit.m4 b/m4.include/mc-with-internal-edit.m4
new file mode 100644
index 0000000..a801e1d
--- /dev/null
+++ b/m4.include/mc-with-internal-edit.m4
@@ -0,0 +1,46 @@
+dnl
+dnl Internal editor support.
+dnl
+AC_DEFUN([mc_WITH_INTERNAL_EDIT], [
+
+ AC_ARG_WITH([internal_edit],
+ AS_HELP_STRING([--with-internal-edit], [Enable internal editor @<:@yes@:>@]))
+
+ if test x$with_internal_edit != xno; then
+ AC_DEFINE(USE_INTERNAL_EDIT, 1, [Define to enable internal editor])
+ use_internal_edit=yes
+ AC_MSG_NOTICE([using internal editor])
+ edit_msg="yes"
+ else
+ use_internal_edit=no
+ edit_msg="no"
+ fi
+
+ dnl ASpell support.
+ AC_ARG_ENABLE([aspell],
+ AS_HELP_STRING([--enable-aspell], [Enable aspell support for internal editor @<:@no@:>@]),
+ [
+ if test "x$enableval" = xno; then
+ enable_aspell=no
+ else
+ enable_aspell=yes
+ fi
+ ],
+ [enable_aspell=no]
+ )
+
+ if test x$with_internal_edit != xno -a x$enable_aspell != xno; then
+ AC_CHECK_HEADERS([aspell.h], [], [
+ AC_MSG_ERROR([Could not find aspell development headers])
+ ], [])
+
+ 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
+ AC_MSG_NOTICE([aspell support is disabled because gmodule support is not available])
+ fi
+ fi
+])