]> git.lyx.org Git - lyx.git/blob - config/spell.m4
* GuiView.cpp (closeEvent):
[lyx.git] / config / spell.m4
1 # Macro to add for using aspell spellchecker libraries!     -*- sh -*-
2 # Only checks for "new" aspell, > 0.50
3 AC_DEFUN([CHECK_WITH_ASPELL],
4 [
5     lyx_use_aspell=true
6     AC_ARG_WITH(aspell, AC_HELP_STRING([--with-aspell],[use ASpell libraries]))
7     test "$with_aspell" = "no" && lyx_use_aspell=false
8
9     if $lyx_use_aspell ; then
10         AC_CHECK_HEADERS(aspell.h aspell/aspell.h,
11             [lyx_use_aspell=true; break;],
12             [lyx_use_aspell=false])
13         AC_CHECK_LIB(aspell, new_aspell_config, LIBS="-laspell $LIBS", lyx_use_aspell=false)
14
15         AC_MSG_CHECKING([whether to use aspell])
16         if $lyx_use_aspell ; then
17             AC_MSG_RESULT(yes)
18             AC_DEFINE(USE_ASPELL, 1, [Define as 1 to use the aspell library])
19             lyx_flags="$lyx_flags use-aspell"
20         else
21             AC_MSG_RESULT(no)
22         fi
23     fi
24     ])
25
26
27 ### Check if we want spell libraries, prefer new aspell
28 AC_DEFUN([LYX_CHECK_SPELL_ENGINES],
29 [
30     lyx_use_aspell=false
31     CHECK_WITH_ASPELL
32
33     AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell)
34     ])