Author: sanda
Date: Tue Jun 14 16:32:42 2011
New Revision: 39040
URL: http://www.lyx.org/trac/changeset/39040

Log:
Using pkgconfig to configure hunspell.
(hunspell 1.3 is not correctly recognized otherwise).

Patch from Rex Dieter, posted by Jose.

Modified:
   lyx-devel/trunk/config/spell.m4
   lyx-devel/trunk/src/Makefile.am

Modified: lyx-devel/trunk/config/spell.m4
==============================================================================
--- lyx-devel/trunk/config/spell.m4     Tue Jun 14 15:39:39 2011        (r39039)
+++ lyx-devel/trunk/config/spell.m4     Tue Jun 14 16:32:42 2011        (r39040)
@@ -51,11 +51,7 @@
        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], [], [lyx_use_hunspell=false])
        AC_MSG_CHECKING([whether to use hunspell])
        if $lyx_use_hunspell ; then
                AC_MSG_RESULT(yes)
@@ -64,7 +60,8 @@
        else
                AC_MSG_RESULT(no)
        fi
-       ])
+    fi
+    ])
 
 
 ### Check if we want spell libraries, prefer new aspell or hunspell

Modified: lyx-devel/trunk/src/Makefile.am
==============================================================================
--- lyx-devel/trunk/src/Makefile.am     Tue Jun 14 15:39:39 2011        (r39039)
+++ lyx-devel/trunk/src/Makefile.am     Tue Jun 14 16:32:42 2011        (r39040)
@@ -4,7 +4,7 @@
 
 DISTCLEANFILES += libintl.h
 
-AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) 
$(ENCHANT_CFLAGS)
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) 
$(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS)
 AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES)
 
 if BUILD_CLIENT_SUBDIR
@@ -16,7 +16,7 @@
 EXTRA_DIST = pch.h
 
 OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(MYTHES_LIBS) \
-                $(ENCHANT_LIBS) @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI)
+                $(ENCHANT_LIBS) $(HUNSPELL_LIBS) @LIBS@ $(SOCKET_LIBS) 
$(LIBSHLWAPI) $(LIBPSAPI)
 
 noinst_LIBRARIES = liblyxcore.a
 bin_PROGRAMS = lyx

Reply via email to