1// vim:ft=javascript 2 3ARG_WITH("pdo-dblib", "freetds dblib (Sybase, MS-SQL) support for PDO", "no"); 4 5if (PHP_PDO_DBLIB != "no") { 6 /* if they pointed us to a freetds dir, pick that up, 7 * otherwise we'll poke around and look for MSSQL libs */ 8 9 if (CHECK_LIB("sybdb.lib", "pdo_dblib", PHP_PDO_DBLIB) && 10 CHECK_HEADER_ADD_INCLUDE("sybfront.h", "CFLAGS_PDO_DBLIB", 11 PHP_PDO_DBLIB, null, null, true)) 12 { 13 EXTENSION("pdo_dblib", "pdo_dblib.c dblib_driver.c dblib_stmt.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); 14 ADD_FLAG('CFLAGS_PDO_DBLIB', "/D PDO_DBLIB_FLAVOUR=\\\"freetds\\\""); 15 ADD_EXTENSION_DEP('pdo_dblib', 'pdo'); 16 } else { 17 WARNING("pdo_dblib not enabled, libraries or headers not found") 18 } 19} 20 21ARG_WITH("pdo-mssql", "Native MS-SQL support for PDO", "no"); 22 23if (PHP_PDO_MSSQL != "no") { 24 PDO_DBLIB_FLAVOUR = 0; 25 26 if (CHECK_LIB("sybdb.lib", "pdo_mssql", PHP_PDO_MSSQL) && 27 CHECK_HEADER_ADD_INCLUDE("sybfront.h", "CFLAGS_PDO_MSSQL", 28 PHP_PDO_MSSQL, null, null, true)) { 29 /* smells like FreeTDS (or maybe native sybase dblib) */ 30 PDO_DBLIB_FLAVOUR = "freetds"; 31 } 32 33 if (PDO_DBLIB_FLAVOUR != 0) { 34 EXTENSION("pdo_mssql", "pdo_dblib.c dblib_driver.c dblib_stmt.c", null, null, null, "ext\\pdo_mssql"); 35 ADD_FLAG('CFLAGS_PDO_MSSQL', "/D PDO_DBLIB_FLAVOUR=\\\"" + PDO_DBLIB_FLAVOUR + "\\\""); 36 ADD_EXTENSION_DEP('pdo_mssql', 'pdo'); 37 } else { 38 WARNING("pdo_mssql not enabled, libraries or headers not found") 39 } 40} 41