summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pspell/config.m413
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/pspell/config.m4 b/ext/pspell/config.m4
index 2f0581eaf3..3ed404237c 100644
--- a/ext/pspell/config.m4
+++ b/ext/pspell/config.m4
@@ -29,8 +29,17 @@ if test "$PHP_PSPELL" != "no"; then
PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR
- AC_DEFINE(HAVE_PSPELL,1,[ ])
- PHP_SUBST(PSPELL_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
+
+ dnl Add -laspell to LIBS if it exists
+ PHP_CHECK_LIBRARY(aspell,new_aspell_config,
+ [
+ PHP_ADD_LIBRARY_WITH_PATH(aspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
+ ], [], [
+ -L$PSPELL_LIBDIR
+ ])
+
PHP_ADD_INCLUDE($PSPELL_INCDIR)
+ PHP_SUBST(PSPELL_SHARED_LIBADD)
+ AC_DEFINE(HAVE_PSPELL,1,[ ])
fi