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