forked from facebookarchive/xhp-php5-extension
-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.m4
33 lines (29 loc) · 887 Bytes
/
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
PHP_ARG_ENABLE(xhp, xhp,
[ --enable-xhp Enable XHP])
PHP_REQUIRE_CXX()
if test "$PHP_XHP" = "yes"; then
# XHP_SHARED_DEPENDENCIES="libxhp.a"
AC_MSG_CHECKING([for flex])
FLEX=`which flex35 2>/dev/null || which flex 2>/dev/null`
if test -z "$FLEX"; then
AC_MSG_ERROR([not found])
fi
AC_MSG_RESULT([found $FLEX])
AC_MSG_CHECKING([for bison])
BISON=`which bison 2>/dev/null`
if test -z "$BISON"; then
AC_MSG_ERROR([not found])
fi
AC_MSG_RESULT([found $BISON])
AC_MSG_CHECKING([for re2c])
RE2C=`which re2c 2>/dev/null`
if test -z "$RE2C"; then
AC_MSG_ERROR([not found])
fi
AC_MSG_RESULT([found $RE2C])
PHP_ADD_LIBRARY(stdc++,, XHP_SHARED_LIBADD)
PHP_SUBST(XHP_SHARED_LIBADD)
PHP_NEW_EXTENSION(xhp, ext.cpp ext_tokeniz.cpp, $ext_shared)
PHP_ADD_LIBRARY_WITH_PATH(xhp, $ext_srcdir/xhp/, XHP_SHARED_LIBADD)
PHP_ADD_MAKEFILE_FRAGMENT
fi