summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/config.w3239
-rw-r--r--sapi/cgi/config.w3225
-rw-r--r--sapi/cli/config.w329
-rw-r--r--sapi/isapi/config.w329
4 files changed, 82 insertions, 0 deletions
diff --git a/sapi/apache/config.w32 b/sapi/apache/config.w32
new file mode 100644
index 0000000000..9842e43028
--- /dev/null
+++ b/sapi/apache/config.w32
@@ -0,0 +1,39 @@
+// vim:ft=javascript
+// $Id$
+
+ARG_ENABLE('apache', 'Build Apache 1.3.x version of PHP', 'yes');
+
+ARG_WITH('apache-includes', 'Where to find Apache 1.3 headers', null);
+ARG_WITH('apache-libs', 'Where to find Apache 1.3 libraries', null);
+
+if (PHP_APACHE_INCLUDES == null) {
+ if (FSO.FileExists('C:\\Program Files\\Apache Group\\Apache\\include\\httpd.h')) {
+ PHP_APACHE_INCLUDES = "C:\\Program Files\\Apache Group\\Apache\\include";
+ } else if (FSO.FileExists(PHP_PHP_BUILD + "\\apache\\src\\include\\httpd.h")) {
+ PHP_APACHE_INCLUDES = PHP_PHP_BUILD + "\\apache\\src\\include";
+ }
+}
+
+if (!FSO.FileExists(PHP_APACHE_INCLUDES + "\\httpd.h")) {
+ ERROR("Could not find apache headers");
+}
+
+if (PHP_APACHE_LIBS == null) {
+ if (FSO.FileExists('C:\\Program Files\\Apache Group\\Apache\\libexec\\ApacheCore.lib')) {
+ PHP_APACHE_LIBS = "C:\\Program Files\\Apache Group\\Apache\\libexec";
+ } else if (FSO.FileExists(PHP_PHP_BUILD + "\\apache\\src\\corer\\ApacheCore.lib")) {
+ PHP_APACHE_LIBS = PHP_PHP_BUILD + "\\apache\\src\\corer";
+ }
+}
+
+if (!FSO.FileExists(PHP_APACHE_LIBS + "\\ApacheCore.lib")) {
+ ERROR("Could not find apache libraries");
+}
+
+
+if (PHP_APACHE == "yes") {
+ SAPI('apache', 'mod_php5.c sapi_apache.c php_apache.c',
+ 'php' + PHP_VERSION + 'apache.dll',
+ '/D APACHEPHP4_EXPORTS /D APACHE_READDIR_H /I "' + PHP_APACHE_INCLUDES + '"');
+ ADD_FLAG('LIBS_APACHE', '/libpath:"' + PHP_APACHE_LIBS + '" ApacheCore.lib');
+}
diff --git a/sapi/cgi/config.w32 b/sapi/cgi/config.w32
new file mode 100644
index 0000000000..d42537297f
--- /dev/null
+++ b/sapi/cgi/config.w32
@@ -0,0 +1,25 @@
+// vim:ft=javascript
+// $Id$
+
+ARG_ENABLE('cgi', 'Build CGI version of PHP', 'yes');
+ARG_ENABLE('fastcgi', 'Build FastCGI support into CGI binary', 'yes');
+ARG_ENABLE('path-info-check',
+ 'If this is disabled, paths such as /info.php/test?a=b will fail to work', 'yes');
+
+ARG_ENABLE("force-cgi-redirect", "Enable the security check for internal \
+server redirects. You should use this if you are running the CGI \
+version with Apache.", "yes");
+
+AC_DEFINE("FORCE_CGI_REDIRECT", PHP_FORCE_CGI_REDIRECT == "yes" ? 1 : 0, "CGI redirect mode");
+AC_DEFINE("ENABLE_PATHINFO_CHECK", PHP_PATH_INFO_CHECK == "yes" ? 1 : 0, "Pathinfo check");
+
+if (PHP_CGI == "yes") {
+ AC_DEFINE('PHP_FASTCGI', PHP_FASTCGI == "yes" ? 1 : 0);
+ if (PHP_FASTCGI == "yes") {
+ SAPI('cgi', 'cgi_main.c getopt.c', 'php-cgi.exe', '-Isapi/cgi/libfcgi/include /D FCGI_STATIC');
+ ADD_SOURCES('sapi/cgi/libfcgi', 'fcgi_stdio.c fcgiapp.c os_win32.c', 'cgi');
+ ADD_FLAG('LIBS_CGI', 'ws2_32.lib kernel32.lib advapi32.lib');
+ } else {
+ SAPI('cgi', 'cgi_main.c getopt.c', 'php-cgi.exe');
+ }
+}
diff --git a/sapi/cli/config.w32 b/sapi/cli/config.w32
new file mode 100644
index 0000000000..9f30ad6d7c
--- /dev/null
+++ b/sapi/cli/config.w32
@@ -0,0 +1,9 @@
+// vim:ft=javascript
+// $Id$
+
+ARG_ENABLE('cli', 'Build CLI version of PHP', 'yes');
+
+if (PHP_CLI == "yes") {
+ SAPI('cli', 'getopt.c php_cli.c', 'php.exe');
+}
+
diff --git a/sapi/isapi/config.w32 b/sapi/isapi/config.w32
new file mode 100644
index 0000000000..c1a9765641
--- /dev/null
+++ b/sapi/isapi/config.w32
@@ -0,0 +1,9 @@
+// vim:ft=javascript
+// $Id$
+
+ARG_ENABLE('isapi', 'Build ISAPI version of PHP', 'yes');
+
+if (PHP_ISAPI == "yes") {
+ SAPI('isapi', 'php4isapi.c', 'php' + PHP_VERSION + 'isapi.dll', '/D PHP4ISAPI_EXPORTS');
+ ADD_FLAG('LDFLAGS_ISAPI', '/DEF:sapi\\isapi\\php4isapi.def');
+}