xref: /PHP-8.1/ext/oci8/config.w32 (revision 2e974c8c)
1// vim:ft=javascript
2
3if (PHP_OCI8 != "no" && PHP_OCI8_11G != "no") {
4	if (!PHP_OCI8_SHARED && !PHP_OCI8_11G_SHARED) {
5		WARNING("oci8 and oci8-11g provide the same extension and cannot both be built statically");
6		PHP_OCI8 = "no"
7	}
8}
9
10if (PHP_OCI8 != "no" && PHP_OCI8_12C != "no") {
11	if (!PHP_OCI8_SHARED && !PHP_OCI8_12C_SHARED) {
12		WARNING("oci8 and oci8-12c provide the same extension and cannot both be built statically");
13		PHP_OCI8 = "no"
14	}
15}
16
17if (PHP_OCI8_11G != "no" && PHP_OCI8_12C != "no") {
18	if (!PHP_OCI8_11G_SHARED && !PHP_OCI8_12C_SHARED) {
19		WARNING("oci8-11g and oci8-12c provide the same extension and cannot both be built statically");
20		PHP_OCI8_11G = "no"
21	}
22}
23
24if (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
31if (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
38if (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
45ARG_WITH("oci8", "OCI8 support", "no");
46
47if (PHP_OCI8 != "no") {
48
49	oci8_dirs = new Array(
50		PHP_OCI8
51	);
52
53	oci8_lib_paths = "";
54	oci8_inc_paths = "";
55
56	// find the Oracle install
57	for (i = 0; i < oci8_dirs.length; i++) {
58		oci8_lib_paths += oci8_dirs[i] + "\\lib;";
59		oci8_lib_paths += oci8_dirs[i] + "\\lib\\msvc;";
60		oci8_inc_paths += oci8_dirs[i] + "\\include;";
61	}
62
63	oci8_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient;"
64	oci8_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient;";
65
66	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", oci8_inc_paths) &&
67			CHECK_LIB("oci.lib", "oci8", oci8_lib_paths))
68	{
69		EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c');
70
71		AC_DEFINE('HAVE_OCI8', 1);
72		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
73
74	} else {
75		WARNING("oci8 not enabled: Oracle Database client libraries or Oracle 10g Instant Client not found");
76		PHP_OCI8 = "no"
77	}
78}
79
80ARG_WITH("oci8-11g", "OCI8 support using Oracle 11g Instant Client", "no");
81
82if (PHP_OCI8_11G != "no") {
83
84	oci8_11g_dirs = new Array(
85		PHP_OCI8_11G
86	);
87
88	oci8_11g_lib_paths = "";
89	oci8_11g_inc_paths = "";
90
91	// find the Oracle install
92	for (i = 0; i < oci8_11g_dirs.length; i++) {
93		oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib;";
94		oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib\\msvc;";
95		oci8_11g_inc_paths += oci8_11g_dirs[i] + "\\include;";
96	}
97
98	oci8_11g_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_11;"
99	oci8_11g_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_11;";
100
101	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) &&
102			CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths))
103	{
104		EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_11g")
105
106		AC_DEFINE('HAVE_OCI8', 1);
107		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
108
109	} else {
110		WARNING("oci8-11g not enabled: Oracle Database client libraries or Oracle 11g Instant Client not found");
111		PHP_OCI8_11G = "no"
112	}
113}
114
115ARG_WITH("oci8-12c", "OCI8 support using Oracle Database 12c Instant Client", "no");
116
117if (PHP_OCI8_12C != "no") {
118
119	oci8_12c_dirs = new Array(
120		PHP_OCI8_12C
121	);
122
123	oci8_12c_lib_paths = "";
124	oci8_12c_inc_paths = "";
125
126	// find the Oracle install
127	for (i = 0; i < oci8_12c_dirs.length; i++) {
128		oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib;";
129		oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib\\msvc;";
130		oci8_12c_inc_paths += oci8_12c_dirs[i] + "\\include;";
131	}
132
133	oci8_12c_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_12;"
134	oci8_12c_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_12;";
135
136	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_12C", oci8_12c_inc_paths) &&
137			CHECK_LIB("oci.lib", "oci8_12c", oci8_12c_lib_paths))
138	{
139		EXTENSION('oci8_12c', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_12c")
140
141		AC_DEFINE('HAVE_OCI8', 1);
142		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
143	} else {
144		WARNING("oci8-12c not enabled: Oracle Database client libraries or Oracle Database 12c Instant Client not found");
145		PHP_OCI8_12C = "no"
146	}
147}
148
149ARG_WITH("oci8-19", "OCI8 support using Oracle Database 19 Instant Client", "no");
150
151if (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}
182