1dnl 2dnl $Id$ 3dnl 4 5PHP_ARG_WITH(pspell,for PSPELL support, 6[ --with-pspell[=DIR] Include PSPELL support. 7 GNU Aspell version 0.50.0 or higher required]) 8 9if 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 13 else 14 PSPELL_SEARCH_DIRS="/usr/local /usr" 15 fi 16 for i in $PSPELL_SEARCH_DIRS; do 17 if test -f $i/include/pspell/pspell.h; then 18 PSPELL_DIR=$i 19 PSPELL_INCDIR=$i/include/pspell 20 elif test -f $i/include/pspell.h; then 21 PSPELL_DIR=$i 22 PSPELL_INCDIR=$i/include 23 fi 24 done 25 26 if test -z "$PSPELL_DIR"; then 27 AC_MSG_ERROR(Cannot find pspell) 28 fi 29 30 PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR 31 32 PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD) 33 34 dnl Add -laspell to LIBS if it exists 35 PHP_CHECK_LIBRARY(aspell,new_aspell_config, 36 [ 37 PHP_ADD_LIBRARY_WITH_PATH(aspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD) 38 ], [], [ 39 -L$PSPELL_LIBDIR 40 ]) 41 42 PHP_ADD_INCLUDE($PSPELL_INCDIR) 43 PHP_SUBST(PSPELL_SHARED_LIBADD) 44 AC_DEFINE(HAVE_PSPELL,1,[ ]) 45fi 46