Skip to content

Commit 4813809

Browse files
committed
reworked config.w32
1 parent 3880c9e commit 4813809

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

config.w32

+20-10
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,30 @@
22

33
ARG_ENABLE("redis", "whether to enable redis support", "yes");
44
ARG_ENABLE("redis-session", "whether to enable sessions", "yes");
5-
ARG_ENABLE("redis-igbinary", "whether to enable igbinary support", "no");
5+
ARG_ENABLE("redis-igbinary", "whether to enable igbinary serializer support", "no");
66

77
if (PHP_REDIS != "no") {
8-
var sources = "redis.c library.c redis_array.c redis_array_impl.c"
9-
10-
if (PHP_REDIS_IGBINARY != "no") {
11-
sources += " igbinary\\igbinary.c igbinary\\hash_si.c igbinary\\hash_function.c";
12-
}
8+
EXTENSION("redis", "redis.c library.c redis_array_impl.c redis_array.c");
9+
AC_DEFINE("HAVE_REDIS", 1);
10+
ADD_FLAG("CFLAGS_REDIS", ' /D PHP_EXPORTS=1 ');
1311

1412
if (PHP_REDIS_SESSION != "no") {
15-
AC_DEFINE('PHP_SESSION', 1);
16-
sources += " redis_session.c";
13+
ADD_SOURCES(configure_module_dirname, "redis_session.c", "redis");
14+
ADD_EXTENSION_DEP("redis", "session");
15+
ADD_FLAG("CFLAGS_REDIS", ' /D PHP_SESSION=1 ');
16+
AC_DEFINE("HAVE_REDIS_SESSION", 1);
17+
}
18+
19+
if (PHP_REDIS_IGBINARY != "no") {
20+
if (CHECK_HEADER_ADD_INCLUDE("igbinary.h", "CFLAGS_REDIS", configure_module_dirname + "\\..\\igbinary")) {
21+
22+
ADD_EXTENSION_DEP("redis", "igbinary");
23+
AC_DEFINE("HAVE_REDIS_IGBINARY", 1);
24+
} else {
25+
WARNING("redis igbinary support not enabled");
26+
}
1727
}
1828

19-
AC_DEFINE("PHP_EXPORTS", 1);
20-
EXTENSION("redis", sources);
29+
2130
}
31+

0 commit comments

Comments
 (0)