X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Fspell.m4;h=1a2a1e9522fd68d3741ddf6824c2be595844f97a;hb=6de3c19fd63f810eed90ef3bc4469faf28e949c2;hp=0fc7b3efbee516c448373eac3faafebcd6a63690;hpb=b8836fcd19deb4b9d74d2541b1a9753cad4625b1;p=lyx.git diff --git a/config/spell.m4 b/config/spell.m4 index 0fc7b3efbe..1a2a1e9522 100644 --- a/config/spell.m4 +++ b/config/spell.m4 @@ -51,14 +51,12 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], test "$with_hunspell" = "no" && lyx_use_hunspell=false if $lyx_use_hunspell ; then - 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) - 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 + 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) @@ -67,8 +65,8 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], else AC_MSG_RESULT(no) fi - fi - ]) + fi + ]) ### Check if we want spell libraries, prefer new aspell or hunspell