diff --git a/config/spell.m4 b/config/spell.m4 index 71a0b7bcad..1a2a1e9522 100644 --- a/config/spell.m4 +++ b/config/spell.m4 @@ -51,7 +51,12 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], test "$with_hunspell" = "no" && lyx_use_hunspell=false if $lyx_use_hunspell ; then - PKG_CHECK_MODULES([HUNSPELL], [hunspell], [], [lyx_use_hunspell=false]) + 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) diff --git a/status.20x b/status.20x index 100e330c6b..be75f7e32f 100644 --- a/status.20x +++ b/status.20x @@ -310,5 +310,8 @@ What's new - Using pkgconfig to configure hunspell (hunspell 1.3 was not correctly recognized). +- Using explicit header and library detection as fallback to configure + hunspell in case pkgconfig is missing in build environment. + - Fixed build failure on GNU/Hurd, which doesn't define PATH_MAX (bug 7467).