From 09abd27acfa9ddadcc04f34a438c63172f0f9abf Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Fri, 7 Mar 2008 16:38:55 +0000 Subject: [PATCH] Fix Hunspell support for the older versions (1.1.10 and older?) Originally committed to SVN as r1955. --- aegisub/Makefile.am | 2 +- configure.in | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index e468839fc..09d5ee41d 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -94,7 +94,7 @@ endif if HAVE_HUNSPELL noinst_LIBRARIES += libmisc_hunspell.a libmisc_hunspell_a_SOURCES = spellchecker_hunspell.cpp -aegisub_LDFLAGS += @HUNSPELL_LDFLAGS@ +aegisub_LDFLAGS += @HUNSPELL_LIBS@ aegisub_LDADD += libmisc_hunspell.a endif diff --git a/configure.in b/configure.in index ab5e80bbe..928d822a4 100644 --- a/configure.in +++ b/configure.in @@ -285,16 +285,16 @@ PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.4, [AC_MSG_FAILURE([aegisub requires >= fontconfig >= 2.4])]) -AC_ARG_WITH(hunspell, [ --without-hunspell build without hunspell support], hunspell_disabled="(disabled)") -if test "$with_hunspell" != "no"; then - AC_CHECK_LIB([hunspell], [main],[HUNSPELL_LDFLAGS="-lhunspell"; with_hunspell="yes"], [with_hunspell=no]) -fi -if test "$with_hunspell" = "yes"; then - AC_DEFINE(WITH_HUNSPELL, 1, [Enable hunspell support]) +AC_ARG_WITH(hunspell, [ --without-hunspell build without hunspell support (default: auto)], hunspell_disabled="(disabled)") +if test "x$with_hunspell" != xno; then + PKG_CHECK_MODULES(HUNSPELL, hunspell <= 1.1.10, [with_old_hunspell=yes], [with_old_hunspell=no]) +fi +AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_old_hunspell" != "no"]) +if test "$with_old_hunspell" = "yes"; then + AC_DEFINE(WITH_OLD_HUNSPELL, 1, [Enable Older Hunspell support.]) + HUNSPELL_CFLAGS="$HUNSPELL_CFLAGS -DWITH_OLD_HUNSPELL" fi -AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_hunspell" != "no"]) -AC_SUBST(HUNSPELL_LDFLAGS)