com php-src: Re-enable OCI8 DLL builds with Oracle 10g & 11g client libraries on Windows, in addition to Oracle 12c. From discussions with Anatol &
Pierre this seems to be the most direct way for the Windows PECL build scripts to automatically create links to the generated DLLs. The issue is that
the name php_oci8_12c.dll doesn't match the package name.: ext/oci8/config.w 32 ext/oci8/package.xml

From: Date: Wed, 09 Oct 2013 19:17:11 +0000
Subject: com php-src: Re-enable OCI8 DLL builds with Oracle 10g & 11g client libraries on Windows, in addition to Oracle 12c. From discussions with Anatol &
Pierre this seems to be the most direct way for the Windows PECL build scripts to automatically create links to the generated DLLs. The issue is that
the name php_oci8_12c.dll doesn't match the package name.: ext/oci8/config.w 32 ext/oci8/package.xml
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73420@lists.php.net to get a copy of this message
Commit: 141c2cb97aa1ce682d97704249ec23067bd1b89a Author: Christopher Jones <sixd@php.net> Wed, 9 Oct 2013 12:17:11 -0700 Parents: 3979b8b9c43f0544b9c5e127288c06fd46bc6ed6 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=141c2cb97aa1ce682d97704249ec23067bd1b89a Log: Re-enable OCI8 DLL builds with Oracle 10g & 11g client libraries on Windows, in addition to Oracle 12c. From discussions with Anatol & Pierre this seems to be the most direct way for the Windows PECL build scripts to automatically create links to the generated DLLs. The issue is that the name php_oci8_12c.dll doesn't match the package name. In the far future when php_oci8.dll (with Oracle 10g) is no longer built then another Windows PECL packaging fix will be needed.. Changed paths: M ext/oci8/config.w32 M ext/oci8/package.xml Diff: diff --git a/ext/oci8/config.w32 b/ext/oci8/config.w32 index 750f163..d83bf3f 100644 --- a/ext/oci8/config.w32 +++ b/ext/oci8/config.w32 @@ -1,6 +1,97 @@ // $Id$ // 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" + } +} + +if (PHP_OCI8 != "no" && PHP_OCI8_12C != "no") { + if (!PHP_OCI8_SHARED && !PHP_OCI8_12C_SHARED) { + WARNING("oci8 and oci8-12c provide the same extension and cannot both be built statically"); + PHP_OCI8 = "no" + } +} + +if (PHP_OCI8_11G != "no" && PHP_OCI8_12C != "no") { + if (!PHP_OCI8_11G_SHARED && !PHP_OCI8_12C_SHARED) { + WARNING("oci8-11g and oci8-12c provide the same extension and cannot both be built statically"); + PHP_OCI8_11G = "no" + } +} + +ARG_WITH("oci8", "OCI8 support", "no"); + +if (PHP_OCI8 != "no") { + + 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); + AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1); + + } else { + WARNING("oci8 not enabled: Oracle Database client 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); + + } else { + WARNING("oci8-11g not enabled: Oracle Database client libraries or Oracle 11g Instant Client not found"); + PHP_OCI8_11G = "no" + } +} + ARG_WITH("oci8-12c", "OCI8 support using Oracle Database 12c Instant Client", "no"); if (PHP_OCI8_12C != "no") { diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 47e5415..d85faf0 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -60,6 +60,9 @@ Bump mininum requirements for PHP OCI8 2.0 to PHP 5.2 and Oracle client library 10.2 (Note this will connect to Oracle Database 8.1.7 onwards). Use the older OCI8 1.4 if an earlier PHP version or older Oracle client library support is necessary. + +Re-enable php_oci8.dll and php_oci8_11g.dll for Windows builds so URL +linking works in the new Windows PECL infrastructure. </notes> <contents> <dir name="/">

« previous php.cvs (#73420) next »