X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=m4%2Fpsi.m4;h=eecfa6192a3a57ff1efdae2d7bf61e605781c513;hp=ea8d7fbd37699e65c2fbcf951c63cf4e7e851029;hb=0d05258e368d32f04371734a45759ea9ac2f5a7a;hpb=b4508f6b917660970f887894a6aaed6c220a2c72 diff --git a/m4/psi.m4 b/m4/psi.m4 index ea8d7fb..eecfa61 100644 --- a/m4/psi.m4 +++ b/m4/psi.m4 @@ -4,6 +4,7 @@ PSI_CONSTS= PSI_REDIRS= PSI_MACROS= PSI_DECLS= +PSI_VA_DECLS= psi_includes() { local have_ @@ -32,6 +33,13 @@ AC_DEFUN([PSI_PKG_CONFIG], [ export PKG_CONFIG_PATH="$PHP_PSI_LIBFFI/lib/pkgconfig:$PHP_PSI_LIBJIT/lib/pkgconfig:$PKG_CONFIG_PATH" ]) +AC_DEFUN(PSI_CHECK_SIZEOF, [ + AC_CHECK_SIZEOF($1, [], $2) + if test "$AS_TR_SH([ac_cv_sizeof_]$1)"; then + add_int_const "AS_TR_CPP([SIZEOF_]$1)" "$AS_TR_SH([ac_cv_sizeof_]$1)" + fi +]) + AC_DEFUN(PSI_CHECK_OFFSETOF, [ _AC_CACHE_CHECK_INT( [offset of $2 in $1], @@ -70,10 +78,10 @@ AC_DEFUN(PSI_CHECK_LIBJIT, [ fi ]) +PHP_ARG_WITH(psi-libffi, where to find libffi, +[ --with-psi-libffi=DIR PSI: path to libffi], [ ], [ ]) AC_DEFUN(PSI_CHECK_LIBFFI, [ AC_REQUIRE([PSI_PKG_CONFIG])dnl - PHP_ARG_WITH(psi-libffi, where to find libffi, - [ --with-psi-libffi=DIR PSI: path to libffi], [ ], [ ]) AC_CACHE_CHECK(for libffi through pkg-config, psi_cv_libffi, [ if $PKG_CONFIG --exists libffi @@ -122,6 +130,10 @@ AC_DEFUN(PSI_CHECK_LIBFFI, [ ], [ ], -L$psi_cv_libffi_dir/$PHP_LIBDIR) ], -L$psi_cv_libffi_dir/$PHP_LIBDIR) + PHP_CHECK_LIBRARY(ffi, ffi_prep_cif_var, [ + AC_DEFINE(PSI_HAVE_FFI_PREP_CIF_VAR, 1, [ ]) + ], [ + ], -L$psi_cv_libffi_dir/$PHP_LIBDIR) ]) dnl PSI_COMPUTE_STR(variable, string or expression)