]> granicus.if.org Git - php/commitdiff
- Making pspell compile as a shared module
authorVlad Krupin <vlad@php.net>
Thu, 13 Jul 2000 20:39:14 +0000 (20:39 +0000)
committerVlad Krupin <vlad@php.net>
Thu, 13 Jul 2000 20:39:14 +0000 (20:39 +0000)
- fix a couple typos
@ Making pspell compile as a shared module

ext/pspell/Makefile.in
ext/pspell/README
ext/pspell/config.m4
ext/pspell/php_pspell.h
ext/pspell/pspell.c

index 5c323c8fdef54f3e4b710877ab8c9cbf6c0c1cc3..769b2f5e84ffba53838a552ed075bed899ef55ba 100644 (file)
@@ -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
index 97373af4a100688b76d0656fed9d9b2003866d60..fb4289a5097357beded02ea484dda9ff697fdede 100644 (file)
@@ -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.
index 52a962a733ba5deb310a0942a1627dda6cc66026..a6c864389649e881aaedd0de77cc602f98ac2831 100644 (file)
@@ -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
index 272272da69dd76595a661a336fca49680490e5a9..c72bec8976bbae8c0a9e2a4e17894fc190cd81ec 100644 (file)
@@ -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);
index 73a4bbb1664db908d1ebfaaef4c3153d987e4a19..efb9f430915f9a0914d96e52fa175c7cbee777c5 100644 (file)
 
 /* $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>