3 # Thomas Nagy, 2006 (ita)
4 # Ralf Habacker, 2006 (rh)
9 import Configure
, Options
, Utils
11 from Configure
import conftest
15 cxx
= conf
.find_program(['xlc++_r', 'xlc++'], var
='CXX', mandatory
=True)
16 cxx
= conf
.cmd_to_list(cxx
)
17 conf
.env
.CXX_NAME
= 'xlc++'
24 if v
['CPP']: cpp
= v
['CPP']
25 elif 'CPP' in conf
.environ
: cpp
= conf
.environ
['CPP']
26 #if not cpp: cpp = v['CXX']
30 def xlcxx_common_flags(conf
):
33 # CPPFLAGS CXXDEFINES _CXXINCFLAGS _CXXDEFFLAGS
34 v
['CXXFLAGS_DEBUG'] = ['-g']
35 v
['CXXFLAGS_RELEASE'] = ['-O2']
38 v
['CXX_TGT_F'] = ['-c', '-o', ''] # shell hack for -MD
39 v
['CPPPATH_ST'] = '-I%s' # template for adding include paths
42 if not v
['LINK_CXX']: v
['LINK_CXX'] = v
['CXX']
43 v
['CXXLNK_SRC_F'] = ''
44 v
['CXXLNK_TGT_F'] = ['-o', ''] # shell hack for -MD
46 v
['LIB_ST'] = '-l%s' # template for adding libs
47 v
['LIBPATH_ST'] = '-L%s' # template for adding libpaths
48 v
['STATICLIB_ST'] = '-l%s'
49 v
['STATICLIBPATH_ST'] = '-L%s'
50 v
['RPATH_ST'] = '-Wl,-rpath,%s'
51 v
['CXXDEFINES_ST'] = '-D%s'
54 v
['SHLIB_MARKER'] = ''
55 v
['STATICLIB_MARKER'] = ''
56 v
['FULLSTATIC_MARKER'] = '-static'
59 v
['program_LINKFLAGS'] = ['-Wl,-brtl']
60 v
['program_PATTERN'] = '%s'
63 v
['shlib_CXXFLAGS'] = ['-fPIC', '-DPIC'] # avoid using -DPIC, -fPIC aleady defines the __PIC__ macro
64 v
['shlib_LINKFLAGS'] = ['-G', '-Wl,-brtl,-bexpfull']
65 v
['shlib_PATTERN'] = 'lib%s.so'
68 v
['staticlib_LINKFLAGS'] = ''
69 v
['staticlib_PATTERN'] = 'lib%s.a'
75 conf
.xlcxx_common_flags()