diff --git a/config.m4 b/config.m4 index aa12390..35c4269 100644 --- a/config.m4 +++ b/config.m4 @@ -27,7 +27,6 @@ if test "$PHP_XCACHE" != "no"; then xcache.c \ mmap.c \ mem.c \ - xc_malloc.c \ xc_shm.c \ const_string.c \ opcode_spec.c \ @@ -51,6 +50,7 @@ if test "$PHP_XCACHE" != "no"; then [ --enable-xcache-test XCache: Enable self test - FOR DEVELOPERS ONLY!!], no, no) if test "$PHP_XCACHE_TEST" != "no"; then XCACHE_ENABLE_TEST=-DXCACHE_ENABLE_TEST + xcache_sources="$xcache_sources xc_malloc.c" AC_DEFINE([HAVE_XCACHE_TEST], 1, [Define to enable XCache self test]) else XCACHE_ENABLE_TEST= diff --git a/config.w32 b/config.w32 index 2325a12..c305b15 100644 --- a/config.w32 +++ b/config.w32 @@ -15,7 +15,6 @@ if (PHP_XCACHE != "no") { xcache.c \ mmap.c \ mem.c \ - xc_malloc.c \ xc_shm.c \ const_string.c \ opcode_spec.c \ @@ -113,6 +112,7 @@ if (PHP_XCACHE != "no") { ARG_ENABLE("xcache-test", "XCache: Enable self test - FOR DEVELOPERS ONLY!!", "no"); if (PHP_XCACHE_TEST != "no") { ADD_FLAG("XCACHE_ENABLE_TEST", "-DXCACHE_ENABLE_TEST"); + xcache_sources += " xc_malloc.c"; AC_DEFINE("HAVE_XCACHE_TEST", 1, "Define to enable XCache self test"); } else { diff --git a/xc_shm.c b/xc_shm.c index 0764c38..cdc8f99 100644 --- a/xc_shm.c +++ b/xc_shm.c @@ -19,12 +19,16 @@ static xc_shm_scheme_t xc_shm_schemes[10]; void xc_shm_init_modules() /* {{{ */ { extern void xc_shm_mem_init(); +#ifdef HAVE_XCACHE_TEST extern void xc_shm_malloc_register(); +#endif extern void xc_shm_mmap_register(); memset(xc_shm_schemes, 0, sizeof(xc_shm_schemes)); xc_shm_mem_init(); +#ifdef HAVE_XCACHE_TEST xc_shm_malloc_register(); +#endif xc_shm_mmap_register(); } /* }}} */