diff --git a/SConstruct b/SConstruct index 4480c83..4cc10b8 100644 --- a/SConstruct +++ b/SConstruct @@ -483,6 +483,7 @@ if env.GetOption("clean") or env.GetOption("help"): usblibs = [] bluezlibs = [] ncurseslibs = [] + pylib = [] confdefs = [] manbuilder = False htmlbuilder = False @@ -668,6 +669,10 @@ else: "dbus_export" : ["libdbus-1"], } + if env['python']: + pylibs = [ 'python', 'python2.7' ] + pylib = [ lib for lib in pylibs if config.CheckLib(lib) ] + keys = map(lambda x: (x[0],x[2]), boolopts) + map(lambda x: (x[0],x[2]), nonboolopts) + map(lambda x: (x[0],x[2]), pathopts) keys.sort() for (key,help) in keys: @@ -1142,7 +1147,8 @@ else: CPPPATH=[includepy], CPPFLAGS=opt, CFLAGS=basecflags, - CXXFLAGS=basecflags) + CXXFLAGS=basecflags, + LIBS=pylib) python_objects={} python_compiled_libs = {}