2
dnl $Id: config.m4,v 1.9.2.1 2005/02/17 03:51:35 sniper Exp $
5
PHP_ARG_WITH(pspell,for PSPELL support,
6
[ --with-pspell[=DIR] Include PSPELL support.
7
GNU Aspell version 0.50.0 or higher required.])
9
if test "$PHP_PSPELL" != "no"; then
10
PHP_NEW_EXTENSION(pspell, pspell.c, $ext_shared)
11
if test "$PHP_PSPELL" != "yes"; then
12
PSPELL_SEARCH_DIRS=$PHP_PSPELL
14
PSPELL_SEARCH_DIRS="/usr/local /usr"
16
for i in $PSPELL_SEARCH_DIRS; do
17
if test -f $i/include/pspell/pspell.h; then
19
PSPELL_INCDIR=$i/include/pspell
20
elif test -f $i/include/pspell.h; then
22
PSPELL_INCDIR=$i/include
26
if test -z "$PSPELL_DIR"; then
27
AC_MSG_ERROR(Cannot find pspell)
30
PSPELL_LIBDIR=$PSPELL_DIR/lib
32
PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
34
dnl Add -laspell to LIBS if it exists
35
PHP_CHECK_LIBRARY(aspell,new_aspell_config,
37
PHP_ADD_LIBRARY_WITH_PATH(aspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
42
PHP_ADD_INCLUDE($PSPELL_INCDIR)
43
PHP_SUBST(PSPELL_SHARED_LIBADD)
44
AC_DEFINE(HAVE_PSPELL,1,[ ])