X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=m4%2Fpsi%2Fpsi.m4;h=67878346db61e5765024af4e225c09502888b94d;hp=0c2b16537cc58125c4c6b03092b243f3a2ce05e8;hb=5fb98c298b198dbc7dba9d1c339b21e179c65b4e;hpb=5ba86e0c3e64a38bd58c6ea2495b3f46cb7654f7 diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index 0c2b165..6787834 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -41,11 +41,22 @@ AC_DEFUN(PSI_CONFIG_INIT, [ ]) +dnl PSI_CONFIG_WAIT() +dnl Internal: waits for sub configures in maintainer mode +AC_DEFUN(PSI_CONFIG_WAIT, [ + wait + if test $? -gt 0; then + cat $PSI_CONFIG_TMP/*/stderr.log >&2 + exit 1 + fi +]) + dnl PSI_CONFIG_DONE() dnl Finish the headers with the pre-defined types etc. AC_DEFUN(PSI_CONFIG_DONE, [ + PSI_CONFIG_WAIT + if $PSI_FAST_CONFIG; then - wait for conf_env in $PSI_CONFIG_TMP/*/conf.env; do source $conf_env done @@ -116,22 +127,20 @@ AC_DEFUN(PSI_CONFIG_POSIX, [ AC_DEFUN([PSI_CONFIG_POSIX_PARALLEL], [ ( - dnl setup + dnl chaway mkdir $PSI_CONFIG_TMP/AS_TR_SH([$1]) - printenv > $PSI_CONFIG_TMP/AS_TR_SH([$1])/start.env - ln -s $(pwd)/confdefs.h $PSI_CONFIG_TMP/AS_TR_SH([$1])/confdefs.h + cd $PSI_CONFIG_TMP/AS_TR_SH([$1]) + + dnl AC_DEFINEs + ln -s $abs_builddir/confdefs.h confdefs.h - dnl restore stdio - exec 66>&AS_MESSAGE_FD - exec AS_MESSAGE_FD>$PSI_CONFIG_TMP/AS_TR_SH([$1])/stdout.log - exec 2>$PSI_CONFIG_TMP/AS_TR_SH([$1])/stderr.log + dnl STDOUT, STDERR + exec {PSI_MESSAGE_FD}>&AS_MESSAGE_FD {PSI_ERROR_FD}>&2 + exec AS_MESSAGE_FD>stdout.log 2>stderr.log dnl check for headers? ifelse([$2],,:,[AC_CHECK_HEADERS($2)]) - dnl chaway - cd $PSI_CONFIG_TMP/AS_TR_SH([$1]) - dnl run checks PSI_TYPES= PSI_CONSTS= @@ -142,27 +151,31 @@ AC_DEFUN([PSI_CONFIG_POSIX_PARALLEL], [ AS_TR_CPP([PSI_CHECK_$1]) dnl save env - printenv > $PSI_CONFIG_TMP/AS_TR_SH([$1])/end.env - cat >$PSI_CONFIG_TMP/AS_TR_SH([$1])/conf.env <conf.env <>$PSI_CONFIG_TMP/AS_TR_SH([$1])/conf.env <>conf.env <>$PSI_CONFIG_TMP/AS_TR_SH([$1])/conf.env + _AC_CACHE_DUMP >>conf.env + dnl restore STDOUT,STDERR + exec AS_MESSAGE_FD>&$PSI_MESSAGE_FD 2>&$PSI_ERROR_FD dnl done - printf "%s " "$1" >&66 + AS_ECHO_N(["$1 "]) + cd - >/dev/null + dnl run dependents $3 - wait + + PSI_CONFIG_WAIT ) & ]) @@ -224,6 +237,9 @@ typedef bool _Bool; #ifdef HAVE_ARPA_NAMESER_H # include #endif +#ifdef HAVE_ARPA_INET_H +# include +#endif #ifdef HAVE_FCNTL_H # include #endif @@ -285,7 +301,13 @@ AC_DEFUN(PSI_LEMON, [ if test -z "$LEMON" then AC_PATH_PROG(LEMON, lemon, $PHP_PSI_BUILDDIR/lemon) + if expr + "$LEMON" : "/" >/dev/null; then + LEMON_PATH= + else + LEMON_PATH=$abs_builddir/ + fi fi + PHP_SUBST(LEMON_PATH) PHP_SUBST(LEMON) ])