Blame SOURCES/00113-more-configuration-flags.patch

6e8c2f
diff -up Python-2.6.5/configure.ac.more-configuration-flags Python-2.6.5/configure.ac
6e8c2f
--- Python-2.6.5/configure.ac.more-configuration-flags	2010-05-24 18:51:25.410111792 -0400
6e8c2f
+++ Python-2.6.5/configure.ac	2010-05-24 18:59:23.954986388 -0400
6e8c2f
@@ -2515,6 +2515,30 @@ else AC_MSG_RESULT(no)
6e8c2f
 fi],
6e8c2f
 [AC_MSG_RESULT(no)])
6e8c2f
 
6e8c2f
+AC_MSG_CHECKING(for --with-count-allocs)
6e8c2f
+AC_ARG_WITH(count-allocs,
6e8c2f
+[  --with(out)count-allocs  enable/disable per-type instance accounting], [
6e8c2f
+if test "$withval" != no
6e8c2f
+then 
6e8c2f
+  AC_DEFINE(COUNT_ALLOCS, 1,
6e8c2f
+    [Define to keep records of the number of instances of each type]) 
6e8c2f
+    AC_MSG_RESULT(yes)
6e8c2f
+else AC_MSG_RESULT(no)
6e8c2f
+fi],
6e8c2f
+[AC_MSG_RESULT(no)])
6e8c2f
+
6e8c2f
+AC_MSG_CHECKING(for --with-call-profile)
6e8c2f
+AC_ARG_WITH(call-profile,
6e8c2f
+[  --with(out)-call-profile  enable/disable statistics on function call invocation], [
6e8c2f
+if test "$withval" != no
6e8c2f
+then 
6e8c2f
+  AC_DEFINE(CALL_PROFILE, 1, 
6e8c2f
+    [Define to keep records on function call invocation]) 
6e8c2f
+    AC_MSG_RESULT(yes)
6e8c2f
+else AC_MSG_RESULT(no)
6e8c2f
+fi],
6e8c2f
+[AC_MSG_RESULT(no)])
6e8c2f
+
6e8c2f
 # Check for Python-specific malloc support
6e8c2f
 AC_MSG_CHECKING(for --with-pymalloc)
6e8c2f
 AC_ARG_WITH(pymalloc,
6e8c2f
diff -up Python-2.6.5/pyconfig.h.in.more-configuration-flags Python-2.6.5/pyconfig.h.in
6e8c2f
--- Python-2.6.5/pyconfig.h.in.more-configuration-flags	2010-05-24 18:51:45.677988086 -0400
6e8c2f
+++ Python-2.6.5/pyconfig.h.in	2010-05-24 19:00:44.163987730 -0400
6e8c2f
@@ -1019,6 +1019,12 @@
6e8c2f
 /* Define to profile with the Pentium timestamp counter */
6e8c2f
 #undef WITH_TSC
6e8c2f
 
6e8c2f
+/* Define to keep records of the number of instances of each type */
6e8c2f
+#undef COUNT_ALLOCS
6e8c2f
+
6e8c2f
+/* Define to keep records on function call invocation */
6e8c2f
+#undef CALL_PROFILE
6e8c2f
+
6e8c2f
 /* Define if you want pymalloc to be disabled when running under valgrind */
6e8c2f
 #undef WITH_VALGRIND
6e8c2f