mirror of
https://github.com/php/php-src.git
synced 2025-01-21 11:13:38 +08:00
Build adjustments.
This commit is contained in:
parent
f7a86e5b5e
commit
ad84dfa937
@ -7,9 +7,10 @@ if (PHP_LIBXML == "yes") {
|
||||
EXTENSION("libxml", "libxml.c", false /* never shared */);
|
||||
AC_DEFINE("HAVE_LIBXML", 1, "LibXML support");
|
||||
|
||||
CHECK_LIB("iconv.lib", "libxml", php_usual_lib_suspects);
|
||||
CHECK_LIB("libxml2.lib", "libxml", php_usual_lib_suspects);
|
||||
CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS", php_usual_include_suspects);
|
||||
CHECK_LIB("iconv.lib", "libxml");
|
||||
CHECK_LIB("libxml2.lib", "libxml");
|
||||
CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS");
|
||||
ADD_FLAG("CFLAGS", "/D LIBXML_THREAD_ENABLED");
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,10 +4,12 @@
|
||||
ARG_WITH("mssql", "mssql support", "no");
|
||||
|
||||
if (PHP_MSSQL == "yes") {
|
||||
EXTENSION("mssql", "php_mssql.c");
|
||||
CHECK_LIB("ntwdblib.lib", "mssql", "\\MSSQL7\\DevTools\\Lib");
|
||||
CHECK_HEADER_ADD_INCLUDE("sqlfront.h", "CFLAGS");
|
||||
AC_DEFINE('DBNTWIN32', 1, '');
|
||||
AC_DEFINE('MSSQL70', 1, '');
|
||||
AC_DEFINE('HAVE_MSSQL', 1, 'Have MSSQL support');
|
||||
if (CHECK_LIB("ntwdblib.lib", "mssql", "\\MSSQL7\\DevTools\\Lib") &&
|
||||
CHECK_HEADER_ADD_INCLUDE("sqlfront.h", "CFLAGS_MSSQL")) {
|
||||
EXTENSION("mssql", "php_mssql.c");
|
||||
ADD_FLAG("CFLAGS_MSSQL", "/D DBNTWIN32=1 /D MSSQL70=1");
|
||||
AC_DEFINE('HAVE_MSSQL', 1, 'Have MSSQL support');
|
||||
} else {
|
||||
WARNING("mssql not enabled; libraries and headers not found");
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,9 @@ if (PHP_SQLITE == "yes") {
|
||||
copy.c where.c trigger.c", "sqlite");
|
||||
|
||||
AC_DEFINE("HAVE_SQLITE", 1, "SQLite support");
|
||||
ADD_DEF_FILE("ext\\sqlite\\php_sqlite.def");
|
||||
if (!PHP_SQLITE_SHARED) {
|
||||
ADD_DEF_FILE("ext\\sqlite\\php_sqlite.def");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,18 +9,19 @@ ARG_WITH('apache-libs', 'Where to find Apache 1.3 libraries', null);
|
||||
if (PHP_APACHE == "yes") {
|
||||
|
||||
if (!CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE", php_usual_include_suspects +
|
||||
";C:\\Program Files\\Apache Group\\Apache\\include" +
|
||||
";" + PROGRAM_FILES + "\\Apache Group\\Apache\\include" +
|
||||
";..\\php_build\\apache\\src\\include")) {
|
||||
ERROR("Could not find apache headers");
|
||||
}
|
||||
|
||||
if (!CHECK_LIB("ApacheCore.lib", "apache", php_usual_lib_suspects +
|
||||
';C:\\Program Files\\Apache Group\\Apache\\libexec' +
|
||||
';' + PROGRAM_FILES + '\\Apache Group\\Apache\\libexec' +
|
||||
';..\\php_build\\apache\\src\\corer')) {
|
||||
ERROR("Could not find apache libraries");
|
||||
}
|
||||
|
||||
// We need to play tricks to get our readdir.h used by apache
|
||||
// headers
|
||||
SAPI('apache', 'mod_php5.c sapi_apache.c php_apache.c',
|
||||
'php' + PHP_VERSION + 'apache.dll',
|
||||
'/D APACHEPHP4_EXPORTS /D APACHE_READDIR_H');
|
||||
'/D APACHEPHP4_EXPORTS /D APACHE_READDIR_H /I win32');
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ DEFINE("BASE_INCLUDES", "/I . /I main /I regex /I Zend /I TSRM ");
|
||||
|
||||
// CFLAGS for building the PHP dll
|
||||
DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP4DLLTS_EXPORTS /D PHP_EXPORTS \
|
||||
/D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D _WIN32_WINNT=0x400");
|
||||
/D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=0x400");
|
||||
|
||||
// General CFLAGS for building objects
|
||||
DEFINE("CFLAGS", "/nologo /YX /FD $(BASE_INCLUDES) /D _WINDOWS \
|
||||
|
@ -17,13 +17,21 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
// $Id: confutils.js,v 1.4 2003-12-03 02:47:45 wez Exp $
|
||||
// $Id: confutils.js,v 1.5 2003-12-03 14:29:45 wez Exp $
|
||||
|
||||
var STDOUT = WScript.StdOut;
|
||||
var STDERR = WScript.StdErr;
|
||||
var WshShell = WScript.CreateObject("WScript.Shell");
|
||||
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
|
||||
var MFO = null;
|
||||
var SYSTEM_DRIVE = WshShell.Environment("Process").Item("SystemDrive");
|
||||
var PROGRAM_FILES = WshShell.Environment("Process").Item("ProgramFiles");
|
||||
|
||||
if (PROGRAM_FILES == null) {
|
||||
PROGRAM_FILES = "C:\\Program Files\\";
|
||||
}
|
||||
|
||||
STDOUT.WriteLine("program files " + PROGRAM_FILES);
|
||||
|
||||
var PHP_VERSION = 5;
|
||||
|
||||
@ -338,6 +346,12 @@ function PATH_PROG(progname, def, additional_paths)
|
||||
|
||||
function CHECK_LIB(libname, target, path_to_check)
|
||||
{
|
||||
if (path_to_check == null) {
|
||||
path_to_check = php_usual_lib_suspects;
|
||||
} else {
|
||||
path_to_check += ";" + php_usual_lib_suspects;
|
||||
}
|
||||
|
||||
var p = search_paths(libname, path_to_check, "LIBS");
|
||||
var have = 0;
|
||||
|
||||
@ -358,6 +372,13 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
|
||||
if (use_env == null) {
|
||||
use_env = true;
|
||||
}
|
||||
|
||||
if (path_to_check == null) {
|
||||
path_to_check = php_usual_include_suspects;
|
||||
} else {
|
||||
path_to_check += ";" + php_usual_include_suspects;
|
||||
}
|
||||
|
||||
var p = search_paths(header_name, path_to_check, use_env ? "INCLUDE" : null);
|
||||
var have = 0;
|
||||
var sym;
|
||||
@ -681,7 +702,13 @@ function ADD_FLAG(name, flags, target)
|
||||
name = target.toUpperCase() + "_" + name;
|
||||
}
|
||||
if (configure_subst.Exists(name)) {
|
||||
flags = configure_subst.Item(name) + " " + flags;
|
||||
var curr_flags = configure_subst.Item(name);
|
||||
|
||||
if (curr_flags.match(flags)) {
|
||||
return;
|
||||
}
|
||||
|
||||
flags = curr_flags + " " + flags;
|
||||
configure_subst.Remove(name);
|
||||
}
|
||||
configure_subst.Add(name, flags);
|
||||
@ -708,7 +735,7 @@ function AC_DEFINE(name, value, comment, quote)
|
||||
quote = true;
|
||||
}
|
||||
if (quote && typeof(value) == "string") {
|
||||
value = '"' + value.replace(new RegExp('"', "g"), '\\"') + '"';
|
||||
value = '"' + value.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"';
|
||||
} else if (value.length == 0) {
|
||||
value = '""';
|
||||
}
|
||||
@ -725,5 +752,6 @@ function ERROR(msg)
|
||||
function WARNING(msg)
|
||||
{
|
||||
STDERR.WriteLine("WARNING: " + msg);
|
||||
STDERR.WriteBlankLines(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user