|
1 | 1 | // $Id$
|
2 | 2 | // vim:ft=javascript
|
3 | 3 |
|
4 |
| -if (PHP_OCI8 != "no" && PHP_OCI8_11G != "no") { |
5 |
| - if (!PHP_OCI8_SHARED && !PHP_OCI8_11G_SHARED) { |
6 |
| - WARNING("oci8 and oci8-11g provide the same extension and cannot both be built statically"); |
7 |
| - PHP_OCI8 = "no" |
8 |
| - PHP_OCI8_11G = "no" |
9 |
| - } |
10 |
| -} |
11 |
| - |
12 |
| -ARG_WITH("oci8", "OCI8 support", "no"); |
13 |
| - |
14 |
| -if (PHP_OCI8 != "no") { |
15 |
| - |
16 |
| - oci8_dirs = new Array( |
17 |
| - PHP_OCI8 |
18 |
| - ); |
19 |
| - |
20 |
| - oci8_lib_paths = ""; |
21 |
| - oci8_inc_paths = ""; |
22 |
| - |
23 |
| - // find the Oracle install |
24 |
| - for (i = 0; i < oci8_dirs.length; i++) { |
25 |
| - oci8_lib_paths += oci8_dirs[i] + "\\lib;"; |
26 |
| - oci8_lib_paths += oci8_dirs[i] + "\\lib\\msvc;"; |
27 |
| - oci8_inc_paths += oci8_dirs[i] + "\\include;"; |
28 |
| - } |
29 |
| - |
30 |
| - oci8_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient;" |
31 |
| - oci8_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient;"; |
32 |
| - |
33 |
| - if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", oci8_inc_paths) && |
34 |
| - CHECK_LIB("oci.lib", "oci8", oci8_lib_paths)) |
35 |
| - { |
36 |
| - EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c'); |
37 |
| - |
38 |
| - AC_DEFINE('HAVE_OCI8', 1); |
39 |
| - AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1); |
40 |
| - AC_DEFINE('HAVE_OCI_LOB_READ2', 1); |
41 |
| - |
42 |
| - } else { |
43 |
| - WARNING("oci8 not enabled: Oracle Database libraries or Oracle 10g Instant Client not found"); |
44 |
| - PHP_OCI8 = "no" |
45 |
| - } |
46 |
| -} |
47 |
| - |
48 |
| -ARG_WITH("oci8-11g", "OCI8 support using Oracle 11g Instant Client", "no"); |
| 4 | +ARG_WITH("oci8-12c", "OCI8 support using Oracle Database 12c Instant Client", "no"); |
49 | 5 |
|
50 |
| -if (PHP_OCI8_11G != "no") { |
| 6 | +if (PHP_OCI8_12C != "no") { |
51 | 7 |
|
52 |
| - oci8_11g_dirs = new Array( |
53 |
| - PHP_OCI8_11G |
| 8 | + oci8_12c_dirs = new Array( |
| 9 | + PHP_OCI8_12C |
54 | 10 | );
|
55 | 11 |
|
56 |
| - oci8_11g_lib_paths = ""; |
57 |
| - oci8_11g_inc_paths = ""; |
| 12 | + oci8_12c_lib_paths = ""; |
| 13 | + oci8_12c_inc_paths = ""; |
58 | 14 |
|
59 | 15 | // find the Oracle install
|
60 |
| - for (i = 0; i < oci8_11g_dirs.length; i++) { |
61 |
| - oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib;"; |
62 |
| - oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib\\msvc;"; |
63 |
| - oci8_11g_inc_paths += oci8_11g_dirs[i] + "\\include;"; |
| 16 | + for (i = 0; i < oci8_12c_dirs.length; i++) { |
| 17 | + oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib;"; |
| 18 | + oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib\\msvc;"; |
| 19 | + oci8_12c_inc_paths += oci8_12c_dirs[i] + "\\include;"; |
64 | 20 | }
|
65 | 21 |
|
66 |
| - oci8_11g_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_11;" |
67 |
| - oci8_11g_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_11;"; |
| 22 | + oci8_12c_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_12;" |
| 23 | + oci8_12c_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_12;"; |
68 | 24 |
|
69 |
| - if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) && |
70 |
| - CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths)) |
| 25 | + if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_12C", oci8_12c_inc_paths) && |
| 26 | + CHECK_LIB("oci.lib", "oci8_12c", oci8_12c_lib_paths)) |
71 | 27 | {
|
72 |
| - EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c', null, null, null, "ext\\oci8_11g") |
| 28 | + EXTENSION('oci8_12c', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c', null, null, null, "ext\\oci8_12c") |
73 | 29 |
|
74 | 30 | AC_DEFINE('HAVE_OCI8', 1);
|
75 | 31 | AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
|
76 | 32 | AC_DEFINE('HAVE_OCI_LOB_READ2', 1);
|
77 | 33 |
|
78 | 34 | } else {
|
79 |
| - WARNING("oci8-11g not enabled: Oracle Database libraries or Oracle 11g Instant Client not found"); |
80 |
| - PHP_OCI8_11G = "no" |
| 35 | + WARNING("oci8-12c not enabled: Oracle Database client libraries or Oracle Database 12c Instant Client not found"); |
| 36 | + PHP_OCI8_12C = "no" |
81 | 37 | }
|
82 | 38 | }
|
0 commit comments