1 # Macro to add for using aspell spellchecker libraries! -*- sh -*-
2 # Only checks for "new" aspell, > 0.50
3 AC_DEFUN([CHECK_WITH_ASPELL],
6 AC_ARG_WITH(aspell, AC_HELP_STRING([--with-aspell],[use ASpell libraries]))
7 test "$with_aspell" = "no" && lyx_use_aspell=false
9 if $lyx_use_aspell ; then
10 AC_CHECK_HEADERS(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)
15 AC_MSG_CHECKING([whether to use aspell])
16 if $lyx_use_aspell ; then
18 AC_DEFINE(USE_ASPELL, 1, [Define as 1 to use the aspell library])
19 lyx_flags="$lyx_flags use-aspell"
26 # Macro to add for using hunspell spellchecker libraries! -*- sh -*-
27 AC_DEFUN([CHECK_WITH_HUNSPELL],
30 AC_ARG_WITH(hunspell, AC_HELP_STRING([--with-hunspell],[use Hunspell libraries]))
31 test "$with_hunspell" = "no" && lyx_use_hunspell=false
33 if $lyx_use_hunspell ; then
34 AC_CHECK_HEADERS(hunspell/hunspell.hxx,
35 [lyx_use_hunspell=true; break;],
36 [lyx_use_hunspell=false])
37 AC_CHECK_LIB(hunspell, main, LIBS="-lhunspell $LIBS", lyx_use_hunspell=false)
39 AC_MSG_CHECKING([whether to use hunspell])
40 if $lyx_use_hunspell ; then
42 AC_DEFINE(USE_HUNSPELL, 1, [Define as 1 to use the hunspell library])
43 lyx_flags="$lyx_flags use-hunspell"
50 ### Check if we want spell libraries, prefer new aspell or hunspell
51 AC_DEFUN([LYX_CHECK_SPELL_ENGINES],
56 AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell)
58 lyx_use_hunspell=false
61 AM_CONDITIONAL(USE_HUNSPELL, $lyx_use_hunspell)