diff -urNp php-5.4.0RC6/sapi/cli/config.m4 PHP-5.4.0RC7/sapi/cli/config.m4
--- php-5.4.0RC6/sapi/cli/config.m4	2011-06-20 15:27:39.000000000 -0500
+++ PHP-5.4.0RC7/sapi/cli/config.m4	2012-02-02 22:22:39.000000000 -0600
@@ -6,6 +6,10 @@ PHP_ARG_ENABLE(cli,,
 [  --disable-cli           Disable building CLI version of PHP
                           (this forces --without-pear)], yes, no)
 
+PHP_ARG_ENABLE(cli-server,,
+[  --disable-cli-server    Disable built in CLI server
+                                                      ], yes, no)
+
 AC_MSG_CHECKING(for CLI build)
 if test "$PHP_CLI" != "no"; then
   PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cli/Makefile.frag)
@@ -13,7 +17,7 @@ if test "$PHP_CLI" != "no"; then
   dnl Set filename
   SAPI_CLI_PATH=sapi/cli/php
 
-  dnl Select SAPI
+  dnl Set SAPI 
   PHP_SELECT_SAPI(cli, program, php_cli.c php_http_parser.c php_cli_server.c,, '$(SAPI_CLI_PATH)')
 
   case $host_alias in
@@ -46,3 +50,11 @@ if test "$PHP_CLI" != "no"; then
   PHP_OUTPUT(sapi/cli/php.1)
 fi
 AC_MSG_RESULT($PHP_CLI)
+
+dnl Set non-server SAPI set
+AC_MSG_CHECKING(for CLI server enabled)
+if test "$PHP_CLI_SERVER" = "no"; then
+  AC_DEFINE(PHP_CLI_NO_SERVER, 1, [for CLI server enablement])
+fi
+AC_MSG_RESULT($PHP_CLI_SERVER)
+
diff -urNp php-5.4.0RC6/sapi/cli/php_cli.c PHP-5.4.0RC7/sapi/cli/php_cli.c
--- php-5.4.0RC6/sapi/cli/php_cli.c	2012-01-01 07:15:04.000000000 -0600
+++ PHP-5.4.0RC7/sapi/cli/php_cli.c	2012-02-02 22:43:01.000000000 -0600
@@ -521,7 +521,9 @@ static void php_cli_usage(char *argv0)
 				"  -F <file>        Parse and execute <file> for every input line\n"
 				"  -E <end_code>    Run PHP <end_code> after processing all input lines\n"
 				"  -H               Hide any passed arguments from external tools.\n"
+#ifndef PHP_CLI_NO_SERVER
 				"  -S <addr>:<port> Run with built-in web server.\n"
+#endif
 				"  -t <docroot>     Specify document root <docroot> for built-in web server.\n"
 				"  -s               Output HTML syntax highlighted source.\n"
 				"  -v               Version number\n"
@@ -1290,8 +1292,13 @@ int main(int argc, char *argv[])
 			}
 #ifndef PHP_CLI_WIN32_NO_CONSOLE
 			case 'S':
+#ifndef PHP_CLI_NO_SERVER
 				sapi_module = &cli_server_sapi_module;
 				break;
+#else
+				php_cli_usage(argv[0]);
+				goto out;
+#endif
 #endif
 			case 'h': /* help & quit */
 			case '?':
