From: Michael Wallner Date: Mon, 6 Feb 2017 18:49:05 +0000 (+0100) Subject: configure: fix maintainer mode X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5ba86e0c3e64a38bd58c6ea2495b3f46cb7654f7;p=m6w6%2Fext-psi configure: fix maintainer mode --- diff --git a/config.m4 b/config.m4 index 68d5c9f..de400c4 100644 --- a/config.m4 +++ b/config.m4 @@ -104,6 +104,17 @@ if test "$PHP_PSI" != no; then dnl parallel AC_MSG_CHECKING([for POSIX modules: $PHP_PSI_POSIX]) + PSI_CONFIG_POSIX(signal, signal.h, [ + PSI_CONFIG_POSIX(time, time.h, [ + PSI_CONFIG_POSIX(sys/stat, sys/stat.h) + PSI_CONFIG_POSIX(wchar, wchar.h, [ + PSI_CONFIG_POSIX(wctype, wctype.h) + ]) + ]) + PSI_CONFIG_POSIX(sys/select, sys/select.h) + ]) + PSI_CONFIG_POSIX(poll, poll.h) + PSI_CONFIG_POSIX(syslog, syslog.h) PSI_CONFIG_POSIX(errno, errno.h) PSI_CONFIG_POSIX(fcntl, fcntl.h) PSI_CONFIG_POSIX(glob, glob.h) @@ -111,12 +122,13 @@ if test "$PHP_PSI" != no; then PSI_CONFIG_POSIX(stdio, stdio.h) PSI_CONFIG_POSIX(stdlib, stdlib.h) PSI_CONFIG_POSIX(unistd, unistd.h) - PSI_CONFIG_POSIX(time, time.h) - PSI_CONFIG_POSIX(sys/select, sys/select.h) - PSI_CONFIG_POSIX(sys/socket, sys/socket.h) + PSI_CONFIG_POSIX(sys/socket, sys/socket.h, [ + PSI_CONFIG_POSIX(netinet/in, netinet/in.h) + PSI_CONFIG_POSIX(netdb, netdb.h) + ]) + PSI_CONFIG_POSIX(netinet/tcp, netinet/tcp.h) PSI_CONFIG_POSIX(sys/time, sys/time.h) PSI_CONFIG_POSIX(sys/times, sys/times.h) - PSI_CONFIG_POSIX(sys/stat, sys/stat.h) PSI_CONFIG_POSIX(sys/uio, sys/uio.h) PSI_CONFIG_POSIX(sys/utsname, sys/utsname.h) PSI_CONFIG_POSIX(ndbm, dnl @@ -124,14 +136,6 @@ if test "$PHP_PSI" != no; then relic.h dnl qdbm gdbm-ndbm.h dnl gdbm ) - PSI_CONFIG_POSIX(netdb, netdb.h) - PSI_CONFIG_POSIX(netinet/in, netinet/in.h) - PSI_CONFIG_POSIX(netinet/tcp, netinet/tcp.h) - PSI_CONFIG_POSIX(poll, poll.h) - PSI_CONFIG_POSIX(signal, signal.h) - PSI_CONFIG_POSIX(syslog, syslog.h) - PSI_CONFIG_POSIX(wchar, wchar.h) - PSI_CONFIG_POSIX(wctype, wctype.h) PSI_CONFIG_DONE diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index 5692e71..0c2b165 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -15,6 +15,7 @@ AC_DEFUN(PSI_CONFIG_INIT, [ PHP_SUBST(PSI_DEPS) PSI_CONFIG_TMP=$(mktemp -d) + PSI_FUNC_LIBC_MAIN else PSI_FAST_CONFIG=false PSI_DEPS=false @@ -78,7 +79,7 @@ AC_DEFUN(PSI_CONFIG_POSIX_ENABLED, [ AS_TR_SH([psi_config_posix_]$1)=true ;; *) - if expr "$PHP_PSI_POSIX" : '\b$1\b' >/dev/null; then + if expr "$PHP_PSI_POSIX" : '.*\b$1\b' >/dev/null; then AS_TR_SH([psi_config_posix_]$1)=true fi ;; @@ -100,14 +101,15 @@ AC_DEFUN(PSI_SH_TEST_POSIX_ENABLED, [ fi ]) -dnl PSI_CONFIG_POSIX(section, headers) +dnl PSI_CONFIG_POSIX(section, headers, dependents) AC_DEFUN(PSI_CONFIG_POSIX, [ PSI_CONFIG_POSIX_ENABLED($1, [ if $PSI_FAST_CONFIG; then - PSI_CONFIG_POSIX_PARALLEL($1, $2) + PSI_CONFIG_POSIX_PARALLEL($1, $2, [$3]) else ifelse([$2],,:,[AC_CHECK_HEADERS($2)]) AS_TR_CPP([PSI_CHECK_$1]) + $3 fi ]) ]) @@ -116,6 +118,7 @@ AC_DEFUN([PSI_CONFIG_POSIX_PARALLEL], [ ( dnl setup 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 dnl restore stdio @@ -139,6 +142,7 @@ 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 <>$PSI_CONFIG_TMP/AS_TR_SH([$1])/conf.env + dnl done printf "%s " "$1" >&66 + + $3 + wait ) & ])