Blame SOURCES/05000-autotool-intermediates.patch

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