third_party: Update waf to verison 2.0.23
[bbaumbach/samba-autobuild/.git] / third_party / waf / waflib / Tools / python.py
index 07442561dff93088ac893ea1841c1066f55ac105..fb641e5e20d955b18288611135d07e0b543d81e8 100644 (file)
@@ -416,9 +416,14 @@ def check_python_headers(conf, features='pyembed pyext'):
 
                if not result:
                        path = [os.path.join(dct['prefix'], "libs")]
-                       conf.to_log("\n\n# try again with -L$prefix/libs, and pythonXY name rather than pythonX.Y (win32)\n")
+                       conf.to_log("\n\n# try again with -L$prefix/libs, and pythonXY rather than pythonX.Y (win32)\n")
                        result = conf.check(lib=name, uselib='PYEMBED', libpath=path, mandatory=False, msg='Checking for library %s in $prefix/libs' % name)
 
+               if not result:
+                       path = [os.path.normpath(os.path.join(dct['INCLUDEPY'], '..', 'libs'))]
+                       conf.to_log("\n\n# try again with -L$INCLUDEPY/../libs, and pythonXY rather than pythonX.Y (win32)\n")
+                       result = conf.check(lib=name, uselib='PYEMBED', libpath=path, mandatory=False, msg='Checking for library %s in $INCLUDEPY/../libs' % name)
+
                if result:
                        break # do not forget to set LIBPATH_PYEMBED