From 9359d73ddeda5fd6086a8de3ceac826901bdb332 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 14 Jun 2011 14:32:42 +0000 Subject: [PATCH] Using pkgconfig to configure hunspell. (hunspell 1.3 is not correctly recognized otherwise). Patch from Rex Dieter, posted by Jose. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39040 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/spell.m4 | 9 +++------ src/Makefile.am | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/config/spell.m4 b/config/spell.m4 index ec4c75e526..71a0b7bcad 100644 --- a/config/spell.m4 +++ b/config/spell.m4 @@ -51,11 +51,7 @@ 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], [], [lyx_use_hunspell=false]) AC_MSG_CHECKING([whether to use hunspell]) if $lyx_use_hunspell ; then AC_MSG_RESULT(yes) @@ -64,7 +60,8 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], else AC_MSG_RESULT(no) fi - ]) + fi + ]) ### Check if we want spell libraries, prefer new aspell or hunspell diff --git a/src/Makefile.am b/src/Makefile.am index 02b9b29bb4..6a38664d96 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/config/common.am 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 @@ SUBDIRS = support frontends . $(CLIENT) tex2lyx 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