flush
[m6w6/ext-psi] / config.m4
1 PHP_ARG_ENABLE(psi, whether to enable PHP System Interface support,
2 [ --enable-psi Enable PHP System Interface support])
3
4 if test "$PHP_PSI" != no; then
5 PHP_CONFIGURE_PART(Configuring PSI)
6
7 PHP_PSI_SRCDIR=PHP_EXT_SRCDIR(psi)
8 PHP_PSI_BUILDDIR=PHP_EXT_BUILDDIR(psi)
9
10 sinclude(config.ax_check_sign.m4)
11 sinclude(config.psi.m4)
12 sinclude(config.psi_type.m4)
13 sinclude(config.psi_const.m4)
14 sinclude(config.psi_decl.m4)
15 sinclude(config.psi_macro.m4)
16 sinclude(config.psi_struct.m4)
17
18 sinclude(config.psi_errno.m4)
19 sinclude(config.psi_glob.m4)
20 sinclude(config.psi_stddef.m4)
21 sinclude(config.psi_stdio.m4)
22 sinclude(config.psi_stdint.m4)
23 sinclude(config.psi_sys_types.m4)
24
25 PSI_LEMON
26 PSI_CHECK_LIBJIT
27 PSI_CHECK_LIBFFI
28
29 AC_FUNC_FNMATCH
30 AC_HEADER_DIRENT
31
32 PSI_CHECK_STD_TYPES
33 PSI_CHECK_STDINT
34 PSI_CHECK_STDDEF
35 PSI_CHECK_SYS_TYPES
36 PSI_CHECK_ERRNO
37 PSI_CHECK_GLOB
38 PSI_CHECK_STDIO
39
40 echo PSI_TYPES=$PSI_TYPES
41 echo PSI_MACROS=$PSI_MACROS
42 echo PSI_REDIRS=$PSI_REDIRS
43 echo PSI_DECLS=$PSI_DECLS
44 echo PSI_STRUCTS=$PSI_STRUCTS
45
46 PHP_SUBST(PSI_SHARED_LIBADD)
47
48 PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src)
49 PHP_ADD_BUILD_DIR($PHP_PSI_BUILDDIR/src)
50
51 PHP_PSI_HEADERS=`(cd $PHP_PSI_SRCDIR/src && echo *.h)`
52 PHP_PSI_SOURCES="src/parser_proc.c src/parser.c src/module.c src/context.c"
53 PHP_PSI_SOURCES="$PHP_PSI_SOURCES src/libjit.c src/libffi.c"
54
55 PHP_NEW_EXTENSION(psi, $PHP_PSI_SOURCES, $ext_shared)
56 PHP_INSTALL_HEADERS(ext/psi, php_psi.h $PHP_PSI_HEADERS)
57
58 PHP_SUBST(PHP_PSI_HEADERS)
59 PHP_SUBST(PHP_PSI_SOURCES)
60
61 PHP_SUBST(PHP_PSI_SRCDIR)
62 PHP_SUBST(PHP_PSI_BUILDDIR)
63
64 PHP_ADD_MAKEFILE_FRAGMENT
65
66 AC_MSG_RESULT()
67 fi