Index: /branches/1.2/config.w32
===================================================================
--- /branches/1.2/config.w32	(revision 413)
+++ /branches/1.2/config.w32	(revision 466)
@@ -16,5 +16,4 @@
 	                      mmap.c \
 	                      mem.c \
-	                      xc_malloc.c \
 	                      xc_shm.c \
 	                      const_string.c \
@@ -114,4 +113,5 @@
 	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");
 	}
Index: /branches/1.2/config.m4
===================================================================
--- /branches/1.2/config.m4	(revision 411)
+++ /branches/1.2/config.m4	(revision 466)
@@ -28,5 +28,4 @@
                   mmap.c \
                   mem.c \
-                  xc_malloc.c \
                   xc_shm.c \
                   const_string.c \
@@ -52,4 +51,5 @@
   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
Index: /branches/1.2/xc_shm.c
===================================================================
--- /branches/1.2/xc_shm.c	(revision 163)
+++ /branches/1.2/xc_shm.c	(revision 466)
@@ -20,10 +20,14 @@
 {
 	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();
 }
