--- SConstruct.orig	2016-04-09 13:14:00 UTC
+++ SConstruct
@@ -95,7 +95,7 @@ opts.AddVariables(
     ('compilerprefix', 'sets the prefix for the cross linux compiler, example: i686-pc-linux-gnu-', ''),
 )
 
-env = Environment(ENV = os.environ, options = opts)
+env = Environment(ENV = os.environ, options = opts, CC = os.environ['CC'], CXX = os.environ['CXX'])
 Help(opts.GenerateHelpText(env))
 
 env.Append( CCFLAGS = [ '-DPACKAGE_VERSION=\\"' + NPVERSION + '\\"' ] )
@@ -202,6 +202,7 @@ elif thisplatform == 'win32':
 else:
     networkenv.ParseConfig(env['sdlconfig'] + ' --cflags --libs')
     env.ParseConfig(env['sdlconfig'] + ' --cflags --libs')
+    env.Append( _LIBFLAGS = [ '-L%%LOCALBASE%%/lib' ] )
     # note: for some magic reason, now doesn't need to put the full path for
     # SDL_mixer when using mingw crosscompilation
     env.Append( LIBS = ['SDL_mixer' ] )
