X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=config.m4;h=1207c0ca943a1b07f01687e838eb514e128dd064;hp=991550584e99eef07506cf760d61c1c102323964;hb=3137da963d298c73ce3bc858874fdfc87fa941b7;hpb=94fbd01435494508cb54d6321c7d745b94949475 diff --git a/config.m4 b/config.m4 index 9915505..1207c0c 100644 --- a/config.m4 +++ b/config.m4 @@ -1,35 +1,56 @@ -PHP_ARG_ENABLE(psi, whether to enable psi support, -[ --with-psi[[=path to libjit]] - Enable PHP System Interface support]) - -if test "$PHP_PSI" != "no"; then - AC_ARG_VAR(LEMON, The lemon parser generator of the SQLite project) - AC_PATH_PROG(LEMON, lemon, ./lemon) - PHP_SUBST(LEMON) - - AC_CACHE_CHECK(for libjit install root, PSI_cv_LIBJIT_DIR, [ - for PSI_cv_LIBJIT_DIR in {/usr{,/local},/opt}{,libjit} - do - if test -e $PSI_cv_LIBJIT_DIR/include/jit/jit.h - then - break - fi - PSI_cv_LIBJIT_DIR= - done]) - if test -z "$PSI_cv_LIBJIT_DIR" - then - AC_MSG_ERROR([Could not find libjit, please provide the base install path]) - fi +PHP_ARG_ENABLE(psi, whether to enable PHP System Interface support, +[ --enable-psi Enable PHP System Interface support]) + +if test "$PHP_PSI" != no; then + PHP_CONFIGURE_PART(Configuring PSI) PHP_PSI_SRCDIR=PHP_EXT_SRCDIR(psi) PHP_PSI_BUILDDIR=PHP_EXT_BUILDDIR(psi) + sinclude(config.ax_check_sign.m4) + sinclude(config.psi.m4) + sinclude(config.psi_type.m4) + sinclude(config.psi_const.m4) + sinclude(config.psi_decl.m4) + sinclude(config.psi_macro.m4) + sinclude(config.psi_struct.m4) + + sinclude(config.psi_errno.m4) + sinclude(config.psi_glob.m4) + sinclude(config.psi_stddef.m4) + sinclude(config.psi_stdio.m4) + sinclude(config.psi_stdint.m4) + sinclude(config.psi_sys_types.m4) + + PSI_LEMON + PSI_CHECK_LIBJIT + PSI_CHECK_LIBFFI + + AC_FUNC_FNMATCH + AC_HEADER_DIRENT + + PSI_CHECK_STD_TYPES + PSI_CHECK_STDINT + PSI_CHECK_STDDEF + PSI_CHECK_SYS_TYPES + PSI_CHECK_ERRNO + PSI_CHECK_GLOB + PSI_CHECK_STDIO + + echo PSI_TYPES=$PSI_TYPES + echo PSI_MACROS=$PSI_MACROS + echo PSI_REDIRS=$PSI_REDIRS + echo PSI_DECLS=$PSI_DECLS + echo PSI_STRUCTS=$PSI_STRUCTS + + PHP_SUBST(PSI_SHARED_LIBADD) + PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src) PHP_ADD_BUILD_DIR($PHP_PSI_BUILDDIR/src) PHP_PSI_HEADERS=`(cd $PHP_PSI_SRCDIR/src && echo *.h)` - PHP_PSI_SOURCES=`(cd $PHP_PSI_SRCDIR && echo src/*.c)` - PHP_PSI_SOURCES="src/parser.c src/parser_proc.c" + PHP_PSI_SOURCES="src/parser_proc.c src/parser.c src/module.c src/context.c" + PHP_PSI_SOURCES="$PHP_PSI_SOURCES src/libjit.c src/libffi.c" PHP_NEW_EXTENSION(psi, $PHP_PSI_SOURCES, $ext_shared) PHP_INSTALL_HEADERS(ext/psi, php_psi.h $PHP_PSI_HEADERS) @@ -41,4 +62,6 @@ if test "$PHP_PSI" != "no"; then PHP_SUBST(PHP_PSI_BUILDDIR) PHP_ADD_MAKEFILE_FRAGMENT + + AC_MSG_RESULT() fi