2001-07-05 14:00:36 +00:00
|
|
|
|
# Macro to add for using pspell spellchecker libraries! -*- sh -*-
|
2000-08-28 13:13:45 +00:00
|
|
|
|
# @author@: J<>rgen Vigna
|
|
|
|
|
|
|
|
|
|
AC_DEFUN(CHECK_WITH_PSPELL,
|
|
|
|
|
[
|
2003-03-03 23:19:01 +00:00
|
|
|
|
AC_MSG_CHECKING([for pspell support])
|
2000-08-28 13:13:45 +00:00
|
|
|
|
AC_ARG_WITH(pspell,
|
2003-03-03 23:19:01 +00:00
|
|
|
|
AC_HELP_STRING([--with-pspell],[use PSpell libraries]),
|
|
|
|
|
[
|
|
|
|
|
case "$withval" in
|
|
|
|
|
y*) USE_PSPELL="yes";;
|
|
|
|
|
*) USE_PSPELL="no";;
|
|
|
|
|
esac
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
USE_PSPELL="yes"
|
|
|
|
|
])
|
2000-08-28 13:13:45 +00:00
|
|
|
|
|
2003-03-03 23:19:01 +00:00
|
|
|
|
AC_ARG_WITH(pspell-includes,
|
|
|
|
|
AC_HELP_STRING([--with-pspell-include],[where the pspell.h is located]),
|
|
|
|
|
pspell_use_include="$withval",
|
|
|
|
|
[])
|
2000-08-28 13:13:45 +00:00
|
|
|
|
|
2003-03-03 23:19:01 +00:00
|
|
|
|
AC_ARG_WITH(pspell-libs,
|
|
|
|
|
AC_HELP_STRING([--with-pspell-lib],[where the libpspell.a is located]),
|
|
|
|
|
pspell_use_lib="$withval",
|
|
|
|
|
[])
|
2000-08-28 13:13:45 +00:00
|
|
|
|
|
2003-03-03 23:19:01 +00:00
|
|
|
|
if test "$USE_PSPELL" = "yes" ; then
|
|
|
|
|
AC_CHECK_HEADER(pspell/pspell.h)
|
|
|
|
|
AC_CHECK_LIB(pspell, delete_pspell_config)
|
2000-08-28 13:13:45 +00:00
|
|
|
|
|
2003-03-03 23:19:01 +00:00
|
|
|
|
if test "$pspell_use_include" = "NO" || \
|
|
|
|
|
test "$pspell_use_lib" = "NO"; then
|
|
|
|
|
if test "$USE_PSPELL" = "yes"; then
|
|
|
|
|
USE_PSPELL="not found"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2000-08-28 13:13:45 +00:00
|
|
|
|
|
2003-03-03 23:19:01 +00:00
|
|
|
|
if test "$USE_PSPELL" = "yes"; then
|
|
|
|
|
AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
|
|
|
|
|
# PSPELL_INCLUDES="-I$pspell_use_include"
|
|
|
|
|
# PSPELL_LIBS="-L$pspell_use_lib -lpspell"
|
|
|
|
|
# USE_PSPELL="yes ($pspell_use_include $pspell_use_lib)"
|
|
|
|
|
AC_SUBST(PSPELL_INCLUDES)
|
|
|
|
|
AC_SUBST(PSPELL_LIBS)
|
|
|
|
|
lyx_flags="$lyx_flags use-pspell"
|
|
|
|
|
fi
|
2000-08-28 13:13:45 +00:00
|
|
|
|
fi
|
|
|
|
|
AC_MSG_RESULT($USE_PSPELL)
|
2003-03-03 23:19:01 +00:00
|
|
|
|
])
|