-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)
-
- if test -z "$PKG_CONFIG"
- then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, false)
- fi
-
- export PKG_CONFIG_PATH="/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
+PHP_ARG_ENABLE(psi, whether to enable PHP System Interface support,
+[ --enable-psi Enable PSI (PHP System Interface) support])
+
+if test "$PHP_PSI" != no; then
+
+ PHP_ARG_ENABLE(psi-maintainer-mode, whether to enable maintainer mode,
+ [ --enable-psi-maintainer-mode
+ PSI: enable maintainer mode
+ . make dependencies], [no], [no])
+ PHP_ARG_ENABLE(psi-threaded-parser, whether to enable threaded parser,
+ [ --enable-psi-threaded-parser
+ PSI: enable threads for startup parsing], [yes], [no])
+
+ PHP_ARG_WITH(psi-libjit, where to find libjit,
+ [ --with-psi-libjit=DIR PSI: path to libjit], [ ], [ ])
+
+ PHP_ARG_WITH(psi-libffi, where to find libffi,
+ [ --with-psi-libffi=DIR PSI: path to libffi], [ ], [ ])
+
+ AC_HEADER_ASSERT dnl # adds --disable-assert to define NDEBUG
+
+ PSI_CONFIG_INIT