From 736409632eb15f05433b94ec73ac843fa2291b0b Mon Sep 17 00:00:00 2001 From: nakeee Date: Tue, 9 Dec 2008 18:10:16 +0000 Subject: [PATCH] compile fix on linux git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1460 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 15 ------------ SconsTests/utils.py | 6 ++++- Source/Core/DolphinWX/Src/FrameWiimote.cpp | 4 +++- Source/Core/DolphinWX/Src/SConscript | 1 + Source/Plugins/Plugin_VideoOGL/Src/SConscript | 24 ++++++++++++------- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/SConstruct b/SConstruct index 93079624f6..5ec4ac8722 100644 --- a/SConstruct +++ b/SConstruct @@ -218,21 +218,6 @@ if env['HAVE_WX']: else: print "WX not found or disabled, not building GUI" -#get sdl stuff -if env['HAVE_SDL']: - env.ParseConfig('sdl-config --cflags --libs') - -# lib ao (needed for sound plugins) -if env['HAVE_AO']: - env.ParseConfig('pkg-config --cflags --libs ao') - -# bluetooth for wii -if env['HAVE_BLUEZ']: - env.ParseConfig('pkg-config --cflags --libs bluez') - -if env['HAVE_X11']: - env.ParseConfig("pkg-config x11 --cflags --libs") - # add methods from utils to env env.AddMethod(utils.filterWarnings) diff --git a/SconsTests/utils.py b/SconsTests/utils.py index 2c8a7ec3fa..409c24e94a 100644 --- a/SconsTests/utils.py +++ b/SconsTests/utils.py @@ -19,6 +19,8 @@ def CheckPKG(context, name): context.Message( 'Checking for %s... ' % name ) ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0] context.Result( ret ) + if ret: + context.env.ParseConfig('pkg-config --cflags --libs \'%s\'' % name) return int(ret) @@ -33,7 +35,9 @@ def CheckSDL(context, version): found = [int(n) for n in found_ver.split(".")] ret = (found >= required) - context.Result( ret ) + context.Result(ret) + if ret: + context.env.ParseConfig('sdl-config --cflags --libs') return int(ret) def GenerateRevFile(flavour, template, output): diff --git a/Source/Core/DolphinWX/Src/FrameWiimote.cpp b/Source/Core/DolphinWX/Src/FrameWiimote.cpp index 4e351bf2ad..fe10b4fc8f 100644 --- a/Source/Core/DolphinWX/Src/FrameWiimote.cpp +++ b/Source/Core/DolphinWX/Src/FrameWiimote.cpp @@ -351,6 +351,8 @@ wxBitmap CFrame::CreateBitmapForSpeakers(int BitmapType, bool On) return bitmap; } } + + return bitmap; } @@ -407,4 +409,4 @@ void CFrame::MoveSpeakers() m_StatBmp[i+4]->Move(x, y); } } -// ============== \ No newline at end of file +// ============== diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index b5c7daf6bb..b54136e07f 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -30,6 +30,7 @@ if wxenv['HAVE_WX']: 'PatchAddEdit.cpp', 'CheatsWindow.cpp', 'stdafx.cpp', + 'FrameWiimote.cpp', ] CPPDEFINES = [ diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index c56be3a27d..15278a1546 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -73,22 +73,30 @@ if gfxenv['osx64']: tests = {'CheckPKG' : utils.CheckPKG} conf = gfxenv.Configure(custom_tests = tests) -if not (conf.CheckPKG('gl') and conf.CheckPKG('glu')): - print name + " must have opengl (gl and glu) to be build" - Return() +if not conf.CheckPKG('gl'): + + if not conf.CheckLibWithHeader('gl', 'gl.h', 'c', 1): + print name + " must have opengl to be build" + +else: + gfxenv.ParseConfig("pkg-config gl --cflags --libs") + +#if not conf.CheckPKG('glu')): + +# Return() # check for xxf86vm gfxenv['HAVE_XXF86VM'] = conf.CheckPKG('xxf86vm') -gfxenv = conf.Finish() +conf.Finish() if gfxenv['HAVE_XXF86VM']: gfxenv.ParseConfig("pkg-config xxf86vm --cflags --libs") -gfxenv.ParseConfig("pkg-config gl --cflags --libs") -gfxenv.ParseConfig("pkg-config glu --cflags --libs") + +#gfxenv.ParseConfig("pkg-config glu --cflags --libs") if sys.platform == 'darwin': @@ -98,11 +106,11 @@ if sys.platform == 'darwin': # Use frameworks instead of plain libs, when possible. linkFlags += [ '-Wl,-framework,%s' % framework - for framework in [ 'Cg' ] + for framework in [ 'Cg', 'OpenGL' ] ] else: # Libraries without pkg-config support. - libs += [ 'Cg', 'CgGL' ] + libs += [ 'Cg', 'CgGL', 'GLU' ] # change to True if you want to compile with SDL