[svn:parrot] r44140 - trunk/runtime/parrot/library
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Thu Feb 18 19:08:45 UTC 2010
Author: NotFound
Date: Thu Feb 18 19:08:42 2010
New Revision: 44140
URL: https://trac.parrot.org/parrot/changeset/44140
Log:
[lib] provide location of SDL lib by env var SDLLIBPATH
Modified:
trunk/runtime/parrot/library/SDL.pir
Modified: trunk/runtime/parrot/library/SDL.pir
==============================================================================
--- trunk/runtime/parrot/library/SDL.pir Thu Feb 18 17:44:07 2010 (r44139)
+++ trunk/runtime/parrot/library/SDL.pir Thu Feb 18 19:08:42 2010 (r44140)
@@ -88,6 +88,18 @@
.local pmc libsdl
.local pmc sdl_function
+ .local pmc env
+ env = new 'Env'
+ .local string sdlpath
+ say'Hu'
+ sdlpath = env['SDLLIBPATH']
+ if sdlpath == '' goto default_locations
+ say sdlpath
+ loadlib libsdl, sdlpath
+ if libsdl goto OK
+ goto failed
+
+default_locations:
loadlib libsdl, 'libSDL'
if libsdl goto OK
@@ -103,6 +115,7 @@
loadlib libsdl, 'cygSDL-1-2-0'
if libsdl goto OK
+failed:
# failed to load libSDL
$P0 = new 'Exception'
$P0 = "libSDL not found!"
More information about the parrot-commits
mailing list