+dnl Generated headers with pre-defined types, structs, consts and decls.
+PSI_STDINC=$PHP_PSI_SRCDIR/php_psi_stdinc.h
+PSI_STDTYPES=$PHP_PSI_SRCDIR/php_psi_stdtypes.h
+PSI_TYPES=$PHP_PSI_SRCDIR/php_psi_types.h
+PSI_STRUCTS=$PHP_PSI_SRCDIR/php_psi_structs.h
+PSI_UNIONS=$PHP_PSI_SRCDIR/php_psi_unions.h
+PSI_CONSTS=$PHP_PSI_SRCDIR/php_psi_consts.h
+PSI_REDIRS=$PHP_PSI_SRCDIR/php_psi_redirs.h
+PSI_MACROS=$PHP_PSI_SRCDIR/php_psi_macros.h
+PSI_DECLS=$PHP_PSI_SRCDIR/php_psi_decls.h
+PSI_VA_DECLS=$PHP_PSI_SRCDIR/php_psi_va_decls.h
+
+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, [
+ cat >$PSI_STDTYPES <<EOF
+/* generated by configure */
+static struct psi_std_type {
+ token_t type_tag;
+ const char *type_name;
+ const char *alias;
+} psi_std_types@<:@@:>@ = {
+ {PSI_T_INT8, "int8_t", NULL},
+ {PSI_T_INT16, "int16_t", NULL},
+ {PSI_T_INT32, "int32_t", NULL},
+ {PSI_T_INT64, "int64_t", NULL},
+ {PSI_T_UINT8, "uint8_t", NULL},
+ {PSI_T_UINT16, "uint16_t", NULL},
+ {PSI_T_UINT32, "uint32_t", NULL},
+ {PSI_T_UINT64, "uint64_t", NULL},
+EOF
+ cat >$PSI_TYPES <<EOF
+/* generated by configure */
+static struct psi_predef_type {
+ token_t type_tag;
+ const char *type_name;
+ const char *alias;
+} psi_predef_types@<:@@:>@ = {
+EOF
+ cat >$PSI_STRUCTS <<EOF
+/* generated by configure */
+static struct psi_predef_struct {
+ token_t type_tag;
+ const char *type_name;
+ const char *var_name;
+ size_t offset;
+ size_t size;
+ size_t pointer_level;
+ size_t array_size;
+} psi_predef_structs@<:@@:>@ = {
+EOF
+ cat >$PSI_UNIONS <<EOF
+/* generated by configure */
+static struct psi_predef_union {
+ token_t type_tag;
+ const char *type_name;
+ const char *var_name;
+ size_t offset;
+ size_t size;
+ size_t pointer_level;
+ size_t array_size;
+} psi_predef_unions@<:@@:>@ = {
+EOF
+ cat >$PSI_CONSTS <<EOF
+/* generated by configure */
+static struct psi_predef_const {
+ token_t type_tag;
+ const char *type_name;
+ const char *var_name;
+ const char *val_text;
+ token_t val_type_tag;
+} psi_predef_consts@<:@@:>@ = {