diff --git a/acinclude.m4 b/acinclude.m4 index 7fb579d1b88..014478e5cb2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1154,3 +1154,18 @@ AC_DEFUN(PHP_CHECK_LIBRARY, [ ])dnl ]) + + +dnl +AC_DEFUN(PHP_CHECK_INTERACTIVE, [ + if test "$PHP_SAPI" != "cgi"; then + AC_MSG_ERROR([$1 extension can only be used with CGI build!]) + fi +]) + +dnl +AC_DEFUN(PHP_CHECK_STANDALONE, [ + if test "$PHP_SAPI" != "cgi"; then + AC_MSG_ERROR([$1 extension may affect webserver operation internals, so it can only be used with CGI build!]) + fi +])