Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and INSTALL_IT (the actions performed when "make install" is executed). If they are not specified, they will default to "cgi" and "do nothing," respectively. Additionally, the following m4 macros can be used to influence what is created during "make": PHP_BUILD_SHARED -- build shared target $SAPI_SHARED PHP_BUILD_STATIC -- build static target $SAPI_STATIC PHP_BUILD_PROGRAM -- build executable $SAPI_PROGRAM (paths relative to top build dir)