--- configure.orig	2011-07-08 12:25:02.000000000 -0700
+++ configure	2011-09-10 10:56:33.000000000 -0700
@@ -9739,11 +9739,11 @@
 
 
 if test "x$with_python" = "xyes"; then
-    checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
+    checkPYTHON_CFLAGS=`${prefix}/bin/python2.6 -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
     if test "$?" -gt "0"; then
         with_python="no"
     else
-        checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('LIBPL'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null`
+        checkPYTHON_LIBS=-lpython2.6
         if test "$?" -gt "0"; then
             with_python="no"
         else
