Add a program check for Hunspell.

Originally committed to SVN as r2120.
This commit is contained in:
Amar Takhar 2008-03-23 15:54:33 +00:00
parent 2c495b5d80
commit 1f5e67b9fc
1 changed files with 17 additions and 2 deletions

View File

@ -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 <hunspell.hxx>
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
]);