diff --git a/SConstruct b/SConstruct index fadd4b9dda0..f6385b17a34 100644 --- a/SConstruct +++ b/SConstruct @@ -40,6 +40,8 @@ import shutil import glob import re +print sys.version_info + import tools.Blender import tools.btools import tools.bcolors @@ -166,6 +168,38 @@ if env.has_key('BF_DEBUG_LIBS'): printdebug = B.arguments.get('BF_LISTDEBUG', 0) +# see if this linux distro has libalut + +if env['OURPLATFORM'] == 'linux2' : + if env['WITH_BF_OPENAL']: + mylib_test_source_file = """ + #include "AL/alut.h" + int main(int argc, char **argv) + { + alutGetMajorVersion(); + return 0; + } + """ + + def CheckFreeAlut(context,env): + context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC ) + env['LIBS'] = 'alut' + result = context.TryLink(mylib_test_source_file, '.c') + context.Result(result) + return result + + env2 = env.Copy( LIBPATH = env['BF_OPENAL'] ) + conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, '.sconf_temp', '/dev/null' ) + if conf.CheckFreeAlut( env2 ): + env['BF_OPENAL_LIB'] += ' alut' + del env2 + for root, dirs, files in os.walk('.sconf_temp', topdown=False): + for name in files: + os.remove(os.path.join(root, name)) + for name in dirs: + os.rmdir(os.path.join(root, name)) + os.rmdir(root) + if len(B.quickdebug) > 0 and printdebug != 0: print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC for l in B.quickdebug: