зеркало из https://github.com/microsoft/msphpsql.git
58 строки
3.5 KiB
Plaintext
58 строки
3.5 KiB
Plaintext
//----------------------------------------------------------------------------------------------------------------------------------
|
|
// File: config.w32
|
|
//
|
|
// Contents: JScript build configuration used by buildconf.bat
|
|
//
|
|
// Microsoft Drivers 5.12 for PHP for SQL Server
|
|
// Copyright(c) Microsoft Corporation
|
|
// All rights reserved.
|
|
// MIT License
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the ""Software""),
|
|
// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
// and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
|
|
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
// IN THE SOFTWARE.
|
|
//---------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
ARG_ENABLE("sqlsrv", "enable Microsoft Drivers for PHP for SQL Server (SQLSRV driver)", "no");
|
|
|
|
if( PHP_SQLSRV != "no" ) {
|
|
|
|
sqlsrv_src_class = " conn.cpp init.cpp stmt.cpp util.cpp ";
|
|
shared_src_class = " core_init.cpp core_conn.cpp core_stmt.cpp core_util.cpp core_stream.cpp core_results.cpp ";
|
|
|
|
if (CHECK_LIB("odbc32.lib", "sqlsrv") && CHECK_LIB("odbccp32.lib", "sqlsrv") &&
|
|
CHECK_LIB("version.lib", "sqlsrv") && CHECK_LIB("psapi.lib", "sqlsrv")&&
|
|
CHECK_HEADER_ADD_INCLUDE( "core_sqlsrv.h", "CFLAGS_SQLSRV", configure_module_dirname + "\\shared")) {
|
|
if (PHP_SQLSRV_SHARED || PHP_PDO_SQLSRV == "no") {
|
|
ADD_SOURCES( configure_module_dirname + "\\shared", shared_src_class, "sqlsrv" );
|
|
}
|
|
CHECK_HEADER_ADD_INCLUDE("sql.h", "CFLAGS_SQLSRV_ODBC");
|
|
CHECK_HEADER_ADD_INCLUDE("sqlext.h", "CFLAGS_SQLSRV_ODBC");
|
|
ADD_FLAG( "LDFLAGS_SQLSRV", "/NXCOMPAT /DYNAMICBASE /debug /guard:cf" );
|
|
ADD_FLAG( "CFLAGS_SQLSRV", "/D ZEND_WIN32_FORCE_INLINE" );
|
|
ADD_FLAG( "CFLAGS_SQLSRV", "/EHsc" );
|
|
ADD_FLAG( "CFLAGS_SQLSRV", "/GS" );
|
|
ADD_FLAG( "CFLAGS_SQLSRV", "/Zi" );
|
|
ADD_FLAG( "CFLAGS_SQLSRV", "/ZH:SHA_256 /sdl /W3" );
|
|
ADD_FLAG( "LDFLAGS_SQLSRV", "/CETCOMPAT" );
|
|
if (VCVERS >= 1913) {
|
|
ADD_FLAG("LDFLAGS_SQLSRV", "/d2:-guardspecload");
|
|
ADD_FLAG("CFLAGS_SQLSRV", "/Qspectre");
|
|
} else if (VCVERS == 1900) {
|
|
var subver1900 = probe_binary(PHP_CL).substr(6);
|
|
if (subver1900 >= 24241) {
|
|
ADD_FLAG("LDFLAGS_SQLSRV", "/d2:-guardspecload");
|
|
ADD_FLAG('CFLAGS_SQLSRV', "/Qspectre");
|
|
}
|
|
}
|
|
if (PHP_DEBUG != "yes") ADD_FLAG( "CFLAGS_SQLSRV", "/guard:cf /O2" );
|
|
EXTENSION("sqlsrv", sqlsrv_src_class , PHP_SQLSRV_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
|
} else {
|
|
WARNING("sqlsrv not enabled; libraries and headers not found");
|
|
}
|
|
}
|