2001-11-30 19:00:13 +00:00
|
|
|
dnl
|
2000-07-10 21:29:19 +00:00
|
|
|
dnl $Id$
|
2001-11-30 19:00:13 +00:00
|
|
|
dnl
|
2000-07-10 21:29:19 +00:00
|
|
|
|
2001-11-30 19:00:13 +00:00
|
|
|
PHP_ARG_WITH(pspell,for PSPELL support,
|
2002-10-09 19:25:17 +00:00
|
|
|
[ --with-pspell[=DIR] Include PSPELL support.
|
2005-05-29 23:17:16 +00:00
|
|
|
GNU Aspell version 0.50.0 or higher required])
|
2000-07-10 21:29:19 +00:00
|
|
|
|
2000-07-13 20:39:14 +00:00
|
|
|
if test "$PHP_PSPELL" != "no"; then
|
2002-03-12 16:44:00 +00:00
|
|
|
PHP_NEW_EXTENSION(pspell, pspell.c, $ext_shared)
|
2001-05-17 00:26:12 +00:00
|
|
|
if test "$PHP_PSPELL" != "yes"; then
|
|
|
|
PSPELL_SEARCH_DIRS=$PHP_PSPELL
|
|
|
|
else
|
|
|
|
PSPELL_SEARCH_DIRS="/usr/local /usr"
|
|
|
|
fi
|
|
|
|
for i in $PSPELL_SEARCH_DIRS; do
|
2000-07-13 20:39:14 +00:00
|
|
|
if test -f $i/include/pspell/pspell.h; then
|
|
|
|
PSPELL_DIR=$i
|
|
|
|
PSPELL_INCDIR=$i/include/pspell
|
|
|
|
elif test -f $i/include/pspell.h; then
|
|
|
|
PSPELL_DIR=$i
|
2001-05-17 00:32:45 +00:00
|
|
|
PSPELL_INCDIR=$i/include
|
2000-07-13 20:39:14 +00:00
|
|
|
fi
|
|
|
|
done
|
2000-07-10 21:29:19 +00:00
|
|
|
|
2000-07-13 20:39:14 +00:00
|
|
|
if test -z "$PSPELL_DIR"; then
|
|
|
|
AC_MSG_ERROR(Cannot find pspell)
|
|
|
|
fi
|
|
|
|
|
2004-11-03 14:32:52 +00:00
|
|
|
PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR
|
2000-07-13 20:39:14 +00:00
|
|
|
|
2001-03-27 20:35:04 +00:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
|
2005-02-17 03:51:19 +00:00
|
|
|
|
|
|
|
dnl Add -laspell to LIBS if it exists
|
|
|
|
PHP_CHECK_LIBRARY(aspell,new_aspell_config,
|
|
|
|
[
|
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(aspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
|
|
|
|
], [], [
|
|
|
|
-L$PSPELL_LIBDIR
|
|
|
|
])
|
|
|
|
|
2001-03-27 20:35:04 +00:00
|
|
|
PHP_ADD_INCLUDE($PSPELL_INCDIR)
|
2005-02-17 03:51:19 +00:00
|
|
|
PHP_SUBST(PSPELL_SHARED_LIBADD)
|
|
|
|
AC_DEFINE(HAVE_PSPELL,1,[ ])
|
2000-07-13 20:39:14 +00:00
|
|
|
fi
|