X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=m4%2Fpsi%2Fpsi.m4;h=b0e30f49eff63bbf66c687e0f4dfb8539c2736fd;hp=b979719862a2db08fff771411158c4c7def3fe7d;hb=894e0ce93f9ce82109e904ae35c249bf6abe54f1;hpb=3ef8c66ab1300801bcdb15b43f9f28e77b6487b6 diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index b979719..b0e30f4 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -1,15 +1,3 @@ -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 -PSI_FN_DECLS=$PHP_PSI_SRCDIR/php_psi_fn_decls.h dnl PSI_CONFIG_INIT() dnl Creates stubs of the headers with pre-defined types etc. @@ -37,108 +25,26 @@ AC_DEFUN(PSI_CONFIG_INIT, [ fi fi - cat >$PHP_PSI_BUILDDIR/php_psi.dep <>$PHP_PSI_BUILDDIR/php_psi.dep <$i <>$PSI_STDTYPES <@ = { - {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 - cat >>$PSI_STRUCTS <@ = { -EOF - cat >>$PSI_UNIONS <@ = { -EOF - cat >>$PSI_CONSTS <@ = { -EOF - cat >>$PSI_REDIRS <@ = { -EOF - cat >>$PSI_MACROS <>$PSI_DECLS <@ = { -EOF - cat >>$PSI_VA_DECLS <@ = { -EOF - cat >>$PSI_FN_DECLS <@ = { -EOF + PSI_STDTYPES= + PSI_TYPES= + PSI_COMPOSITES= + PSI_CONSTS= + PSI_REDIRS= + PSI_MACROS= + PSI_DECLS= + + AC_CONFIG_FILES( + [$PHP_PSI_BUILDDIR/php_psi_stdinc.h:$PHP_PSI_SRCDIR/php_psi_stdinc.h.in] + [$PHP_PSI_BUILDDIR/php_psi_posix.h:$PHP_PSI_SRCDIR/php_psi_posix.h.in] + ) + ]) dnl PSI_CONFIG_DONE() dnl Finish the headers with the pre-defined types etc. AC_DEFUN(PSI_CONFIG_DONE, [ - - wait - if $PSI_FAST_CONFIG; then + wait for conf_env in $PSI_CONFIG_TMP/*/conf.env; do source $conf_env done @@ -148,33 +54,15 @@ AC_DEFUN(PSI_CONFIG_DONE, [ LIBS=$psi_save_LIBS PHP_EVAL_LIBLINE($psi_eval_LIBS, PSI_SHARED_LIBADD) - cat >$PSI_STDINC <>$i <$PSI_CONFIG_TMP/AS_TR_SH([$1])/conf.env <>$PSI_CONFIG_TMP/AS_TR_SH([$1])/conf.env <&66 ) & @@ -410,7 +314,7 @@ AC_DEFUN([PSI_SH_TEST_ALIGNOF], [test -n "$AS_TR_SH([ac_cv_alignof_]$1)" && test dnl PSI_CHECK_SIZEOF(type, special-includes) dnl AC_CHECK_SIZEOF wrapper with PSI_INCLUDES -dnl Defines psi\\SIZEOF_ pre-defined constant in $PSI_CONSTS. +dnl Defines psi\\SIZEOF_ pre-defined constant in $PSI_CONSTS_H. AC_DEFUN(PSI_CHECK_SIZEOF, [ AC_CHECK_SIZEOF($1, [], PSI_INCLUDES $2) @@ -421,7 +325,7 @@ AC_DEFUN(PSI_CHECK_SIZEOF, [ dnl PSI_CHECK_ALIGNOF(type, special-includes) dnl AC_CHECK_ALIGNOF wrapper with PSI_INCLUDES -dnl Defines psi\\ALIGNOF_ pre-defined constant in $PSI_CONSTS. +dnl Defines psi\\ALIGNOF_ pre-defined constant in $PSI_CONSTS_H. AC_DEFUN(PSI_CHECK_ALIGNOF, [ AC_CHECK_ALIGNOF($1, PSI_INCLUDES $2)