RSS

(root)/fsp/fsplib : 59

Radim Kolar
2009-06-13 16:06:22
Revision ID: radim_kolar-20090613160622-hvgo1aehssdxawsl
improve formating of code snipets used in TryCompile

collapse all collapse all

added added

removed removed

52
 
52
 
53
    """
53
    """
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>
 
 
57
    #include <dirent.h>
57
 
58
 
58
    void dummy(void);
59
    void dummy(void);
59
    void dummy()
60
    void dummy()
60
    {
61
    {
61
        struct dirent d;
62
        struct dirent d;
62
        d."""+member+"""=0;
63
        d."""+member+"""=0;
63
    }""",".c")
64
    }
 
 
65
    """,".c")
64
    if rc:
66
    if rc:
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)

Loggerhead is a web-based interface for Bazaar branches