8 |
|
if os.path.isdir (d): |
9 |
|
incdir = os.path.join(d, 'include') |
10 |
|
libdir = os.path.join(d, 'lib') |
11 |
< |
env.Append(CPPPATH=[incdir]) # add temporarily |
12 |
< |
env.Append(LIBPATH=[libdir]) |
11 |
> |
env.Prepend(CPPPATH=[incdir]) # add temporarily |
12 |
> |
env.Prepend(LIBPATH=[libdir]) |
13 |
|
conf = SConf(env) |
14 |
|
if conf.CheckLibWithHeader('X11', 'X11/X.h', 'C', autoadd=0): |
15 |
|
env.Replace(X11INCLUDE=incdir) |
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 |
– |
# ... |
34 |
|
for incdir, libdir in dl: |
35 |
< |
if incdir: env.Append(CPPPATH=[incdir]) # add temporarily |
36 |
< |
if libdir: env.Append(LIBPATH=[libdir]) |
35 |
> |
if incdir: env.Prepend(CPPPATH=[incdir]) # add temporarily |
36 |
> |
if libdir: env.Prepend(LIBPATH=[libdir]) |
37 |
|
conf = SConf(env) |
38 |
|
if conf.CheckLibWithHeader('GL', 'GL/gl.h', 'C', autoadd=0): |
39 |
|
env['OGL'] = 1 |
42 |
|
if env.has_key('OGL'): |
43 |
|
if incdir: env.Replace(OGLINCLUDE=[incdir]) |
44 |
|
#if libdir: env.Replace(OGLLIB=[libdir]) |
45 |
+ |
conf.Finish() |
46 |
+ |
break |
47 |
+ |
conf.Finish() |
48 |
+ |
|
49 |
+ |
|
50 |
+ |
def find_libtiff(env): |
51 |
+ |
# Check for libtiff, set flag and include/lib directories |
52 |
+ |
dl = [ (None,None), ] # standard search path |
53 |
+ |
cfgi = env.get('TIFFINCLUDE') |
54 |
+ |
cfgl = env.get('TIFFLIB') |
55 |
+ |
if cfgi or cfgl: |
56 |
+ |
dl.insert(0,(cfgi, cfgl)) |
57 |
+ |
for incdir, libdir in dl: |
58 |
+ |
if incdir: env.Prepend(CPPPATH=[incdir]) # add temporarily |
59 |
+ |
if libdir: env.Prepend(LIBPATH=[libdir]) |
60 |
+ |
conf = SConf(env) |
61 |
+ |
if conf.CheckLib('tiff', 'TIFFInitSGILog', |
62 |
+ |
header='void TIFFInitSGILog(void);', autoadd=0): |
63 |
+ |
env['TIFFLIB_INSTALLED'] = 1 |
64 |
+ |
if incdir: env['CPPPATH'].remove(incdir) # not needed for now |
65 |
+ |
if libdir: env['LIBPATH'].remove(libdir) |
66 |
+ |
if env.has_key('TIFFLIB_INSTALLED'): |
67 |
+ |
if incdir: env.Replace(RAD_TIFFINCLUDE=[incdir]) |
68 |
+ |
if libdir: env.Replace(RAD_TIFFLIB=[libdir]) |
69 |
|
conf.Finish() |
70 |
|
break |
71 |
|
conf.Finish() |