~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/pspell/config.m4

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl
 
2
dnl $Id: config.m4,v 1.9.2.1 2005/02/17 03:51:35 sniper Exp $
 
3
dnl
 
4
 
 
5
PHP_ARG_WITH(pspell,for PSPELL support,
 
6
[  --with-pspell[=DIR]     Include PSPELL support.
 
7
                          GNU Aspell version 0.50.0 or higher required.])
 
8
 
 
9
if test "$PHP_PSPELL" != "no"; then
 
10
        PHP_NEW_EXTENSION(pspell, pspell.c, $ext_shared)
 
11
        if test "$PHP_PSPELL" != "yes"; then
 
12
            PSPELL_SEARCH_DIRS=$PHP_PSPELL
 
13
        else
 
14
            PSPELL_SEARCH_DIRS="/usr/local /usr"
 
15
        fi
 
16
        for i in $PSPELL_SEARCH_DIRS; do
 
17
                if test -f $i/include/pspell/pspell.h; then
 
18
                        PSPELL_DIR=$i
 
19
                        PSPELL_INCDIR=$i/include/pspell
 
20
                elif test -f $i/include/pspell.h; then
 
21
                        PSPELL_DIR=$i
 
22
                        PSPELL_INCDIR=$i/include
 
23
                fi
 
24
        done
 
25
 
 
26
        if test -z "$PSPELL_DIR"; then
 
27
                AC_MSG_ERROR(Cannot find pspell)
 
28
        fi
 
29
 
 
30
        PSPELL_LIBDIR=$PSPELL_DIR/lib
 
31
 
 
32
        PHP_ADD_LIBRARY_WITH_PATH(pspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
 
33
 
 
34
        dnl Add -laspell to LIBS if it exists
 
35
        PHP_CHECK_LIBRARY(aspell,new_aspell_config,
 
36
        [
 
37
                PHP_ADD_LIBRARY_WITH_PATH(aspell, $PSPELL_LIBDIR, PSPELL_SHARED_LIBADD)
 
38
        ], [], [
 
39
                -L$PSPELL_LIBDIR
 
40
        ])
 
41
 
 
42
        PHP_ADD_INCLUDE($PSPELL_INCDIR)
 
43
        PHP_SUBST(PSPELL_SHARED_LIBADD)
 
44
        AC_DEFINE(HAVE_PSPELL,1,[ ])
 
45
fi