dnl PSI_CONFIG_INIT()
dnl Creates stubs of the headers with pre-defined types etc.
dnl These headers are included by src/context.c.
dnl This macro must be called prior any checks for a type, struct, decl etc.
AC_DEFUN(PSI_CONFIG_INIT, [
dnl PSI_CONFIG_INIT()
dnl Creates stubs of the headers with pre-defined types etc.
dnl These headers are included by src/context.c.
dnl This macro must be called prior any checks for a type, struct, decl etc.
AC_DEFUN(PSI_CONFIG_INIT, [
AC_DEFUN(PSI_CONFIG_DONE, [
cat >$PSI_STDINC <<EOF
/* generated by configure */
AC_DEFUN(PSI_CONFIG_DONE, [
cat >$PSI_STDINC <<EOF
/* generated by configure */
-AC_DEFUN(PSI_INCLUDES, [AC_INCLUDES_DEFAULT()
+AC_DEFUN(PSI_INCLUDES, [dnl
+#define PSI_INCLUDES
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+#ifndef _REENTRANT
+# define _REENTRANT
+#endif
+AC_INCLUDES_DEFAULT()
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+# ifndef HAVE__BOOL
+# ifdef __cplusplus
+typedef bool _Bool;
+# else
+# define _Bool signed char
+# endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
dnl Declare $LEMON precious, and check for a `lemon` in $PATH.
AC_DEFUN(PSI_LEMON, [
AC_ARG_VAR(LEMON, The lemon parser generator of the SQLite project)
dnl Declare $LEMON precious, and check for a `lemon` in $PATH.
AC_DEFUN(PSI_LEMON, [
AC_ARG_VAR(LEMON, The lemon parser generator of the SQLite project)
PHP_EVAL_INCLINE(`$PKG_CONFIG --cflags libffi`)
PHP_EVAL_LIBLINE(`$PKG_CONFIG --libs libffi`, PSI_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBFFI, 1, Have libffi)
PHP_EVAL_INCLINE(`$PKG_CONFIG --cflags libffi`)
PHP_EVAL_LIBLINE(`$PKG_CONFIG --libs libffi`, PSI_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBFFI, 1, Have libffi)
else
AC_CACHE_CHECK(for libffi, psi_cv_libffi_dir, [
for psi_cv_libffi_dir in $PHP_PSI_LIBFFI {/usr{,/local},/opt}{,/libffi}
else
AC_CACHE_CHECK(for libffi, psi_cv_libffi_dir, [
for psi_cv_libffi_dir in $PHP_PSI_LIBFFI {/usr{,/local},/opt}{,/libffi}