]> git.lyx.org Git - features.git/commitdiff
restore old hunspell library detection code as fallback when pkg-config is not availa...
authorStephan Witt <switt@lyx.org>
Mon, 15 Aug 2011 05:09:32 +0000 (05:09 +0000)
committerStephan Witt <switt@lyx.org>
Mon, 15 Aug 2011 05:09:32 +0000 (05:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39485 a592a061-630c-0410-9148-cb99ea01b6c8

config/spell.m4
status.20x

index 71a0b7bcad37da34f2b6dc6d8c107238c66e6308..1a2a1e9522fd68d3741ddf6824c2be595844f97a 100644 (file)
@@ -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)
index 100e330c6bd37ba3baa6be4b5f8815289ee37017..be75f7e32fbbd39346b12e126dc65b6c57a65f20 100644 (file)
@@ -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).