X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=config.m4;h=98c064876b0a384ace46dbf8b52a704b4b9b4850;hp=2c7af0b58cbe2d0fec1d7534000c0f0da53b6370;hb=5e240548ba570610ce0dbc248a2b7654a0e080fa;hpb=a107dfcca2dfd0fc5a2779a8d679f778cb8f3290 diff --git a/config.m4 b/config.m4 index 2c7af0b..98c0648 100644 --- a/config.m4 +++ b/config.m4 @@ -48,7 +48,7 @@ PHP_ARG_ENABLE(psi, whether to enable PHP System Interface support, if test "$PHP_PSI" != no; then PHP_CONFIGURE_PART(Configuring PSI) - + PHP_ARG_ENABLE(psi-posix, whether to pre-define POSIX decls, [ --enable-psi-posix=... PSI: pre-define POSIX decls], [ ], [ ]) @@ -60,6 +60,20 @@ if test "$PHP_PSI" != no; then AC_HEADER_ASSERT dnl # adds --disable-assert to define NDEBUG + dnl we cannot use AC_USE_SYSTEM_EXTENSIONS here, because we're way too late + dnl in the game, and we're currently only targeting _GNU_SOURCE for now + AC_MSG_CHECKING([for _GNU_SOURCE]) + AC_EGREP_CPP([gnu_source_defined], [ + #ifndef _GNU_SOURCE + gnu_source_not_defined + #endif + ], [ + AC_MSG_RESULT([needs define]) + AC_DEFINE([_GNU_SOURCE], [], [ ]) + ], [ + AC_MSG_RESULT([already defined]) + ]) + psi_save_LIBS=$LIBS LIBS=