|
2 | 2 |
|
3 | 3 | ARG_ENABLE("redis", "whether to enable redis support", "yes");
|
4 | 4 | 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"); |
6 | 6 |
|
7 | 7 | 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 '); |
13 | 11 |
|
14 | 12 | 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 | + } |
17 | 27 | }
|
18 | 28 |
|
19 |
| - AC_DEFINE("PHP_EXPORTS", 1); |
20 |
| - EXTENSION("redis", sources); |
| 29 | + |
21 | 30 | }
|
| 31 | + |
0 commit comments