- AC_CHECK_HEADERS(hunspell/hunspell.hxx,
- [lyx_use_hunspell=true; break;],
- [lyx_use_hunspell=false])
-
- if test x$lyx_use_hunspell = xtrue ; then
- AC_CHECK_LIB(hunspell, main, LIBS="-lhunspell $LIBS", lyx_use_hunspell=false)
- if test x$lyx_use_hunspell = xfalse ; then
- AC_CHECK_LIB(hunspell-1.2, main, [LIBS="-lhunspell-1.2 $LIBS" lyx_use_hunspell=true], lyx_use_hunspell=false)
- fi
- fi
+ 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)
+ ])