@@ -21,6 +21,27 @@ if (PHP_OCI8_11G != "no" && PHP_OCI8_12C != "no") {
2121 }
2222}
2323
24+ if ( PHP_OCI8 != "no" && PHP_OCI8_19 != "no" ) {
25+ if ( ! PHP_OCI8_SHARED && ! PHP_OCI8_19_SHARED ) {
26+ WARNING ( "oci8 and oci8-19 provide the same extension and cannot both be built statically" ) ;
27+ PHP_OCI8 = "no"
28+ }
29+ }
30+
31+ if ( PHP_OCI8_11G != "no" && PHP_OCI8_19 != "no" ) {
32+ if ( ! PHP_OCI8_11G_SHARED && ! PHP_OCI8_19_SHARED ) {
33+ WARNING ( "oci8-11g and oci8-19 provide the same extension and cannot both be built statically" ) ;
34+ PHP_OCI8_11G = "no"
35+ }
36+ }
37+
38+ if ( PHP_OCI8_12C != "no" && PHP_OCI8_19 != "no" ) {
39+ if ( ! PHP_OCI8_12C_SHARED && ! PHP_OCI8_19_SHARED ) {
40+ WARNING ( "oci8-12c and oci8-19 provide the same extension and cannot both be built statically" ) ;
41+ PHP_OCI8_12C = "no"
42+ }
43+ }
44+
2445ARG_WITH ( "oci8" , "OCI8 support" , "no" ) ;
2546
2647if ( PHP_OCI8 != "no" ) {
@@ -124,3 +145,37 @@ if (PHP_OCI8_12C != "no") {
124145 PHP_OCI8_12C = "no"
125146 }
126147}
148+
149+ ARG_WITH ( "oci8-19" , "OCI8 support using Oracle Database 19 Instant Client" , "no" ) ;
150+
151+ if ( PHP_OCI8_19 != "no" ) {
152+
153+ oci8_19_dirs = new Array (
154+ PHP_OCI8_19
155+ ) ;
156+
157+ oci8_19_lib_paths = "" ;
158+ oci8_19_inc_paths = "" ;
159+
160+ // find the Oracle install
161+ for ( i = 0 ; i < oci8_19_dirs . length ; i ++ ) {
162+ oci8_19_lib_paths += oci8_19_dirs [ i ] + "\\lib;" ;
163+ oci8_19_lib_paths += oci8_19_dirs [ i ] + "\\lib\\msvc;" ;
164+ oci8_19_inc_paths += oci8_19_dirs [ i ] + "\\include;" ;
165+ }
166+
167+ oci8_19_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_12;"
168+ oci8_19_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_12;" ;
169+
170+ if ( CHECK_HEADER_ADD_INCLUDE ( "oci.h" , "CFLAGS_OCI8_19" , oci8_19_inc_paths ) &&
171+ CHECK_LIB ( "oci.lib" , "oci8_19" , oci8_19_lib_paths ) )
172+ {
173+ EXTENSION ( 'oci8_19' , 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c' , null , null , null , "ext\\oci8_19" )
174+
175+ AC_DEFINE ( 'HAVE_OCI8' , 1 ) ;
176+ AC_DEFINE ( 'HAVE_OCI_INSTANT_CLIENT' , 1 ) ;
177+ } else {
178+ WARNING ( "oci8-19 not enabled: Oracle Database client libraries or Oracle Database 19 Instant Client not found" ) ;
179+ PHP_OCI8_19 = "no"
180+ }
181+ }
0 commit comments