s3: libsmbclient: Add missing talloc stackframe.
[samba.git] / buildtools / wafadmin / Tools / icc.py
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Stian Selnes, 2008
4 # Thomas Nagy 2009
5
6 import os, sys
7 import Configure, Options, Utils
8 import ccroot, ar, gcc
9 from Configure import conftest
10
11 @conftest
12 def find_icc(conf):
13         if sys.platform == 'cygwin':
14                 conf.fatal('The Intel compiler does not work on Cygwin')
15
16         v = conf.env
17         cc = None
18         if v['CC']: cc = v['CC']
19         elif 'CC' in conf.environ: cc = conf.environ['CC']
20         if not cc: cc = conf.find_program('icc', var='CC')
21         if not cc: cc = conf.find_program('ICL', var='CC')
22         if not cc: conf.fatal('Intel C Compiler (icc) was not found')
23         cc = conf.cmd_to_list(cc)
24
25         ccroot.get_cc_version(conf, cc, icc=True)
26         v['CC'] = cc
27         v['CC_NAME'] = 'icc'
28
29 detect = '''
30 find_icc
31 find_ar
32 gcc_common_flags
33 gcc_modifier_platform
34 cc_load_tools
35 cc_add_flags
36 link_add_flags
37 '''