1 # Macro to add for using pspell spellchecker libraries! -*- sh -*-
2 # @author@: Jürgen Vigna
4 AC_DEFUN(CHECK_WITH_PSPELL,
7 AC_MSG_CHECKING([for pspell support])
9 [ --with-pspell use PSpell libraries],[
10 if test "$withval" != "no"; then
15 AC_ARG_WITH(pspell-includes, [ --with-pspell-include where the pspell.h is located],
16 pspell_use_include="$withval",
17 pspell_use_include=NONE)
19 if test "$pspell_use_include" = "" || \
20 test "$pspell_use_include" = "NONE"; then
21 pspell_includes="/usr/include /usr/local/include"
22 AC_FIND_FILE(pspell/pspell.h,$pspell_includes,pspell_use_include)
25 AC_ARG_WITH(pspell-libs, [ --with-pspell-lib where the libpspell.a is located],
26 pspell_use_lib="$withval",
29 if test -n "$pspell_use_lib" && \
30 test "$pspell_use_lib" != "NONE"; then
31 pspell_lib_found="Setting to $pspell_use_lib"
33 pspell_libs="/usr/lib /usr/lib/pspell /usr/local/lib /usr/local/lib/pspell"
34 AC_FIND_FILE(libpspell.a,$pspell_libs,pspell_use_lib)
35 pspell_lib_found="yes"
38 if test "$pspell_use_include" = "NO" || \
39 test "$pspell_use_include" = "NO"; then
40 if test "$USE_PSPELL" = "yes"; then
41 USE_PSPELL="not found"
45 if test "$USE_PSPELL" = "yes"; then
46 AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
47 PSPELL_INCLUDES="-I$pspell_use_include"
48 PSPELL_LIBS="-L$pspell_use_lib -lpspell"
49 USE_PSPELL="yes ($pspell_use_include $pspell_use_lib)"
50 AC_SUBST(PSPELL_INCLUDES)
52 lyx_flags="$lyx_flags use-pspell"
54 AC_MSG_RESULT($USE_PSPELL)