~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/pspell/config.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl
 
2
dnl $Id: config.m4,v 1.12 2005/05/29 23:16:43 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/$PHP_LIBDIR
 
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