ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/build_utils/find_libs.py
(Generate patch)

Comparing ray/build_utils/find_libs.py (file contents):
Revision 1.2 by schorsch, Sun Jul 4 12:08:47 2004 UTC vs.
Revision 1.3 by schorsch, Thu Oct 21 15:47:12 2004 UTC

# Line 25 | Line 25 | def find_x11(env):
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 <        elif env.has_key('X11INCLUDE'): # sometimes found there
35 <                incdir = env['X11INCLUDE']
36 <                libdir = env['X11LIB']
37 <                env.Append(CPPPATH=[incdir]) # add temporarily
38 <                #env.Append(LIBPATH=[libdir])
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
40                        env.Replace(OGLINCLUDE=incdir)
41                        env.Replace(OGLLIB=libdir)
44                  if incdir: env['CPPPATH'].remove(incdir) # not needed for now
45 <                #if libdir: env['LIBPATH'].remove(libdir)
46 <        conf.Finish()
47 <
48 <
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines