xref: /PHP-7.4/ext/enchant/config.m4 (revision 218c1853)
1PHP_ARG_WITH([enchant],
2  [whether to build with Enchant support],
3  [AS_HELP_STRING([--with-enchant],
4    [Include Enchant support])])
5
6if test "$PHP_ENCHANT" != "no"; then
7  PKG_CHECK_MODULES([ENCHANT], [enchant])
8
9  PHP_EVAL_INCLINE($ENCHANT_CFLAGS)
10  PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD)
11
12  AC_DEFINE(HAVE_ENCHANT, 1, [ ])
13
14  PHP_CHECK_LIBRARY(enchant, enchant_get_version,
15  [
16    AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ ])
17  ], [ ], [
18    $ENCHANT_LIBS
19  ])
20
21  PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param,
22  [
23    AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ])
24  ], [ ], [
25    $ENCHANT_LIBS
26  ])
27
28  PHP_NEW_EXTENSION(enchant, enchant.c, $ext_shared)
29  PHP_SUBST(ENCHANT_SHARED_LIBADD)
30fi
31