-
-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathconfig.m4
45 lines (35 loc) · 1.02 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
PHP_ARG_ENABLE(phalcon, whether to enable phalcon, [ --enable-phalcon Enable Phalcon])
if test "$PHP_PHALCON" = "yes"; then
PHP_VERSION=$($PHP_CONFIG --vernum)
PHP_STRING=$($PHP_CONFIG --version)
AC_MSG_CHECKING(PHP version)
if test $PHP_VERSION -lt 80000; then
AC_MSG_ERROR(PHP version $PHP_STRING is not supported)
fi
if ! test "x" = "x"; then
PHP_EVAL_LIBLINE(, PHALCON_SHARED_LIBADD)
fi
AC_DEFINE(HAVE_PHALCON, 1, [Whether you have Phalcon])
PHP_NEW_EXTENSION(phalcon, phalcon.zep.c, $ext_shared)
PHP_SUBST(PHALCON_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([phalcon], [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"]]
)
CPPFLAGS=$old_CPPFLAGS
PHP_INSTALL_HEADERS([ext/phalcon], [php_phalcon.h])
fi