-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconfig.w32
More file actions
35 lines (29 loc) · 822 Bytes
/
config.w32
File metadata and controls
35 lines (29 loc) · 822 Bytes
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
// vim:ft=javascript
ARG_WITH("yaz", "YAZ support (ANSI/NISO Z39.50)", "no");
// this is a temporary hack
function yaz_check_version()
{
var c = null;
var v;
var yaz_h = CHECK_HEADER_ADD_INCLUDE("yaz/yaz-version.h", "CFLAGS_YAZ", PHP_YAZ);
if (!yaz_h) {
return false;
}
c = file_get_contents(yaz_h + "\\yaz\\yaz-version.h");
if (typeof(c) == "string" && c.match(/YAZ_VERSIONL\s+(0x[a-zA-Z0-9]+)/)) {
v = RegExp.$1;
if (parseInt(v) >= 0x50000) {
return true;
}
WARNING("yaz not enabled; version 5.0.0 or higher required; you have version " + v);
}
return false;
}
if (PHP_YAZ != "no") {
if (yaz_check_version() && CHECK_LIB("yaz5.lib", "yaz", PHP_YAZ)) {
EXTENSION('yaz', 'php_yaz.c');
AC_DEFINE('HAVE_YAZ', 1);
} else {
WARNING("yaz not enabled; libraries and headers not found");
}
}