diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-06-04 19:54:23 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-06-04 19:54:23 +0400 |
commit | e7a85df91e80bd7e66c36603f4e8fe5c0609c879 (patch) | |
tree | c9f65f6206a698bf26318a52a36602cfc9541571 /SConstruct | |
parent | 5bd324140d2b150a5f4edddf296f7e6eff835aac (diff) |
Bugfix #4089: Some Linux distros are using newer versions of OpenAL which
have FreeAlut (the OpenAL Utility Toolkit) separated out into libalut. Added
a configuration test to check for libalut and add to LIBPATH if detected.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 34 |
1 files changed, 34 insertions, 0 deletions
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: |