Make --without-hunspell work correctly.
Originally committed to SVN as r2186.
This commit is contained in:
parent
8918fb6296
commit
ecf30d37d7
1 changed files with 10 additions and 8 deletions
18
configure.in
18
configure.in
|
@ -490,28 +490,30 @@ PKG_CHECK_MODULES(ASA, asa >= 0.3.2, with_asa="yes", with_asa="no")
|
|||
## Hunspell
|
||||
###########
|
||||
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
|
||||
|
||||
AC_AGI_COMPILE([Hunspell], [hunspell], [$HUNSPELL_CFLAGS], [$HUNSPELL_LIBS],[
|
||||
if test "$with_hunspell" != "no"; then
|
||||
PKG_CHECK_MODULES(HUNSPELL, hunspell <= 1.1.10, [with_old_hunspell=yes], [with_old_hunspell=no])
|
||||
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;
|
||||
}
|
||||
])
|
||||
} ])
|
||||
fi
|
||||
|
||||
if test "$agi_with_hunspell" = "no" && test "$with_hunspell" = "yes"; then
|
||||
AC_MSG_WARN([Hunspell detected, but it doesn't work...])
|
||||
with_old_hunspell="no"
|
||||
else
|
||||
fi
|
||||
|
||||
if test "$with_hunspell" = "yes"; then
|
||||
AC_DEFINE(WITH_HUNSPELL, 1, [Enable Hunspell support.])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_old_hunspell" != "no"])
|
||||
AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_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"
|
||||
|
|
Loading…
Reference in a new issue