1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/enchant/config.m4
Peter Kokot 1ceadaed52 Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144)
This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments
and syncs the CS across the php-src Autotools build system.
2024-07-29 00:14:59 +02:00

41 lines
1.2 KiB
Plaintext

PHP_ARG_WITH([enchant],
[whether to build with Enchant support],
[AS_HELP_STRING([--with-enchant],
[Include Enchant support])])
if test "$PHP_ENCHANT" != "no"; then
PKG_CHECK_MODULES([ENCHANT2], [enchant-2], [found_enchant_2=yes], [found_enchant_2=no])
if test "$found_enchant_2" = "yes"; then
PHP_EVAL_INCLINE([$ENCHANT2_CFLAGS])
PHP_EVAL_LIBLINE([$ENCHANT2_LIBS], [ENCHANT_SHARED_LIBADD])
AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ enchant_get_version since 1.6.0 ])
else
AC_MSG_WARN([libenchant-2 not found trying with old libenchant])
PKG_CHECK_MODULES([ENCHANT], [enchant >= 1.4.2])
PHP_EVAL_INCLINE([$ENCHANT_CFLAGS])
PHP_EVAL_LIBLINE([$ENCHANT_LIBS], [ENCHANT_SHARED_LIBADD])
PHP_CHECK_LIBRARY([enchant], [enchant_get_version],
[AC_DEFINE([HAVE_ENCHANT_GET_VERSION], [1],
[enchant_get_version since 1.6.0 ])],
[],
[$ENCHANT_LIBS])
PHP_CHECK_LIBRARY([enchant], [enchant_broker_set_param],
[AC_DEFINE([HAVE_ENCHANT_BROKER_SET_PARAM], [1],
[enchant_broker_set_param since 1.5.0 and removed in 2.x])],
[],
[$ENCHANT_LIBS])
fi
AC_DEFINE(HAVE_ENCHANT, 1, [ ])
PHP_NEW_EXTENSION([enchant], [enchant.c], [$ext_shared])
PHP_SUBST([ENCHANT_SHARED_LIBADD])
fi