diff options
author | Vlad Krupin <vlad@php.net> | 2000-07-13 20:39:14 +0000 |
---|---|---|
committer | Vlad Krupin <vlad@php.net> | 2000-07-13 20:39:14 +0000 |
commit | 9936548993a8d3b458951efe9bcd7825cd59e998 (patch) | |
tree | 004a21e80df43d5247c80bc039d9b6b6539eced0 | |
parent | d041052428356411f1573f8fdad8e5b64695085b (diff) | |
download | php-git-9936548993a8d3b458951efe9bcd7825cd59e998.tar.gz |
- Making pspell compile as a shared module
- fix a couple typos
@ Making pspell compile as a shared module
-rw-r--r-- | ext/pspell/Makefile.in | 6 | ||||
-rw-r--r-- | ext/pspell/README | 2 | ||||
-rw-r--r-- | ext/pspell/config.m4 | 48 | ||||
-rw-r--r-- | ext/pspell/php_pspell.h | 7 | ||||
-rw-r--r-- | ext/pspell/pspell.c | 5 |
5 files changed, 34 insertions, 34 deletions
diff --git a/ext/pspell/Makefile.in b/ext/pspell/Makefile.in index 5c323c8fde..769b2f5e84 100644 --- a/ext/pspell/Makefile.in +++ b/ext/pspell/Makefile.in @@ -1,5 +1,7 @@ -LTLIBRARY_NAME = libpspell.la -LTLIBRARY_SOURCES = pspell.c +LTLIBRARY_NAME = libpspell.la +LTLIBRARY_SOURCES = pspell.c +LTLIBRARY_SHARED_NAME = pspell.la +LTLIBRARY_SHARED_LIBADD = $(PSPELL_SHARED_LIBADD) include $(top_srcdir)/build/dynlib.mk diff --git a/ext/pspell/README b/ext/pspell/README index 97373af4a1..fb4289a509 100644 --- a/ext/pspell/README +++ b/ext/pspell/README @@ -12,7 +12,7 @@ should work as well. General notes ------------- -Plese, note that somewhere around version .27.x (I believe) aspell stopped +Please, note that somewhere around version .27.x (I believe) aspell stopped working with the aspell module for php. This is due to the fact that the author changed things around a bit, and suggested that people link to pspell in the future rather than to aspell. That's exactly what this module is for. diff --git a/ext/pspell/config.m4 b/ext/pspell/config.m4 index 52a962a733..a6c8643896 100644 --- a/ext/pspell/config.m4 +++ b/ext/pspell/config.m4 @@ -1,28 +1,28 @@ dnl $Id$ -AC_MSG_CHECKING(for PSPELL support) -AC_ARG_WITH(pspell, -[ --with-pspell[=DIR] Include PSPELL support.], -[ - if test "$withval" != "no"; then - if test "$withval" = "yes"; then - PSPELL_DIR=/usr/local - else - PSPELL_DIR=$withval - fi +PHP_ARG_WITH(pspell,whether to include pspell support, +[ --with-pspell[=DIR] Include PSPELL support.]) - AC_ADD_INCLUDE($PSPELL_DIR/include) - AC_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_DIR/lib) +if test "$PHP_PSPELL" != "no"; then + PHP_EXTENSION(pspell, $ext_shared) + for i in /usr/local /usr $PHP_PSPELL; do + 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 + PSPELL_INCDIR=$i + fi + done - if test ! -f "$PSPELL_DIR/include/pspell/pspell.h"; then - AC_MSG_ERROR(Could not find pspell.h in $PSPELL_DIR/include/pspell - please copy it manually from the pspell sources to $PSPELL_DIR/include/pspell) - fi - AC_DEFINE(HAVE_PSPELL,1,[Whether you have pspell]) - AC_MSG_RESULT(yes) - PHP_EXTENSION(pspell) - else - AC_MSG_ERROR(no) - fi -],[ - AC_MSG_RESULT(no) -]) + if test -z "$PSPELL_DIR"; then + AC_MSG_ERROR(Cannot find pspell) + fi + + PSPELL_LIBDIR=$PSPELL_DIR/lib + + AC_DEFINE(HAVE_PSPELL,1,[ ]) + PHP_SUBST(PSPELL_SHARED_LIBADD) + AC_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD) + AC_ADD_INCLUDE($PSPELL_INCDIR) +fi diff --git a/ext/pspell/php_pspell.h b/ext/pspell/php_pspell.h index 272272da69..c72bec8976 100644 --- a/ext/pspell/php_pspell.h +++ b/ext/pspell/php_pspell.h @@ -23,7 +23,7 @@ | If you did not, or have any questions about PHP licensing, please | | contact core@php.net. | +----------------------------------------------------------------------+ - | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | + | Authors: Vlad Krupin <phpdevel@echospace.com> | +----------------------------------------------------------------------+ */ @@ -36,9 +36,8 @@ extern zend_module_entry pspell_module_entry; #define pspell_module_ptr &pspell_module_entry -extern PHP_MINIT_FUNCTION(pspell); -extern PHP_MINFO_FUNCTION(pspell); - +PHP_MINIT_FUNCTION(pspell); +PHP_MINFO_FUNCTION(pspell); PHP_FUNCTION(pspell_new); PHP_FUNCTION(pspell_mode); PHP_FUNCTION(pspell_runtogether); diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 73a4bbb166..efb9f43091 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -18,11 +18,10 @@ /* $Id$ */ +#define IS_EXT_MODULE + #include "php.h" -#ifdef COMPILE_DL_PSPELL -#include "phpdl.h" -#endif #include <stdlib.h> #include <ctype.h> #include <stdio.h> |