X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=config.m4;h=f25cc06dc0b83f236ef2cf33adc37a2769c8f96e;hp=be38dcf4a6a0f75b1164c5dc696f1ae8377b7c35;hb=8d1d1243a8a42b0046ac670808913b3bb06c994b;hpb=894e0ce93f9ce82109e904ae35c249bf6abe54f1 diff --git a/config.m4 b/config.m4 index be38dcf..f25cc06 100644 --- a/config.m4 +++ b/config.m4 @@ -16,6 +16,7 @@ m4_foreach(incfile, [ [psi/psi_decl.m4], [psi/psi_macro.m4], [psi/psi_composite.m4], + [posix/arpa_inet.m4], [posix/errno.m4], [posix/fcntl.m4], [posix/glob.m4], @@ -24,6 +25,7 @@ m4_foreach(incfile, [ [posix/stdio.m4], [posix/stdint.m4], [posix/stdlib.m4], + [posix/stdarg.m4], [posix/sys_select.m4], [posix/sys_socket.m4], [posix/sys_stat.m4], @@ -60,8 +62,8 @@ if test "$PHP_PSI" != no; then [ --enable-psi-maintainer-mode PSI: enable maintainer mode . parallel configure - . source dependencies - . extra decl wrappers], [no], [no]) + . make dependencies + . extra debug wrappers], [no], [no]) PHP_ARG_WITH(psi-libjit, where to find libjit, [ --with-psi-libjit=DIR PSI: path to libjit], [ ], [ ]) @@ -85,11 +87,14 @@ if test "$PHP_PSI" != no; then AC_MSG_RESULT([already defined]) ]) - PSI_LEMON + AC_MSG_CHECKING([psi source dir]) + AC_MSG_RESULT([$PHP_PSI_SRCDIR]) + AC_MSG_CHECKING([psi build dir]) + AC_MSG_RESULT([$PHP_PSI_BUILDDIR]) + PSI_CHECK_LIBJIT PSI_CHECK_LIBFFI - AC_PATH_PROG(NM, nm) AC_FUNC_FNMATCH AC_FUNC_MMAP @@ -102,8 +107,22 @@ if test "$PHP_PSI" != no; then PSI_CHECK_STDDEF dnl parallel - AC_MSG_CHECKING([for POSIX modules: $PHP_PSI_POSIX]) + AC_MSG_CHECKING([for POSIX modules]) + if ! $PSI_FAST_CONFIG; then + AC_MSG_RESULT([$PHP_PSI_POSIX]) + fi + 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 +130,16 @@ 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(stdarg, stdarg.h) + PSI_CONFIG_POSIX(sys/socket, sys/socket.h, [ + PSI_CONFIG_POSIX(netinet/in, netinet/in.h, [ + PSI_CONFIG_POSIX(arpa/inet, arpa/inet.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 +147,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 @@ -141,22 +156,34 @@ if test "$PHP_PSI" != no; then PHP_ADD_INCLUDE($PHP_PSI_SRCDIR) PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src) + PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src/calc) PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src/types) PHP_ADD_INCLUDE($PHP_PSI_BUILDDIR) PHP_ADD_BUILD_DIR($PHP_PSI_BUILDDIR/src) PHP_ADD_BUILD_DIR($PHP_PSI_BUILDDIR/src/types) - PHP_PSI_HEADERS=`(cd $PHP_PSI_SRCDIR/src && ls *.h types/*.h)` + PHP_PSI_HEADERS=" \ + src/calc/basic.h src/calc/bin.h src/calc/bool.h src/calc/cast.h \ + src/calc/cmp.h src/calc/oper.h \ + `(cd $PHP_PSI_SRCDIR/src && ls *.h types/*.h)` \ + " # parser* should come first PHP_PSI_SOURCES=" \ - src/parser_proc.c \ - src/parser.c \ - `(cd $PHP_PSI_SRCDIR && ls src/*.c src/types/*.c | $EGREP -v '^src/parser')` \ + src/parser_proc.c src/parser.c \ + `(cd $PHP_PSI_SRCDIR && ls src/*.c src/types/*.c \ + | $EGREP -v '^src/parser' \ + )` \ + " + PHP_PSI_GENERATED=" \ + src/parser_proc.c src/parser.c \ + src/calc/basic.h src/calc/bin.h src/calc/bool.h src/calc/cast.h \ + src/calc/cmp.h src/calc/oper.h \ " PHP_NEW_EXTENSION(psi, $PHP_PSI_SOURCES, $ext_shared) PHP_INSTALL_HEADERS(ext/psi, php_psi.h $PHP_PSI_HEADERS) + PHP_SUBST(PHP_PSI_GENERATED) PHP_SUBST(PHP_PSI_HEADERS) PHP_SUBST(PHP_PSI_SOURCES)