From 1f5e67b9fc99816a80f300f59442bc9ae1452c95 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 23 Mar 2008 15:54:33 +0000 Subject: [PATCH] Add a program check for Hunspell. Originally committed to SVN as r2120. --- configure.in | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 023c96a58..48c805960 100644 --- a/configure.in +++ b/configure.in @@ -386,11 +386,26 @@ 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" - with_hunspell="yes (old hunspell)" + with_hunspell="yes" + with_hunspell_version="(old hunspell)" else with_hunspell="no" fi +AC_AGI_COMPILE([Hunspell], [hunspell], [$HUNSPELL_CFLAGS], [$HUNSPELL_LIBS],[ +#include +int main(void) { + Hunspell *hunspell; + hunspell = new Hunspell(NULL,NULL); + if (!hunspell) return 1; + return 0; +]) + +if test "$agi_with_hunspell" = "no"; then + AC_MSG_WARN([Hunspell detected, but it doesn't work..]) +fi + + ###################### ## universalchardetect @@ -760,6 +775,6 @@ Subtitle Providers: libass (external): $with_libass $libass_disabled libass (internal) $with_internal_libass (requires iconv, fontconfig) $libass_internal_disabled Misc Packages: - hunspell: $with_hunspell $hunspell_disabled + hunspell: $with_hunspell $with_hunspell_version $hunspell_disabled universalchardet: $with_univchardet $univchardet_disabled ]);