3 # Thomas Nagy, 2006 (ita)
4 # Ralf Habacker, 2006 (rh)
7 import Utils
, Options
, Configure
9 from Configure
import conftest
15 if v
['CXX']: cc
= v
['CXX']
16 elif 'CXX' in conf
.environ
: cc
= conf
.environ
['CXX']
17 if not cc
: cc
= conf
.find_program('c++', var
='CXX')
18 if not cc
: conf
.fatal('sunc++ was not found')
19 cc
= conf
.cmd_to_list(cc
)
22 if not Utils
.cmd_output(cc
+ ['-flags']):
23 conf
.fatal('sunc++ %r was not found' % cc
)
25 conf
.fatal('sunc++ -flags could not be executed')
31 def sxx_common_flags(conf
):
34 # CPPFLAGS CXXDEFINES _CXXINCFLAGS _CXXDEFFLAGS
37 v
['CXX_TGT_F'] = ['-c', '-o', '']
38 v
['CPPPATH_ST'] = '-I%s' # template for adding include paths
41 if not v
['LINK_CXX']: v
['LINK_CXX'] = v
['CXX']
42 v
['CXXLNK_SRC_F'] = ''
43 v
['CXXLNK_TGT_F'] = ['-o', ''] # solaris hack, separate the -o from the target
45 v
['LIB_ST'] = '-l%s' # template for adding libs
46 v
['LIBPATH_ST'] = '-L%s' # template for adding libpaths
47 v
['STATICLIB_ST'] = '-l%s'
48 v
['STATICLIBPATH_ST'] = '-L%s'
49 v
['CXXDEFINES_ST'] = '-D%s'
51 v
['SONAME_ST'] = '-Wl,-h -Wl,%s'
52 v
['SHLIB_MARKER'] = '-Bdynamic'
53 v
['STATICLIB_MARKER'] = '-Bstatic'
56 v
['program_PATTERN'] = '%s'
59 v
['shlib_CXXFLAGS'] = ['-Kpic', '-DPIC']
60 v
['shlib_LINKFLAGS'] = ['-G']
61 v
['shlib_PATTERN'] = 'lib%s.so'
64 v
['staticlib_LINKFLAGS'] = ['-Bstatic']
65 v
['staticlib_PATTERN'] = 'lib%s.a'