From: <tz...@us...> - 2007-06-28 01:13:18
|
Revision: 2099 http://svn.sourceforge.net/freeorion/revision/?rev=2099&view=rev Author: tzlaine Date: 2007-06-27 18:13:17 -0700 (Wed, 27 Jun 2007) Log Message: ----------- Changed all the ALUT detection code to check for FreeALUT as well, since it is called one on some systems, and the other on other systems. Modified Paths: -------------- trunk/FreeOrion/SConstruct Modified: trunk/FreeOrion/SConstruct =================================================================== --- trunk/FreeOrion/SConstruct 2007-06-26 07:56:19 UTC (rev 2098) +++ trunk/FreeOrion/SConstruct 2007-06-28 01:13:17 UTC (rev 2099) @@ -56,9 +56,9 @@ options.Add('with_openal', 'Root directory of OpenAL installation') options.Add('with_openal_include', 'Specify exact include dir for OpenAL headers') options.Add('with_openal_libdir', 'Specify exact library dir for OpenAL library') -options.Add('with_alut', 'Root directory of ALUT installation') -options.Add('with_alut_include', 'Specify exact include dir for ALUT headers') -options.Add('with_alut_libdir', 'Specify exact library dir for ALUT library') +options.Add('with_alut', 'Root directory of ALUT/FreeALUT installation') +options.Add('with_alut_include', 'Specify exact include dir for ALUT/FreeALUT headers') +options.Add('with_alut_libdir', 'Specify exact library dir for ALUT/FreeALUT library') options.Add('with_vorbis', 'Root directory of Vorbis installation') options.Add('with_vorbis_include', 'Specify exact include dir for Vorbis headers') options.Add('with_vorbis_libdir', 'Specify exact library dir for Vorbis library') @@ -316,7 +316,7 @@ found_it_with_pkg_config = False - # OpenAL & ALUT + # OpenAL & ALUT/FreeALUT AppendPackagePaths('openal', env) found_it_with_pkg_config = False if pkg_config: @@ -334,16 +334,20 @@ AppendPackagePaths('alut', env) found_it_with_pkg_config = False if pkg_config: - if conf.CheckPkg('alut', alut_pkgconfig_version): + if conf.CheckPkg('freealut', alut_pkgconfig_version): env.ParseConfig('pkg-config --cflags --libs freealut') found_it_with_pkg_config = True + elif conf.CheckPkg('alut', alut_pkgconfig_version): + env.ParseConfig('pkg-config --cflags --libs alut') + found_it_with_pkg_config = True if not found_it_with_pkg_config: if str(Platform()) == 'win32': env.AppendUnique(LIBS = [ 'ALut.lib' ]) else: - if not conf.CheckLibWithHeader('alut', 'AL/alut.h', 'C', 'alutInitWithoutContext(0,0);'): + if not conf.CheckLibWithHeader('freealut', 'AL/alut.h', 'C', 'alutInitWithoutContext(0,0);') \ + and not conf.CheckLibWithHeader('alut', 'AL/alut.h', 'C', 'alutInitWithoutContext(0,0);'): Exit(1) # Vorbis @@ -425,6 +429,26 @@ if str(Platform()) == 'win32': AppendPackagePaths('zlib', env) + # Python + import distutils.sysconfig + env.AppendUnique(LINKFLAGS = [ + Split(distutils.sysconfig.get_config_var('LINKFORSHARED')) + ]) + print Split(distutils.sysconfig.get_config_var('LINKFORSHARED')) + if not (env.has_key('with_python_include') and env.has_key('with_python_libdir') and env.has_key('python_suffix')): + python_include = distutils.sysconfig.get_python_inc() + python_libdir = distutils.sysconfig.get_config_var('LIBDIR') + python_suffix = distutils.sysconfig.get_config_var('VERSION') + else: + python_include = env['with_python_include'] + python_libdir = env['with_python_libdir'] + python_suffix = env['python_suffix'] + + #env.AppendUnique(CPPPATH = [python_include]) + #env.AppendUnique(LIBPATH = [python_libdir]) + if not conf.CheckLibWithHeader('python' + python_suffix, 'Python.h', 'C', 'Py_Initialize();'): + Exit(1) + # finish config and save results for later conf.CheckConfigSuccess(True) conf.Finish(); |