Hi,

>I'll see what I can do. Or if you can tell me which symbol name it is now,
>I can modify some stuff, using HAVE_NEW_ASPELL as a pre-processor symbol.

Ok, the fix should probably be in interfaces/cc/pspell.h in the new aspell,
but for now, I've set HAVE_NEW_ASPELL as a symbol, when it's detected:
$ diff -u ext/pspell/config.m4.dist ext/pspell/config.m4
--- ext/pspell/config.m4.dist   Fri Nov 30 19:59:53 2001
+++ ext/pspell/config.m4        Sat Mar 23 14:28:42 2002
@@ -26,10 +26,19 @@
                 AC_MSG_ERROR(Cannot find pspell)
         fi

+       PHP_ADD_INCLUDE($PSPELL_INCDIR)
         PSPELL_LIBDIR=$PSPELL_DIR/lib

+       AC_CHECK_LIB(pspell, PspellConfig, PSPELL_LIBNAME=pspell, [
+               AC_CHECK_LIB(aspell, new_aspell_config, [
+                       PSPELL_LIBNAME=aspell
+                       PHP_ADD_LIBRARY(stdc++)
+                       AC_DEFINE(HAVE_NEW_ASPELL,1,[ ])
+               ], [], -lstdc++)
+       ])
+       if test -z "$PSPELL_LIBNAME"; then
+               AC_MSG_ERROR(Cannot find pspell library)
+       fi
         AC_DEFINE(HAVE_PSPELL,1,[ ])
-       PHP_SUBST(PSPELL_SHARED_LIBADD)
-       PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
-       PHP_ADD_INCLUDE($PSPELL_INCDIR)
+       PHP_ADD_LIBRARY_WITH_PATH($PSPELL_LIBNAME, $PSPELL_LIBDIR, 
PSPELL_SHARED_LIBADD)
  fi

And a slight modification of the php_pspell.h header:
$ diff -u ext/pspell/php_pspell.h.dist ext/pspell/php_pspell.h
--- ext/pspell/php_pspell.h.dist        Sat Mar 23 14:50:38 2002
+++ ext/pspell/php_pspell.h     Sat Mar 23 15:05:46 2002
@@ -48,4 +48,7 @@
  #endif

  #define phpext_pspell_ptr pspell_module_ptr
+#ifdef HAVE_NEW_ASPELL
+       #define delete_pspell_string_emulation delete_aspell_string_enumeration
+#endif
  #endif /* _PSPELL_H */

As small test, simply initializing the english dictionary works:
Running tests in /chroot/home/mdev/php-4.2.0RC1//ext/pspell/tests
=================================================================
Pspell new config                                                    ... passed

Now I'm working out some more complex tests.



Best regards,

Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\

Reply via email to