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 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)
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"
27 # Macro to add for using pspell spellchecker libraries! -*- sh -*-
28 # @author@: Jürgen Vigna
29 AC_DEFUN([CHECK_WITH_PSPELL],
32 AC_ARG_WITH(pspell, AC_HELP_STRING([--with-pspell],[use PSpell libraries]))
33 test "$with_pspell" = "no" && lyx_use_pspell=false
35 if $lyx_use_pspell ; then
36 AC_CHECK_HEADERS(pspell/pspell.h,, lyx_use_pspell=false)
37 AC_CHECK_LIB(pspell, main, LIBS="-lpspell $LIBS", lyx_use_pspell=false)
39 AC_MSG_CHECKING([whether to use pspell])
40 if $lyx_use_pspell ; then
42 AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
43 lyx_flags="$lyx_flags use-pspell"
50 ### Check if we want spell libraries, prefer new aspell
51 AC_DEFUN([LYX_CHECK_SPELL_ENGINES],
57 dnl Prefer use of the aspell library over pspell.
59 if $lyx_use_aspell ; then : ; else
63 dnl check for the ability to communicate through unix pipes
64 dnl with an external ispell process.
65 dnl Do this independent of the existence of the aspell, pspell libraries.
68 AC_CHECK_FUNCS(fork,, [lyx_use_ispell=false])
70 AC_MSG_CHECKING([whether to use ispell])
71 if $lyx_use_ispell ; then
73 AC_DEFINE(USE_ISPELL, 1, [Define as 1 to use an external ispell process to check spelling])
74 lyx_flags="$lyx_flags use-ispell"
79 AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell)
80 AM_CONDITIONAL(USE_PSPELL, $lyx_use_pspell)
81 AM_CONDITIONAL(USE_ISPELL, $lyx_use_ispell)