-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathconfig.w32
115 lines (104 loc) · 4.02 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// vim:ft=javascript
// config.w32 for solr extension
ARG_ENABLE('solr', 'Whether to enable Apache Solr support', 'no');
if (typeof PHP_SOLR_DEBUG == 'undefined') PHP_SOLR_DEBUG = 'no';
if(PHP_SOLR != 'no')
{
if(!CHECK_LIB('libcurl_a.lib;libcurl.lib', 'solr', PHP_SOLR) ||
!CHECK_HEADER_ADD_INCLUDE('curl/easy.h', 'CFLAGS_SOLR')) {
WARNING('solr was not enabled; curl libraries and/or headers not found');
PHP_SOLR = "no";
}
if(!CHECK_LIB('libssh2_a.lib;libssh2.lib', 'solr', PHP_SOLR)) {
WARNING('solr was not enabled; libssh2 library not found');
PHP_SOLR = "no";
}
if(!CHECK_LIB('nghttp2_a.lib;nghttp2.lib', 'solr', PHP_SOLR)) {
WARNING('solr was not enabled; nghttp2 library not found');
PHP_SOLR = "no";
}
if(!CHECK_LIB('crypt32.lib', 'solr', PHP_SOLR)) {
WARNING('solr was not enabled; crypt32 library not found');
PHP_SOLR = "no";
}
if(!CHECK_LIB('normaliz.lib', 'solr', PHP_SOLR)) {
WARNING('solr was not enabled; IDN libraries (normaliz.lib) not found');
PHP_SOLR = "no";
}
if (typeof SETUP_OPENSSL === "function") {
var ret = SETUP_OPENSSL('solr', PHP_SOLR);
if (ret < 1) {
WARNING('solr was not enabled; openssl libraries not found');
PHP_SOLR = "no";
}
} else {
if (!CHECK_LIB('ssleay32.lib;libssl.lib', 'solr', PHP_SOLR)
|| !CHECK_LIB('libeay32.lib;libcrypto.lib', 'solr', PHP_SOLR)) {
WARNING('solr was not enabled; openssl libraries not found');
PHP_SOLR = "no";
}
}
if(!CHECK_LIB('winmm.lib', 'solr', PHP_SOLR)
|| !CHECK_LIB('wldap32.lib', 'solr', PHP_SOLR)) {
WARNING('solr not enabled; ldap libraries not found');
PHP_SOLR = "no";
}
if (PHP_ZLIB == 'true') {
var zlib_files_found = false;
var require_dynamic_zlib = PHP_ZLIB_SHARED == 'true';
if (require_dynamic_zlib) {
zlib_files_found = CHECK_LIB('zlib.lib', 'solr', PHP_SOLR);
} else {
// statically built zlib
zlib_files_found = CHECK_LIB('zlib_a.lib', 'solr', PHP_SOLR);
}
if (!zlib_files_found) {
WARNING("zlibs not found");
WARNING('solr not enabled; zlib libraries not found, ensure zlib.lib, zlib_a.lib are present.');
PHP_SOLR = "no";
}
}
if(PHP_LIBXML == 'no' || !ADD_EXTENSION_DEP('solr', 'libxml')) {
WARNING('solr was not enabled; libxml is not enabled');
PHP_SOLR = "no";
} else {
if (!CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "solr", PHP_SOLR) ||
!CHECK_LIB("libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib", "solr", PHP_SOLR) ||
!CHECK_HEADER_ADD_INCLUDE('libxml/parser.h', 'CFLAGS_SOLR', PHP_PHP_BUILD + "\\include\\libxml2") ||
!CHECK_HEADER_ADD_INCLUDE('libxml/tree.h', 'CFLAGS_SOLR', PHP_PHP_BUILD + "\\include\\libxml2")
) {
WARNING('solr was not enabled; libxml or iconv not found');
PHP_SOLR = "no";
}
}
if(PHP_JSON == 'no' || !ADD_EXTENSION_DEP('solr', 'json')) {
WARNING('solr was not enabled; json is not enabled');
PHP_SOLR = "no";
}
if(PHP_SOLR != 'no') {
if(PHP_SOLR_DEBUG == 'yes') {
AC_DEFINE('SOLR_DEBUG', 1, 'Solr debugging set to on');
} else {
AC_DEFINE('SOLR_DEBUG_OFF', 1, 'Solr debugging set to off');
}
/* XXX tricky job here, override configure_module_dirname, define the basic extension,
then set it back*/
var old_conf_dir = configure_module_dirname;
configure_module_dirname = configure_module_dirname + "\\src";
EXTENSION('solr',
'php_solr.c php_solr_client.c php_solr_document.c php_solr_exception.c ' +
'php_solr_input_document.c php_solr_object.c php_solr_params.c php_solr_query.c ' +
'php_solr_response.c php_solr_utils.c solr_functions_client.c solr_functions_debug.c ' +
'solr_functions_document.c solr_functions_helpers.c solr_functions_params.c ' +
'solr_functions_response.c solr_string.c php_solr_dismax_query.c ' +
'php_solr_collapse_function.c php_solr_extract.c'
);
configure_module_dirname = old_conf_dir;
ADD_FLAG('CFLAGS_SOLR', '/I"' + configure_module_dirname + '" /D CURL_STATICLIB /D LIBXML_STATICLIB');
AC_DEFINE('HAVE_SOLR', 1, 'Solr support');
if (!PHP_SOLR_SHARED) {
ADD_FLAG("CFLAGS_SOLR", "/D LIBXML_STATIC");
}
ADD_EXTENSION_DEP('solr', 'libxml');
}
}