Index: /branches/1.2/config.w32
===================================================================
--- /branches/1.2/config.w32	(revision 466)
+++ /branches/1.2/config.w32	(revision 479)
@@ -71,4 +71,21 @@
 	DEFINE("XCACHE_INDENT", indent);
 	// }}}
+	// {{{ check for xcache-test
+	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 {
+		ADD_FLAG("XCACHE_ENABLE_TEST", "");
+	}
+	// }}}
+	// {{{ check for xcache-test
+	ARG_ENABLE("xcache-dprint", "XCache: Enable self debug print functions - FOR DEVELOPERS ONLY!!", "no");
+	if (PHP_XCACHE_DPRINT != "no") {
+		AC_DEFINE("HAVE_XCACHE_DPRINT", 1, "Define to enable XCache debug print functions");
+	}
+	// }}}
 	// {{{ create extension
 	EXTENSION("xcache", xcache_sources);
@@ -109,23 +126,6 @@
 	ADD_FLAG("CFLAGS_XCACHE", "/I " + builddir);
 	/// }}}
-	// {{{ check for xcache-test
-	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 {
-		ADD_FLAG("XCACHE_ENABLE_TEST", "");
-	}
-	// }}}
 	XCACHE_PROC_SOURCES=glob(srcdir + "\\processor\\*.m4").join(' ');
 	ADD_FLAG("XCACHE_PROC_SOURCES", XCACHE_PROC_SOURCES);
-	// {{{ check for xcache-test
-	ARG_ENABLE("xcache-dprint", "XCache: Enable self debug print functions - FOR DEVELOPERS ONLY!!", "no");
-	if (PHP_XCACHE_TEST != "no") {
-		AC_DEFINE("HAVE_XCACHE_TEST", 1, "Define to enable XCache debug print functions");
-	}
-	// }}}
 	// {{{ check for opcode_spec_def.h
 	STDOUT.Write("Checking if you have opcode_spec_def.h for XCache ... ");
Index: /branches/1.2/xc_malloc.c
===================================================================
--- /branches/1.2/xc_malloc.c	(revision 392)
+++ /branches/1.2/xc_malloc.c	(revision 479)
@@ -4,4 +4,8 @@
 #include <stdio.h>
 #include <string.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include "xc_shm.h"
 #include "php.h"
Index: /branches/1.2/xc_shm.c
===================================================================
--- /branches/1.2/xc_shm.c	(revision 466)
+++ /branches/1.2/xc_shm.c	(revision 479)
@@ -9,4 +9,8 @@
 #include <stdlib.h>
 #include <string.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include "xc_shm.h"
 
Index: /branches/1.2/config.m4
===================================================================
--- /branches/1.2/config.m4	(revision 466)
+++ /branches/1.2/config.m4	(revision 479)
@@ -44,7 +44,4 @@
   AC_DEFINE_UNQUOTED([XCACHE_MODULES], "$XCACHE_MODULES", [Define what modules is built with XCache])
 
-  PHP_NEW_EXTENSION(xcache, $xcache_sources, $ext_shared)
-  PHP_ADD_MAKEFILE_FRAGMENT()
-
   PHP_ARG_ENABLE(xcache-test, for XCache self test,
   [  --enable-xcache-test            XCache: Enable self test - FOR DEVELOPERS ONLY!!], no, no)
@@ -63,4 +60,7 @@
     AC_DEFINE([HAVE_XCACHE_DPRINT], 1, [Define to enable XCache debug print functions])
   fi
+
+  PHP_NEW_EXTENSION(xcache, $xcache_sources, $ext_shared)
+  PHP_ADD_MAKEFILE_FRAGMENT()
 
   AC_PATH_PROGS([XCACHE_AWK], [gawk awk])
