- if $lyx_use_pspell ; then
- AC_CHECK_HEADERS(pspell/pspell.h,, lyx_use_pspell=false)
- AC_CHECK_LIB(pspell, main, LIBS="-lpspell $LIBS", lyx_use_pspell=false)
-
- AC_MSG_CHECKING([whether to use pspell])
- if $lyx_use_pspell ; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
- lyx_flags="$lyx_flags use-pspell"
+ if $lyx_use_hunspell ; then
+ PKG_CHECK_MODULES([HUNSPELL], [hunspell], [], [
+ AC_CHECK_HEADERS(hunspell/hunspell.hxx,
+ [lyx_use_hunspell=true; break;],
+ [lyx_use_hunspell=false])
+ AC_CHECK_LIB(hunspell, main, LIBS="-lhunspell $LIBS", lyx_use_hunspell=false)
+ ])
+ AC_MSG_CHECKING([whether to use hunspell])
+ if $lyx_use_hunspell ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_HUNSPELL, 1, [Define as 1 to use the hunspell library])
+ lyx_flags="$lyx_flags use-hunspell"