]> granicus.if.org Git - php/commitdiff
MFH:- Fixed bug #29554 (compile failure when using --with-pspell=/usr/local)
authorfoobar <sniper@php.net>
Thu, 17 Feb 2005 03:51:35 +0000 (03:51 +0000)
committerfoobar <sniper@php.net>
Thu, 17 Feb 2005 03:51:35 +0000 (03:51 +0000)
ext/pspell/config.m4

index 955ddbf7706b809199cb23ebb532aac93edb27ef..28be70dd206f0722fd5c4fe516d7f8640bffcda5 100644 (file)
@@ -29,8 +29,17 @@ if test "$PHP_PSPELL" != "no"; then
 
        PSPELL_LIBDIR=$PSPELL_DIR/lib
 
-       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