xref: /PHP-8.3/ext/oci8/config.w32 (revision 30a3280d)
1// vim:ft=javascript
2
3if (PHP_OCI8_11G != "no" && PHP_OCI8_12C != "no") {
4	if (!PHP_OCI8_11G_SHARED && !PHP_OCI8_12C_SHARED) {
5		WARNING("oci8-11g and oci8-12c provide the same extension and cannot both be built statically");
6		PHP_OCI8_11G = "no"
7	}
8}
9
10if (PHP_OCI8_11G != "no" && PHP_OCI8_19 != "no") {
11	if (!PHP_OCI8_11G_SHARED && !PHP_OCI8_19_SHARED) {
12		WARNING("oci8-11g and oci8-19 provide the same extension and cannot both be built statically");
13		PHP_OCI8_11G = "no"
14	}
15}
16
17if (PHP_OCI8_12C != "no" && PHP_OCI8_19 != "no") {
18	if (!PHP_OCI8_12C_SHARED && !PHP_OCI8_19_SHARED) {
19		WARNING("oci8-12c and oci8-19 provide the same extension and cannot both be built statically");
20		PHP_OCI8_12C = "no"
21	}
22}
23
24ARG_WITH("oci8-11g", "OCI8 support using Oracle 11g Instant Client", "no");
25
26if (PHP_OCI8_11G != "no") {
27
28	oci8_11g_dirs = new Array(
29		PHP_OCI8_11G
30	);
31
32	oci8_11g_lib_paths = "";
33	oci8_11g_inc_paths = "";
34
35	// find the Oracle install
36	for (i = 0; i < oci8_11g_dirs.length; i++) {
37		oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib;";
38		oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib\\msvc;";
39		oci8_11g_inc_paths += oci8_11g_dirs[i] + "\\include;";
40	}
41
42	oci8_11g_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_11;"
43	oci8_11g_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_11;";
44
45	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) &&
46			CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths))
47	{
48		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")
49
50		AC_DEFINE('HAVE_OCI8', 1);
51		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
52
53	} else {
54		WARNING("oci8-11g not enabled: Oracle Database client libraries or Oracle 11g Instant Client not found");
55		PHP_OCI8_11G = "no"
56	}
57}
58
59ARG_WITH("oci8-12c", "OCI8 support using Oracle Database 12c Instant Client", "no");
60
61if (PHP_OCI8_12C != "no") {
62
63	oci8_12c_dirs = new Array(
64		PHP_OCI8_12C
65	);
66
67	oci8_12c_lib_paths = "";
68	oci8_12c_inc_paths = "";
69
70	// find the Oracle install
71	for (i = 0; i < oci8_12c_dirs.length; i++) {
72		oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib;";
73		oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib\\msvc;";
74		oci8_12c_inc_paths += oci8_12c_dirs[i] + "\\include;";
75	}
76
77	oci8_12c_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_12;"
78	oci8_12c_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_12;";
79
80	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_12C", oci8_12c_inc_paths) &&
81			CHECK_LIB("oci.lib", "oci8_12c", oci8_12c_lib_paths))
82	{
83		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")
84
85		AC_DEFINE('HAVE_OCI8', 1);
86		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
87	} else {
88		WARNING("oci8-12c not enabled: Oracle Database client libraries or Oracle Database 12c Instant Client not found");
89		PHP_OCI8_12C = "no"
90	}
91}
92
93ARG_WITH("oci8-19", "OCI8 support using Oracle Database 19 Instant Client", "no");
94
95if (PHP_OCI8_19 != "no") {
96
97	oci8_19_dirs = new Array(
98		PHP_OCI8_19
99	);
100
101	oci8_19_lib_paths = "";
102	oci8_19_inc_paths = "";
103
104	// find the Oracle install
105	for (i = 0; i < oci8_19_dirs.length; i++) {
106		oci8_19_lib_paths += oci8_19_dirs[i] + "\\lib;";
107		oci8_19_lib_paths += oci8_19_dirs[i] + "\\lib\\msvc;";
108		oci8_19_inc_paths += oci8_19_dirs[i] + "\\include;";
109	}
110
111	oci8_19_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_19;"
112	oci8_19_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_19;";
113
114	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_19", oci8_19_inc_paths) &&
115			CHECK_LIB("oci.lib", "oci8_19", oci8_19_lib_paths))
116	{
117		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")
118
119		AC_DEFINE('HAVE_OCI8', 1);
120		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
121	} else {
122		WARNING("oci8-19 not enabled: Oracle Database client libraries or Oracle Database 19 Instant Client not found");
123		PHP_OCI8_19 = "no"
124	}
125}
126