source: waflib/Tools/d_config.py @ 0fa325b

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 0fa325b was 0fa325b, checked in by Paul Brossier <piem@piem.org>, 10 years ago

waf: unpack

  • Property mode set to 100644
File size: 1.2 KB
Line 
1#! /usr/bin/env python
2# encoding: utf-8
3# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
5from waflib import Utils
6from waflib.Configure import conf
7@conf
8def d_platform_flags(self):
9        v=self.env
10        if not v.DEST_OS:
11                v.DEST_OS=Utils.unversioned_sys_platform()
12        binfmt=Utils.destos_to_binfmt(self.env.DEST_OS)
13        if binfmt=='pe':
14                v['dprogram_PATTERN']='%s.exe'
15                v['dshlib_PATTERN']='lib%s.dll'
16                v['dstlib_PATTERN']='lib%s.a'
17        elif binfmt=='mac-o':
18                v['dprogram_PATTERN']='%s'
19                v['dshlib_PATTERN']='lib%s.dylib'
20                v['dstlib_PATTERN']='lib%s.a'
21        else:
22                v['dprogram_PATTERN']='%s'
23                v['dshlib_PATTERN']='lib%s.so'
24                v['dstlib_PATTERN']='lib%s.a'
25DLIB='''
26version(D_Version2) {
27        import std.stdio;
28        int main() {
29                writefln("phobos2");
30                return 0;
31        }
32} else {
33        version(Tango) {
34                import tango.stdc.stdio;
35                int main() {
36                        printf("tango");
37                        return 0;
38                }
39        } else {
40                import std.stdio;
41                int main() {
42                        writefln("phobos1");
43                        return 0;
44                }
45        }
46}
47'''
48@conf
49def check_dlibrary(self,execute=True):
50        ret=self.check_cc(features='d dprogram',fragment=DLIB,compile_filename='test.d',execute=execute,define_ret=True)
51        if execute:
52                self.env.DLIBRARY=ret.strip()
Note: See TracBrowser for help on using the repository browser.