|
1 | 1 | PHP_ARG_WITH([enchant],
|
2 |
| - [for ENCHANT support], |
3 |
| - [AS_HELP_STRING([[--with-enchant[=DIR]]], |
4 |
| - [Include enchant support. GNU Aspell version 1.1.3 or higher required.])]) |
| 2 | + [whether to build with Enchant support], |
| 3 | + [AS_HELP_STRING([--with-enchant], |
| 4 | + [Include Enchant support])]) |
5 | 5 |
|
6 | 6 | if test "$PHP_ENCHANT" != "no"; then
|
7 |
| - PHP_NEW_EXTENSION(enchant, enchant.c, $ext_shared) |
8 |
| - if test "$PHP_ENCHANT" != "yes"; then |
9 |
| - ENCHANT_SEARCH_DIRS=$PHP_ENCHANT |
10 |
| - else |
11 |
| - ENCHANT_SEARCH_DIRS="/usr/local /usr" |
12 |
| - fi |
13 |
| - for i in $ENCHANT_SEARCH_DIRS; do |
14 |
| - if test -f $i/include/enchant/enchant.h; then |
15 |
| - ENCHANT_DIR=$i |
16 |
| - ENCHANT_INCDIR=$i/include/enchant |
17 |
| - elif test -f $i/include/enchant.h; then |
18 |
| - ENCHANT_DIR=$i |
19 |
| - ENCHANT_INCDIR=$i/include |
20 |
| - fi |
21 |
| - done |
| 7 | + PHP_NEW_EXTENSION(enchant, enchant.c, $ext_shared) |
22 | 8 |
|
23 |
| - if test -z "$ENCHANT_DIR"; then |
24 |
| - AC_MSG_ERROR(Cannot find enchant) |
25 |
| - fi |
| 9 | + PKG_CHECK_MODULES([ENCHANT], [enchant]) |
26 | 10 |
|
27 |
| - ENCHANT_LIBDIR=$ENCHANT_DIR/lib |
| 11 | + PHP_EVAL_INCLINE($ENCHANT_CFLAGS) |
| 12 | + PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD) |
28 | 13 |
|
29 |
| - AC_DEFINE(HAVE_ENCHANT,1,[ ]) |
30 |
| - PHP_SUBST(ENCHANT_SHARED_LIBADD) |
31 |
| - PHP_ADD_LIBRARY_WITH_PATH(enchant, $ENCHANT_LIBDIR, ENCHANT_SHARED_LIBADD) |
32 |
| - PHP_ADD_INCLUDE($ENCHANT_INCDIR) |
33 |
| - PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param, |
34 |
| - [ |
35 |
| - AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ]) |
36 |
| - AC_DEFINE(ENCHANT_VERSION_STRING, "1.5.x", [ ]) |
37 |
| - ], [], [ -L$ENCHANT_LIBDIR $ENCHANT_SHARED_LIBADD]) |
| 14 | + AC_DEFINE(HAVE_ENCHANT, 1, [ ]) |
38 | 15 |
|
| 16 | + PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param, |
| 17 | + [ |
| 18 | + AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ]) |
| 19 | + AC_DEFINE(ENCHANT_VERSION_STRING, "1.5.x", [ ]) |
| 20 | + ]) |
39 | 21 | fi
|
0 commit comments