X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=config%2Fspell.m4;h=1a2a1e9522fd68d3741ddf6824c2be595844f97a;hb=90f7007a2e6c78ffd031e4636ff909ab1bc2ddec;hp=d8b643cc841fb582f3ce3a7d3402e9a556971e71;hpb=45e4c6b94b0a5cf47f9aeeb43062f86dece1be83;p=lyx.git diff --git a/config/spell.m4 b/config/spell.m4 index d8b643cc84..1a2a1e9522 100644 --- a/config/spell.m4 +++ b/config/spell.m4 @@ -51,16 +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]) - - 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) + ]) AC_MSG_CHECKING([whether to use hunspell]) if $lyx_use_hunspell ; then AC_MSG_RESULT(yes) @@ -69,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