pajoye Fri Aug 1 15:08:02 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/oci8 config.w32 php_oci8.h Log: - MFH: support for Oracle 11g (either 8 or 11g can be built but not both http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/config.w32?r1=1.3.4.2.2.2.2.2&r2=1.3.4.2.2.2.2.3&diff_format=u Index: php-src/ext/oci8/config.w32 diff -u php-src/ext/oci8/config.w32:1.3.4.2.2.2.2.2 php-src/ext/oci8/config.w32:1.3.4.2.2.2.2.3 --- php-src/ext/oci8/config.w32:1.3.4.2.2.2.2.2 Thu Jun 5 23:43:10 2008 +++ php-src/ext/oci8/config.w32 Fri Aug 1 15:07:59 2008 @@ -1,14 +1,38 @@ -// $Id: config.w32,v 1.3.4.2.2.2.2.2 2008/06/05 23:43:10 sixd Exp $ +// $Id: config.w32,v 1.3.4.2.2.2.2.3 2008/08/01 15:07:59 pajoye Exp $ // vim:ft=javascript +if (PHP_OCI8 != "no" && PHP_OCI8_11G != "no") { + if (!PHP_OCI8_SHARED && !PHP_OCI8_11G_SHARED) { + WARNING("oci8 and oci8-11g provide the same extension and cannot both be built statically"); + PHP_OCI8 = "no" + PHP_OCI8_11G = "no" + } +} + ARG_WITH("oci8", "OCI8 support", "no"); if (PHP_OCI8 != "no") { - if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", PHP_PHP_BUILD + "\\include\\instantclient;" + PHP_OCI8) && - CHECK_LIB("oci.lib", "oci8", PHP_PHP_BUILD + "\\lib\\instantclient;" + PHP_OCI8) - - ) { + oci8_dirs = new Array( + PHP_OCI8 + ); + + oci8_lib_paths = ""; + oci8_inc_paths = ""; + + // find the Oracle install + for (i = 0; i < oci8_dirs.length; i++) { + oci8_lib_paths += oci8_dirs[i] + "\\lib;"; + oci8_lib_paths += oci8_dirs[i] + "\\lib\\msvc;"; + oci8_inc_paths += oci8_dirs[i] + "\\include;"; + } + + oci8_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient;" + oci8_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient;"; + + if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", oci8_inc_paths) && + CHECK_LIB("oci.lib", "oci8", oci8_lib_paths)) + { EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c'); AC_DEFINE('HAVE_OCI8', 1); @@ -16,7 +40,43 @@ AC_DEFINE('HAVE_OCI_LOB_READ2', 1); } else { - WARNING("oci8 not enabled; Oracle Database libraries or Oracle 10g Instant Client not found"); + WARNING("oci8 not enabled: Oracle Database libraries or Oracle 10g Instant Client not found"); + PHP_OCI8 = "no" } } +ARG_WITH("oci8-11g", "OCI8 support using Oracle 11g Instant Client", "no"); + +if (PHP_OCI8_11G != "no") { + + oci8_11g_dirs = new Array( + PHP_OCI8_11G + ); + + oci8_11g_lib_paths = ""; + oci8_11g_inc_paths = ""; + + // find the Oracle install + for (i = 0; i < oci8_11g_dirs.length; i++) { + oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib;"; + oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib\\msvc;"; + oci8_11g_inc_paths += oci8_11g_dirs[i] + "\\include;"; + } + + oci8_11g_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_11;" + oci8_11g_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_11;"; + + if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) && + CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths)) + { + EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c', null, null, null, "ext\\oci8_11g") + + AC_DEFINE('HAVE_OCI8', 1); + AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1); + AC_DEFINE('HAVE_OCI_LOB_READ2', 1); + + } else { + WARNING("oci8-11g not enabled: Oracle Database libraries or Oracle 11g Instant Client not found"); + PHP_OCI8_11G = "no" + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8.h?r1=1.36.2.2.2.1.2.9&r2=1.36.2.2.2.1.2.10&diff_format=u Index: php-src/ext/oci8/php_oci8.h diff -u php-src/ext/oci8/php_oci8.h:1.36.2.2.2.1.2.9 php-src/ext/oci8/php_oci8.h:1.36.2.2.2.1.2.10 --- php-src/ext/oci8/php_oci8.h:1.36.2.2.2.1.2.9 Sun Jul 27 17:50:40 2008 +++ php-src/ext/oci8/php_oci8.h Fri Aug 1 15:07:59 2008 @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_oci8.h,v 1.36.2.2.2.1.2.9 2008/07/27 17:50:40 sixd Exp $ */ +/* $Id: php_oci8.h,v 1.36.2.2.2.1.2.10 2008/08/01 15:07:59 pajoye Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_H @@ -50,6 +50,7 @@ extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry +#define phpext_oci8_11g_ptr &oci8_module_entry PHP_MINIT_FUNCTION(oci);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php