c6247fd
diff -up ./configure.autotool-intermediates ./configure
43e7c42
--- ./configure.autotool-intermediates	2013-04-09 11:24:01.024185796 +0200
43e7c42
+++ ./configure	2013-04-09 11:24:01.780183954 +0200
43e7c42
@@ -639,6 +639,8 @@ TRUE
c6247fd
 MACHDEP_OBJS
c6247fd
 DYNLOADFILE
c6247fd
 DLINCLDIR
c6247fd
+DTRACEHDRS
c6247fd
+DTRACEOBJS
c6247fd
 THREADOBJ
c6247fd
 LDLAST
c6247fd
 USE_THREAD_MODULE
43e7c42
@@ -659,6 +661,8 @@ OTHER_LIBTOOL_OPT
c6247fd
 UNIVERSAL_ARCH_FLAGS
c6247fd
 BASECFLAGS
c6247fd
 OPT
c6247fd
+DEBUG_SUFFIX
c6247fd
+DEBUG_EXT
c6247fd
 LN
43e7c42
 MKDIR_P
c6247fd
 INSTALL_DATA
43e7c42
@@ -795,8 +799,11 @@ with_pth
c6247fd
 enable_ipv6
c6247fd
 with_doc_strings
c6247fd
 with_tsc
c6247fd
+with_count_allocs
c6247fd
+with_call_profile
c6247fd
 with_pymalloc
c6247fd
 with_valgrind
c6247fd
+with_dtrace
c6247fd
 with_wctype_functions
c6247fd
 with_fpectl
c6247fd
 with_libm
43e7c42
@@ -1472,8 +1479,11 @@ Optional Packages:
c6247fd
   --with-pth              use GNU pth threading libraries
c6247fd
   --with(out)-doc-strings disable/enable documentation strings
c6247fd
   --with(out)-tsc         enable/disable timestamp counter profile
c6247fd
+  --with(out)count-allocs  enable/disable per-type instance accounting
c6247fd
+  --with(out)-call-profile  enable/disable statistics on function call invocation
c6247fd
   --with(out)-pymalloc    disable/enable specialized mallocs
c6247fd
   --with-valgrind         Enable Valgrind support
c6247fd
+  --with(out)-dtrace      disable/enable dtrace support
c6247fd
   --with-wctype-functions use wctype.h functions
c6247fd
   --with-fpectl           enable SIGFPE catching
c6247fd
   --with-libm=STRING      math library
43e7c42
@@ -5171,7 +5181,7 @@ esac
c6247fd
 $as_echo_n "checking LIBRARY... " >&6; }
c6247fd
 if test -z "$LIBRARY"
c6247fd
 then
c6247fd
-	LIBRARY='libpython$(VERSION).a'
c6247fd
+	LIBRARY='libpython$(VERSION)$(DEBUG_EXT).a'
c6247fd
 fi
c6247fd
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
c6247fd
 $as_echo "$LIBRARY" >&6; }
43e7c42
@@ -5343,8 +5353,8 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
c6247fd
 	  INSTSONAME="$LDLIBRARY".$SOVERSION
c6247fd
           ;;
b0a6ae1
     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
c6247fd
-	  LDLIBRARY='libpython$(VERSION).so'
c6247fd
-	  BLDLIBRARY='-L. -lpython$(VERSION)'
c6247fd
+	  LDLIBRARY='libpython$(VERSION)$(DEBUG_EXT).so'
c6247fd
+	  BLDLIBRARY='-L. -lpython$(VERSION)$(DEBUG_EXT)'
c6247fd
 	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
c6247fd
 	  case $ac_sys_system in
c6247fd
 	      FreeBSD*)
43e7c42
@@ -5367,7 +5377,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
c6247fd
 	  ;;
c6247fd
     OSF*)
c6247fd
 	  LDLIBRARY='libpython$(VERSION).so'
c6247fd
-	  BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
c6247fd
+	  BLDLIBRARY='-L. -lpython$(VERSION)'
c6247fd
 	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
c6247fd
 	  ;;
c6247fd
     atheos*)
43e7c42
@@ -5894,6 +5904,14 @@ $as_echo "no" >&6; }
c6247fd
 fi
c6247fd
 
c6247fd
 
c6247fd
+if test "$Py_DEBUG" = 'true'
c6247fd
+then
c6247fd
+	DEBUG_EXT=_d
c6247fd
+	DEBUG_SUFFIX=-debug
c6247fd
+fi
c6247fd
+
c6247fd
+
c6247fd
+
c6247fd
 # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
c6247fd
 # merged with this chunk of code?
c6247fd
 
43e7c42
@@ -9958,6 +9976,50 @@ $as_echo "no" >&6; }
c6247fd
 fi
c6247fd
 
c6247fd
 
