Don't try to link with dynamic versions of the LZO/SFML/SOIL libraries

on Linux when building a release image to make it more general.

OpenCL is new in OS X 10.6, so we can't restrict ourselves to the 10.5
compatibility SDK when OpenCL is enabled.

OpenCL really should be a runtime option (and weakly linked on OS X).


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5727 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-06-16 16:35:19 +00:00
parent 05915922c5
commit b63e15e412
1 changed files with 20 additions and 9 deletions

View File

@ -251,10 +251,17 @@ if sys.platform == 'darwin':
conf = env.Configure(custom_tests = tests, conf = env.Configure(custom_tests = tests,
config_h="Source/Core/Common/Src/Config.h") config_h="Source/Core/Common/Src/Config.h")
env['HAVE_OPENCL'] = 0
if env['opencl']:
env['HAVE_OPENCL'] = conf.CheckPKG('OpenCL')
# OS X specifics # OS X specifics
if sys.platform == 'darwin': if sys.platform == 'darwin':
# OpenCL is new in OS X 10.6. Other than OpenCL,
# we try to maintain 10.5 compatibility, however.
if not env['HAVE_OPENCL']:
compileFlags += ['-isysroot', '/Developer/SDKs/MacOSX10.5.sdk']
compileFlags += ['-mmacosx-version-min=10.5'] compileFlags += ['-mmacosx-version-min=10.5']
compileFlags += ['-isysroot', '/Developer/SDKs/MacOSX10.5.sdk']
conf.Define('MAP_32BIT', 0) conf.Define('MAP_32BIT', 0)
env['CC'] = "gcc-4.2" env['CC'] = "gcc-4.2"
env['CFLAGS'] = ['-x', 'objective-c'] env['CFLAGS'] = ['-x', 'objective-c']
@ -273,14 +280,21 @@ shared = {}
shared['glew'] = shared['lzo'] = shared['sdl'] = \ shared['glew'] = shared['lzo'] = shared['sdl'] = \
shared['soil'] = shared['sfml'] = shared['zlib'] = 0 shared['soil'] = shared['sfml'] = shared['zlib'] = 0
if not sys.platform == 'darwin': if not sys.platform == 'darwin':
# GLEW, SDL and zlib are present on almost all Linux systems,
# so it is generally safe to link with their shared distribution
# libraries even when we are building a redistributable image.
shared['glew'] = conf.CheckPKG('GLEW') shared['glew'] = conf.CheckPKG('GLEW')
shared['lzo'] = conf.CheckPKG('lzo2')
shared['sdl'] = conf.CheckPKG('SDL') shared['sdl'] = conf.CheckPKG('SDL')
shared['soil'] = conf.CheckPKG('SOIL')
# TODO: Check the version of sfml. It should be at least version 1.5
shared['sfml'] = conf.CheckPKG('sfml-network') and \
conf.CheckCXXHeader("SFML/Network/Ftp.hpp")
shared['zlib'] = conf.CheckPKG('z') shared['zlib'] = conf.CheckPKG('z')
# LZO, SFML and SOIL are not typically part of a default install
# of most Linux distributions, so only link with any of these
# shared libraries if we are just doing a development build.
if flavour != 'release':
shared['lzo'] = conf.CheckPKG('lzo2')
# TODO: Check the version of sfml. It should be at least version 1.5
shared['sfml'] = conf.CheckPKG('sfml-network') and \
conf.CheckCXXHeader("SFML/Network/Ftp.hpp")
shared['soil'] = conf.CheckPKG('SOIL')
for lib in shared: for lib in shared:
if not shared[lib]: if not shared[lib]:
print "Shared library " + lib + " not detected, " \ print "Shared library " + lib + " not detected, " \
@ -337,13 +351,10 @@ if not env['HAVE_WX'] and not env['nowx']:
print "WX libraries not found - see config.log" print "WX libraries not found - see config.log"
Exit(1) Exit(1)
env['HAVE_OPENCL'] = 0
if not sys.platform == 'win32': if not sys.platform == 'win32':
if not conf.CheckPKG('Cg'): if not conf.CheckPKG('Cg'):
print "Must have Cg framework from NVidia to build" print "Must have Cg framework from NVidia to build"
Exit(1) Exit(1)
if env['opencl']:
env['HAVE_OPENCL'] = conf.CheckPKG('OpenCL')
env['HAVE_BLUEZ'] = 0 env['HAVE_BLUEZ'] = 0
env['HAVE_ALSA'] = env['HAVE_AO'] = env['HAVE_OPENAL'] = \ env['HAVE_ALSA'] = env['HAVE_AO'] = env['HAVE_OPENAL'] = \