-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.m4
57 lines (46 loc) · 1.51 KB
/
config.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PHP_ARG_ENABLE(memcp, whether to enable memcp, [ --enable-memcp Enable Memcp])
if test "$PHP_MEMCP" = "yes"; then
if ! test "x" = "x"; then
PHP_EVAL_LIBLINE(, MEMCP_SHARED_LIBADD)
fi
AC_DEFINE(HAVE_MEMCP, 1, [Whether you have Memcp])
memcp_sources="memcp.c kernel/main.c kernel/memory.c kernel/exception.c kernel/hash.c kernel/debug.c kernel/backtrace.c kernel/object.c kernel/array.c kernel/extended/array.c kernel/string.c kernel/fcall.c kernel/extended/fcall.c kernel/require.c kernel/file.c kernel/operators.c kernel/math.c kernel/concat.c kernel/variables.c kernel/filter.c kernel/iterator.c kernel/time.c kernel/exit.c memcp/greeting.zep.c "
PHP_NEW_EXTENSION(memcp, $memcp_sources, $ext_shared,, )
PHP_SUBST(MEMCP_SHARED_LIBADD)
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $INCLUDES"
AC_CHECK_DECL(
[HAVE_BUNDLED_PCRE],
[
AC_CHECK_HEADERS(
[ext/pcre/php_pcre.h],
[
PHP_ADD_EXTENSION_DEP([memcp], [pcre])
AC_DEFINE([ZEPHIR_USE_PHP_PCRE], [1], [Whether PHP pcre extension is present at compile time])
],
,
[[#include "main/php.h"]]
)
],
,
[[#include "php_config.h"]]
)
AC_CHECK_DECL(
[HAVE_JSON],
[
AC_CHECK_HEADERS(
[ext/json/php_json.h],
[
PHP_ADD_EXTENSION_DEP([memcp], [json])
AC_DEFINE([ZEPHIR_USE_PHP_JSON], [1], [Whether PHP json extension is present at compile time])
],
,
[[#include "main/php.h"]]
)
],
,
[[#include "php_config.h"]]
)
CPPFLAGS=$old_CPPFLAGS
PHP_INSTALL_HEADERS([ext/memcp], [php_MEMCP.h])
fi