c6247fd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-count-allocs" >&5
c6247fd
+$as_echo_n "checking for --with-count-allocs... " >&6; }
c6247fd
+
c6247fd
+# Check whether --with-count-allocs was given.
c6247fd
+if test "${with_count_allocs+set}" = set; then :
c6247fd
+  withval=$with_count_allocs;
c6247fd
+if test "$withval" != no
c6247fd
+then
c6247fd
+
c6247fd
+$as_echo "#define COUNT_ALLOCS 1" >>confdefs.h
c6247fd
+
c6247fd
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
c6247fd
+$as_echo "yes" >&6; }
c6247fd
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
c6247fd
+$as_echo "no" >&6; }
c6247fd
+fi
c6247fd
+else
c6247fd
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
c6247fd
+$as_echo "no" >&6; }
c6247fd
+fi
c6247fd
+
c6247fd
+
c6247fd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-call-profile" >&5
c6247fd
+$as_echo_n "checking for --with-call-profile... " >&6; }
c6247fd
+
c6247fd
+# Check whether --with-call-profile was given.
c6247fd
+if test "${with_call_profile+set}" = set; then :
c6247fd
+  withval=$with_call_profile;
c6247fd
+if test "$withval" != no
c6247fd
+then
c6247fd
+
c6247fd
+$as_echo "#define CALL_PROFILE 1" >>confdefs.h
c6247fd
+
c6247fd
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
c6247fd
+$as_echo "yes" >&6; }
c6247fd
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
c6247fd
+$as_echo "no" >&6; }
c6247fd
+fi
c6247fd
+else
c6247fd
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
c6247fd
+$as_echo "no" >&6; }
c6247fd
+fi
c6247fd
+
c6247fd
+
c6247fd
 # Check for Python-specific malloc support
c6247fd
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
c6247fd
 $as_echo_n "checking for --with-pymalloc... " >&6; }
43e7c42
@@ -10007,6 +10069,46 @@ fi
c6247fd
 
c6247fd
 fi
c6247fd
 
c6247fd
+# Check for dtrace support
c6247fd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
c6247fd
+$as_echo_n "checking for --with-dtrace... " >&6; }
c6247fd
+
c6247fd
+# Check whether --with-dtrace was given.
c6247fd
+if test "${with_dtrace+set}" = set; then :
c6247fd
+  withval=$with_dtrace;
c6247fd
+fi
c6247fd
+
c6247fd
+
c6247fd
+if test ! -z "$with_dtrace"
c6247fd
+then
c6247fd
+    if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null
c6247fd
+    then
c6247fd
+
c6247fd
+$as_echo "#define WITH_DTRACE 1" >>confdefs.h
c6247fd
+
c6247fd
+	with_dtrace="Sun"
c6247fd
+	DTRACEOBJS="Python/dtrace.o"
c6247fd
+	DTRADEHDRS=""
c6247fd
+    elif dtrace -h -o /dev/null -s $srcdir/Include/pydtrace.d
c6247fd
+    then
c6247fd
+
c6247fd
+$as_echo "#define WITH_DTRACE 1" >>confdefs.h
c6247fd
+
c6247fd
+	with_dtrace="Apple"
c6247fd
+	DTRACEOBJS=""
c6247fd
+	DTRADEHDRS="pydtrace.h"
c6247fd
+    else
c6247fd
+	with_dtrace="no"
c6247fd
+    fi
c6247fd
+else
c6247fd
+    with_dtrace="no"
c6247fd
+fi
c6247fd
+
c6247fd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
c6247fd
+$as_echo "$with_dtrace" >&6; }
c6247fd
+
c6247fd
+
c6247fd
+
c6247fd
 # Check for --with-wctype-functions
c6247fd
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
c6247fd
 $as_echo_n "checking for --with-wctype-functions... " >&6; }
c6247fd
diff -up ./pyconfig.h.in.autotool-intermediates ./pyconfig.h.in
43e7c42
--- ./pyconfig.h.in.autotool-intermediates	2013-04-09 11:24:01.020185806 +0200
43e7c42
+++ ./pyconfig.h.in	2013-04-09 11:24:02.088183204 +0200
c6247fd
@@ -18,6 +18,12 @@
c6247fd
 /* Define this if you have BeOS threads. */
c6247fd
 #undef BEOS_THREADS
c6247fd
 
c6247fd
+/* Define to keep records on function call invocation */
c6247fd
+#undef CALL_PROFILE
c6247fd
+
c6247fd
+/* Define to keep records of the number of instances of each type */
c6247fd
+#undef COUNT_ALLOCS
c6247fd
+
c6247fd
 /* Define if you have the Mach cthreads package */
c6247fd
 #undef C_THREADS
c6247fd
 
43e7c42
@@ -1119,12 +1125,6 @@
c6247fd
 /* Define to profile with the Pentium timestamp counter */
c6247fd
 #undef WITH_TSC
c6247fd
 
c6247fd
-/* Define to keep records of the number of instances of each type */
c6247fd
-#undef COUNT_ALLOCS
c6247fd
-
c6247fd
-/* Define to keep records on function call invocation */
c6247fd
-#undef CALL_PROFILE
c6247fd
-
c6247fd
 /* Define if you want pymalloc to be disabled when running under valgrind */
c6247fd
 #undef WITH_VALGRIND
c6247fd