[cello-devel] Logical pathnames. Workaround suggestion.

Kenny Tilton ktilton at nyc.rr.com
Thu Mar 11 00:27:41 UTC 2004

Frank Goenninger wrote:

>Hehe. One of the weaknesses of ANSI CL. So, yeah, I chose to implement
>a few little functions that allow for setting the "home directory" of
>a library location (sth like "/opt/opengl/freeglut/") and for setting
>the library name ("GLUT_SHLIB", sth like "libfreeglut.so" for Linux).
>Then the helper function for lib handling goes along a simple path:
>Is ???_SHLIB an absolute path ? (is the first char a "/")
>YES: Ok. So load just using this path.
>NO: Is the environment variable ???_HOME set ? 
>    YES: Ok. So take it and add "lib/" at the end.
>         Now take that ???_SHLIB value and add it also to the 
>         end of wha you just got. This is the thing to load then.
>    NO:  OK. So let's see if the special var ???-home-dir is set.
>         YES: Oh, ok. So use it like the ???_HOME var is set and do
>              the rest as described under YES.
>         NO:  Hm, bad. Now this is an error. And we shout it out.
>Simple. But good enough? Don't know. Works simple for me here, on Linux.
>And what I see from the paths in Kenny's Win32 code this should be ok 
>there, too.
>Any comments? Thx.
Where would the special var *???-home-dir* be defined? Is this just left 
to the user?  And the /lib extension becomes required, right?

I would say put everything in cello-config.lisp. Users are responsible 
for defining working values for *ftgl-shlib*. But it can point anywhere, 
not just <something>/lib. Users are also responsible for getting that 
loaded, perhaps via their Lisp's startup mechanism such as ACL supports. 
I gather environment variables are a preferred way of working, so we can 
indeed go with a function that checks first for an environment variable 
before trying a special.




Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film 

Your Project Here! http://alu.cliki.net/Industry%20Application

More information about the cello-devel mailing list