54
conf.Message("checking whether dirent structure has member "+member+"... ")
54
conf.Message("checking whether dirent structure has member "+member+"... ")
55
rc=conf.TryCompile("""#include <sys/types.h>
55
rc=conf.TryCompile("""
56
#include <dirent.h>
56
#include <sys/types.h>
58
void dummy(void);
59
void dummy(void);
59
void dummy()
60
void dummy()
61
struct dirent d;
62
struct dirent d;
62
d."""+member+"""=0;
63
d."""+member+"""=0;
65
conf.env.Append(CPPFLAGS = '-D'+symbol)
67
conf.env.Append(CPPFLAGS = '-D'+symbol)
66
conf.Result(rc)
68
conf.Result(rc)
72
lastCFLAGS=conf.env['CCFLAGS']
74
lastCFLAGS=conf.env['CCFLAGS']
73
conf.env.Append(CCFLAGS = option)
75
conf.env.Append(CCFLAGS = option)
74
rc = conf.TryCompile("""
76
rc = conf.TryCompile("""
75
void dummy(void);
77
void dummy(void);
76
void dummy(void) {}
78
void dummy(void) {}
77
""",'.c')
79
""",'.c')
78
if not rc:
80
if not rc:
79
conf.env.Replace(CCFLAGS = lastCFLAGS)
81
conf.env.Replace(CCFLAGS = lastCFLAGS)
80
conf.Result(rc)
82
conf.Result(rc)