| 25 |
|
break |
| 26 |
|
env = conf.Finish () |
| 27 |
|
|
| 28 |
+ |
|
| 29 |
|
def find_gl(env): |
| 30 |
|
# Check for libGL, set flag |
| 31 |
< |
conf = SConf(env) |
| 32 |
< |
if conf.CheckLibWithHeader('GL', 'GL/gl.h', 'C', autoadd=0): |
| 33 |
< |
env['OGL'] = 1 |
| 34 |
< |
env = conf.Finish() |
| 35 |
< |
|
| 36 |
< |
|
| 31 |
> |
dl = [(None,None)] # standard search path |
| 32 |
> |
if env.has_key('X11INCLUDE'): # sometimes found there (Darwin) |
| 33 |
> |
dl.append((env['X11INCLUDE'], env['X11LIB'])) |
| 34 |
> |
#if os.name == 'nt': |
| 35 |
> |
# dl.append((some win specific dirs)) |
| 36 |
> |
#if some other weirdness: |
| 37 |
> |
# ... |
| 38 |
> |
for incdir, libdir in dl: |
| 39 |
> |
if incdir: env.Append(CPPPATH=[incdir]) # add temporarily |
| 40 |
> |
if libdir: env.Append(LIBPATH=[libdir]) |
| 41 |
> |
conf = SConf(env) |
| 42 |
> |
if conf.CheckLibWithHeader('GL', 'GL/gl.h', 'C', autoadd=0): |
| 43 |
> |
env['OGL'] = 1 |
| 44 |
> |
if incdir: env['CPPPATH'].remove(incdir) # not needed for now |
| 45 |
> |
if libdir: env['LIBPATH'].remove(libdir) |
| 46 |
> |
if env.has_key('OGL'): |
| 47 |
> |
if incdir: env.Replace(OGLINCLUDE=[incdir]) |
| 48 |
> |
#if libdir: env.Replace(OGLLIB=[libdir]) |
| 49 |
> |
conf.Finish() |
| 50 |
> |
break |
| 51 |
> |
conf.Finish() |
| 52 |
|
|