-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.w32
75 lines (68 loc) · 3.34 KB
/
config.w32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// $Id$
// vim:ft=javascript ts=4 sw=4 expandtab
ARG_WITH("ingres", "Ingres support", "no");
ARG_ENABLE("ingres2","Allow for a separate ingres2 extension", "no");
if (PHP_INGRES != "no") {
var have_ingres_files = 0;
if (PHP_INGRES2 == "yes") {
// rename the extension to ingres2, i.e. php_ingres2.dll
extension_name = "ingres2";
extension_cflags = "CFLAGS_INGRES2";
} else {
extension_name = "ingres";
extension_cflags = "CFLAGS_INGRES";
}
if (PHP_INGRES == "yes") {
// no path was supplied to --with-ingres
// Find Ingres header files and libaries through %II_SYSTEM%
var ii_system=WshShell.Environment("Process").Item("II_SYSTEM");
if (ii_system != "") {
if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", extension_cflags, ii_system + "\\ingres\\files;" + PHP_INGRES) &&
CHECK_LIB("libingres.lib", extension_name, PHP_INGRES + "\\ingres\\lib;") &&
CHECK_LIB("iilibapi.lib", extension_name, ii_system + "\\ingres\\lib;" + PHP_INGRES)) {
// Ingres r3
have_ingres_files = 1;
} else if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", extension_cflags, ii_system + "\\ingres\\files;" + PHP_INGRES) &&
CHECK_LIB("ingres.lib", extension_name, PHP_INGRES + "\\ingres\\lib;") &&
CHECK_LIB("oiapi.lib", extension_name, ii_system + "\\ingres\\lib;" + PHP_INGRES)) {
// Ingres 2.0/2.5/2.6
have_ingres_files = 1;
} else {
// ingres is missing files
WARNING("Ingres not enabled; libraries and headers not found in " + ii_system);
}
} else {
// Check php_build dirs for headers
if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", extension_cflags, PHP_PHP_BUILD + "\\include\\ingres") &&
CHECK_LIB("libingres.lib", extension_name, PHP_INGRES + "\\ingres\\lib;") &&
CHECK_LIB("iilibapi.lib", extension_name, PHP_PHP_BUILD + "\\lib")) {
have_ingres_files = 1;
} else {
// %II_SYSTEM% is not set
WARNING("Ingres not enabled; %II_SYSTEM% has not been defined");
}
}
} else {
// path supplied to --with-ingres
if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", extension_cflags, PHP_INGRES + "\\ingres\\files;") &&
CHECK_LIB("libingres.lib", extension_name, PHP_INGRES + "\\ingres\\lib;") &&
CHECK_LIB("iilibapi.lib", extension_name, PHP_INGRES + "\\ingres\\lib;")) {
have_ingres_files = 1;
} else if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", extension_cflags, PHP_INGRES + "\\ingres\\files;" + PHP_INGRES) &&
CHECK_LIB("ingres.lib", extension_name, PHP_INGRES + "\\ingres\\lib;") &&
CHECK_LIB("oiapi.lib", extension_name, PHP_INGRES + "\\ingres\\lib;")) {
// Ingres 2.0/2.5/2.6
have_ingres_files = 1;
} else {
// cannot find files in supplied path
WARNING("Ingres not enabled; libraries and headers not found");
}
}
if (have_ingres_files) {
AC_DEFINE('HAVE_INGRES', 1);
if (PHP_INGRES2 != "no") {
AC_DEFINE('HAVE_INGRES2', 1);
}
EXTENSION(extension_name,"ingres.c convertUTF.c");
}
}