1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// $Id$
// vim:ft=javascript
ARG_WITH("pdo-dblib", "dblib (Sybase, MSSQL) support for PDO", "no");
if (PHP_PDO_DBLIB != "no") {
/* if they pointed us to a freetds dir, pick that up,
* otherwise we'll poke around and look for MSSQL libs */
if (CHECK_LIB("sybdb.lib", "pdo_dblib", PHP_PDO_DBLIB) &&
CHECK_HEADER_ADD_INCLUDE("sybfront.h", "CFLAGS_PDO_DBLIB", PHP_PDO_DBLIB)) {
/* smells like FreeTDS (or maybe native sybase dblib) */
PDO_DBLIB_FLAVOUR = "freetds";
} else if (CHECK_LIB("ntwdblib.lib", "pdo_dblib", "\\MSSQL8\\DevTools\\Lib") &&
CHECK_HEADER_ADD_INCLUDE("sqlfront.h", "CFLAGS_PDO_DBLIB")) {
PDO_DBLIB_FLAVOUR = 8;
} else if (CHECK_LIB("ntwdblib.lib", "pdo_dblib", "\\MSSQL7\\DevTools\\Lib") &&
CHECK_HEADER_ADD_INCLUDE("sqlfront.h", "CFLAGS_PDO_DBLIB")) {
PDO_DBLIB_FLAVOUR = 7;
} else {
PDO_DBLIB_FLAVOUR = 0;
}
if (PDO_DBLIB_FLAVOUR != 0) {
EXTENSION("pdo_dblib", "pdo_dblib.c dblib_driver.c dblib_stmt.c", null, "",
PDO_DBLIB_FLAVOUR == "freetds" ? "php_pdo_sybase.dll" : "php_pdo_mssql.dll");
if (PDO_DBLIB_FLAVOUR != "freetds") {
ADD_FLAG("CFLAGS_PDO_DBLIB", "/DPHP_DBLIB_IS_MSSQL=1 /DDBNTWIN32=1 /DMSSQL" + PDO_DBLIB_FLAVOUR + "0=1 /DMSSQL_VERSION=\\\"" + PDO_DBLIB_FLAVOUR + ".0\\\"");
AC_DEFINE("PDO_DBLIB_IS_MSSQL", PDO_DBLIB_FLAVOUR, "Have MSSQL support");
PDO_DBLIB_FLAVOUR = "MSSQL_" + PDO_DBLIB_FLAVOUR;
}
ADD_FLAG('CFLAGS_PDO_DBLIB', "/I pecl /I ..\\pecl /D PDO_DBLIB_FLAVOUR=\\\"" + PDO_DBLIB_FLAVOUR + "\\\"");
}
ADD_EXTENSION_DEP('pdo_dblib', 'pdo');
}
|