]> git.lyx.org Git - lyx.git/blob - config/pspell.m4
Angus fix to lyxrevert_228.py
[lyx.git] / config / pspell.m4
1 # Macro to add for using pspell spellchecker libraries!     -*- sh -*-
2 # @author@: Jürgen Vigna
3
4 AC_DEFUN(CHECK_WITH_PSPELL,
5 [
6     AC_ARG_WITH(pspell,
7         AC_HELP_STRING([--with-pspell],[use PSpell libraries]),
8         [
9             case "$withval" in
10                 y*) USING_PSPELL="yes";;
11                 *) USING_PSPELL="no";;
12             esac
13             ],
14         [
15             USING_PSPELL="yes"
16             ])
17
18     if test "$USING_PSPELL" = "yes" ; then
19         AC_CHECK_HEADERS(pspell/pspell.h, USING_PSPELL="yes", USING_PSPELL="no")
20         AC_CHECK_LIB(pspell, main, LIBS="-lpspell $LIBS"; USING_PSPELL="yes", USING_PSPELL="no")
21
22         if test "$USING_PSPELL" = "yes"; then
23             AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
24             lyx_flags="$lyx_flags use-pspell"
25         fi
26     fi
27     AC_MSG_CHECKING([whether to use pspell])
28     AC_MSG_RESULT($USING_PSPELL)
29     ])