-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.w32
71 lines (64 loc) · 3.28 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
// vim:ft=javascript
ARG_ENABLE('rindow_openblas', 'rindow_openblas support', 'no');
ARG_WITH('openblas', 'openblas support', 'no');
ARG_WITH('flang', 'flang support', 'no');
ARG_WITH('matlib', 'matlib support', 'no');
// OpenMP compile option
// /openmp:experimental
if (PHP_RINDOW_OPENBLAS != 'no') {
var PHP_RINDOW_OPENBLAS_CFLAGS="\
/Qvec-report:1 \
/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 \
/openmp:experimental \
/I" + configure_module_dirname + " \
";
if(CHECK_HEADER_ADD_INCLUDE("cblas.h", "rindow_openblas", PHP_OPENBLAS + '/build/build/generated')) {
PHP_RINDOW_OPENBLAS_CFLAGS = PHP_RINDOW_OPENBLAS_CFLAGS + "\
/I" + PHP_OPENBLAS + "/build \
/I" + PHP_OPENBLAS + "/build/generated \
";
} else if(CHECK_HEADER_ADD_INCLUDE("cblas.h", "rindow_openblas", PHP_OPENBLAS + '/include')) {
PHP_RINDOW_OPENBLAS_CFLAGS = PHP_RINDOW_OPENBLAS_CFLAGS + "\
/I" + PHP_OPENBLAS + "/include \
";
} else {
ERROR("NOT FOUND: OpenBLAS header files. Please set --with-openblas=/some/directory/path");
}
if(CHECK_HEADER_ADD_INCLUDE("Interop/Polite/Math/Matrix.h", "rindow_openblas", configure_module_dirname + '/vendor/interop-phpobjects/polite-math/include')) {
PHP_RINDOW_OPENBLAS_CFLAGS = PHP_RINDOW_OPENBLAS_CFLAGS + "\
/I" + configure_module_dirname + "/vendor/interop-phpobjects/polite-math/include \
";
} else {
ERROR("NOT FOUND: LinearBuffer interface header files. Please execute \"composer update\" on development directory.");
}
if(CHECK_HEADER_ADD_INCLUDE("rindow/matlib.h", "rindow_openblas", PHP_MATLIB + '/include')) {
PHP_RINDOW_OPENBLAS_CFLAGS = PHP_RINDOW_OPENBLAS_CFLAGS + "\
/I" + PHP_MATLIB + "/include \
/I" + PHP_MATLIB + "/src \
/I" + PHP_MATLIB + "/build/src \
";
} else {
ERROR("NOT FOUND: Rindow Matlib header files. Please set --with-matlib=/some/directory/path");
}
// Condense whitespace in CFLAGS
PHP_RINDOW_OPENBLAS_CFLAGS = PHP_RINDOW_OPENBLAS_CFLAGS.replace(/\s+/g, ' ');
AC_DEFINE('HAVE_RINDOW_OPENBLAS', 1, 'rindow_openblas support enabled');
AC_DEFINE('OPENBLAS_HAVE_IAMIN', 1, 'openblas have iamin');
EXTENSION('rindow_openblas', 'rindow_openblas.c openblas_client.c', null, PHP_RINDOW_OPENBLAS_CFLAGS);
ADD_SOURCES(configure_module_dirname + "/src/Rindow/OpenBLAS", "Buffer.c Blas.c Lapack.c Math.c", "rindow_openblas");
// if (CHECK_LIB("openblas.lib", "rindow_openblas", PHP_OPENBLAS + '/build/lib/Release')) {
// ADD_FLAG("LIBS_OPENBLAS", "openblas.lib");
// ADD_FLAG("LDFLAGS", '/libpath:"\\"' + PHP_OPENBLAS + '/build/lib/Release' + '\\"" ');
// } else if (CHECK_LIB("openblas.lib", "rindow_openblas", PHP_OPENBLAS + '/lib')) {
// ADD_FLAG("LIBS_OPENBLAS", "openblas.lib");
// ADD_FLAG("LDFLAGS", '/libpath:"\\"' + PHP_OPENBLAS + '/lib' + '\\"" ');
// } else if (CHECK_LIB("libopenblas.lib", "rindow_openblas", PHP_OPENBLAS + '/lib')) {
// ADD_FLAG("LIBS_OPENBLAS", "libopenblas.lib");
// ADD_FLAG("LDFLAGS", '/libpath:"\\"' + PHP_OPENBLAS + '/lib' + '\\"" ');
// } else {
// ERROR("NOT FOUND: OpenBLAS library files. Please set --with-openblas=/some/directory/path");
// }
if (CHECK_LIB("flang.lib", "rindow_openblas", PHP_FLANG + '/lib')) {
ADD_FLAG("LDFLAGS", '/libpath:"\\"' + PHP_FLANG + '/lib' + '\\"" ');
}
}