=== modified file 'lib/tdb/wscript'
--- old/lib/tdb/wscript	2011-03-15 01:22:20 +0000
+++ new/lib/tdb/wscript	2011-04-23 00:04:13 +0000
@@ -45,6 +45,7 @@
 
     if not conf.env.disable_python:
         # also disable if we don't have the python libs installed
+        conf.find_program('python', var='PYTHON')
         conf.check_tool('python')
         conf.check_python_version((2,4,2))
         conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False)

=== modified file 'lib/tevent/wscript'
--- old/lib/tevent/wscript	2011-03-15 01:22:20 +0000
+++ new/lib/tevent/wscript	2011-04-23 00:04:13 +0000
@@ -46,6 +46,7 @@
 
     if not conf.env.disable_python:
         # also disable if we don't have the python libs installed
+        conf.find_program('python', var='PYTHON')
         conf.check_tool('python')
         conf.check_python_version((2,4,2))
         conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False)

=== modified file 'wscript'
--- old/wscript	2011-04-21 15:15:16 +0000
+++ new/wscript	2011-04-23 00:04:13 +0000
@@ -26,12 +26,18 @@
     opt.RECURSE('lib/tdb')
     opt.RECURSE('lib/tevent')
     opt.RECURSE('lib/replace')
+    opt.tool_options('python') # options for disabling pyc or pyo compilation
 
 def configure(conf):
     conf.RECURSE('lib/tdb')
     conf.RECURSE('lib/tevent')
     conf.RECURSE('lib/popt')
     conf.RECURSE('lib/replace')
+    conf.find_program('python', var='PYTHON')
+    conf.find_program('xsltproc', var='XSLTPROC')
+    conf.check_tool('python')
+    conf.check_python_version((2,4,2))
+    conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True)
 
     # where does the default LIBDIR end up? in conf.env somewhere?
     #

