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.4 by schorsch, Tue Dec 23 15:03:59 2008 UTC vs.
Revision 1.8 by schorsch, Thu Mar 10 17:36:18 2016 UTC

# Line 1 | Line 1
1 + from __future__ import print_function
2 +
3   import os
4  
5   from SCons.SConf import SConf # aka Configure
6  
7 + def find_radlib(env):
8 +        v = env.FindFile('helvet.fnt', './lib')
9 +        if not v:
10 +                print('''
11 +        Radiance auxiliary support files not found.
12 +        -> Download from radiance-online.org and extract.
13 +        ''')
14 +                env.Exit()
15 +
16   def find_x11(env):
17          # Search for libX11, remember the X11 library and include dirs
18          for d in ('/usr/X11R6', '/usr/X11', '/usr/openwin'):
# Line 55 | Line 66 | def find_libtiff(env):
66          if cfgi or cfgl:
67                  dl.insert(0,(cfgi, cfgl))
68          for incdir, libdir in dl:
69 <                if incdir: env.Prepend(CPPPATH=[incdir]) # add temporarily
70 <                if libdir: env.Prepend(LIBPATH=[libdir])
71 <                conf = SConf(env)
72 <                if conf.CheckLib('tiff', 'TIFFInitSGILog',
73 <                                header='void TIFFInitSGILog(void);', autoadd=0):
69 >                xenv = env.Clone()
70 >                if incdir: xenv.Prepend(CPPPATH=[incdir]) # add temporarily
71 >                if libdir:
72 >                        xenv.Prepend(LIBPATH=[libdir])
73 >                        xenv.Prepend(PATH=[libdir])
74 >                conf = SConf(xenv)
75 >                libname = 'tiff'
76 >                if os.name == 'nt':
77 >                        xenv['INCPREFIX'] = '/I ' # Bug in SCons (uses '/I')
78 >                        libname = 'libtiff'
79 >                if conf.CheckLib(libname, 'TIFFInitSGILog',
80 >                                header='''#include "tiff.h"''', autoadd=0):
81                          env['TIFFLIB_INSTALLED'] = 1
64                if incdir: env['CPPPATH'].remove(incdir) # not needed for now
65                if libdir: env['LIBPATH'].remove(libdir)
82                  if env.has_key('TIFFLIB_INSTALLED'):
83 +                        env.Replace(RAD_LIBTIFF=libname)
84                          if incdir: env.Replace(RAD_TIFFINCLUDE=[incdir])
85                          if libdir: env.Replace(RAD_TIFFLIB=[libdir])
86                          conf.Finish()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines