-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.w32
More file actions
38 lines (32 loc) · 1.14 KB
/
config.w32
File metadata and controls
38 lines (32 loc) · 1.14 KB
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
// vim:ft=javascript
ARG_WITH("libarchive", "libarchive support", "no");
if (PHP_LIBARCHIVE != "no") {
if (CHECK_LIB("archive.lib", "archive", PHP_LIBARCHIVE) &&
CHECK_HEADER_ADD_INCLUDE("archive.h", "CFLAGS_ARCHIVE",
PHP_LIBARCHIVE + "/include;" + PHP_PHP_BUILD + "/include")) {
EXTENSION("archive", "libarchive.c stream.c stream_callbacks.c", true, "/DLIBARCHIVE_STATIC /Zc:preprocessor");
// Always-needed Windows system libs.
var libs = "bcrypt.lib xmllite.lib crypt32.lib ws2_32.lib";
// Conditionally link optional compression/crypto dep static libs
// that may have been bundled into the install prefix (e.g. from vcpkg).
var la_lib = PHP_LIBARCHIVE + "\\lib\\";
var optional = [
"liblzma.lib", "lzma.lib",
"zlib.lib",
"bz2.lib",
"lz4.lib",
"zstd.lib", "zstd_static.lib",
"libssl.lib", "libcrypto.lib",
];
for (var i = 0; i < optional.length; i++) {
if (FSO.FileExists(la_lib + optional[i])) {
libs += " " + optional[i];
}
}
ADD_FLAG("LIBS_ARCHIVE", libs);
AC_DEFINE("HAVE_LIBARCHIVE", 1, "Libarchive support");
} else {
WARNING("libarchive: library not found");
PHP_LIBARCHIVE = "no";
}
}