X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Fspell.m4;h=1a2a1e9522fd68d3741ddf6824c2be595844f97a;hb=467422f9df784e2e6bab4f0cc8fcfbc166c59bd4;hp=ec4c75e526bfa2b274a3e650eba5b10ab9f6dc4f;hpb=6b88f5bcb78a701a14df784a0c488e4a29f2b7a3;p=lyx.git diff --git a/config/spell.m4 b/config/spell.m4 index ec4c75e526..1a2a1e9522 100644 --- a/config/spell.m4 +++ b/config/spell.m4 @@ -51,11 +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, - [AC_SEARCH_LIBS(Hunspell_spell, - [hunspell hunspell-1.2],, [lyx_use_hunspell=false])], - [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) @@ -64,7 +65,8 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], else AC_MSG_RESULT(no) fi - ]) + fi + ]) ### Check if we want spell libraries, prefer new aspell or hunspell