source: waflib/Tools/g95.py @ 44755a0

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

waf, waflib: update to 1.8.7

  • Property mode set to 100644
File size: 1.4 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
5import re
6from waflib import Utils
7from waflib.Tools import fc,fc_config,fc_scan,ar
8from waflib.Configure import conf
9@conf
10def find_g95(conf):
11        fc=conf.find_program('g95',var='FC')
12        conf.get_g95_version(fc)
13        conf.env.FC_NAME='G95'
14@conf
15def g95_flags(conf):
16        v=conf.env
17        v['FCFLAGS_fcshlib']=['-fPIC']
18        v['FORTRANMODFLAG']=['-fmod=','']
19        v['FCFLAGS_DEBUG']=['-Werror']
20@conf
21def g95_modifier_win32(conf):
22        fc_config.fortran_modifier_win32(conf)
23@conf
24def g95_modifier_cygwin(conf):
25        fc_config.fortran_modifier_cygwin(conf)
26@conf
27def g95_modifier_darwin(conf):
28        fc_config.fortran_modifier_darwin(conf)
29@conf
30def g95_modifier_platform(conf):
31        dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
32        g95_modifier_func=getattr(conf,'g95_modifier_'+dest_os,None)
33        if g95_modifier_func:
34                g95_modifier_func()
35@conf
36def get_g95_version(conf,fc):
37        version_re=re.compile(r"g95\s*(?P<major>\d*)\.(?P<minor>\d*)").search
38        cmd=fc+['--version']
39        out,err=fc_config.getoutput(conf,cmd,stdin=False)
40        if out:
41                match=version_re(out)
42        else:
43                match=version_re(err)
44        if not match:
45                conf.fatal('cannot determine g95 version')
46        k=match.groupdict()
47        conf.env['FC_VERSION']=(k['major'],k['minor'])
48def configure(conf):
49        conf.find_g95()
50        conf.find_ar()
51        conf.fc_flags()
52        conf.fc_add_flags()
53        conf.g95_flags()
54        conf.g95_modifier_platform()
Note: See TracBrowser for help on using the repository browser.