backport fixes for compiling on sunos with g++ from r2174 and r2175

This commit is contained in:
Dane Springmeyer 2010-10-05 00:10:37 +00:00
parent 457f632b9c
commit 503da430dc
4 changed files with 18 additions and 11 deletions

View file

@ -23,7 +23,9 @@ Import('env')
agg_env = env.Clone()
if env['PLATFORM'] == 'SunOS':
agg_env.StaticLibrary('agg', glob.glob('./src/' + '*.cpp'), LIBS=[], CPPPATH='./include', CXXFLAGS='-O -KPIC -DNDEBUG')
if env['SUNCC']:
cxxflags = '-O -KPIC -DNDEBUG'
else:
agg_env.StaticLibrary('agg', glob.glob('./src/' + '*.cpp'), LIBS=[], CPPPATH='./include', CXXFLAGS='-O%s -fPIC -DNDEBUG' % env['OPTIMIZATION'])
cxxflags = '-O%s -fPIC -DNDEBUG' % env['OPTIMIZATION']
agg_env.StaticLibrary('agg', glob.glob('./src/' + '*.cpp'), LIBS=[], CPPPATH='./include', CXXFLAGS=cxxflags)

View file

@ -32,16 +32,18 @@ source = Split(
headers = env['CPPPATH']
boost_thread = 'boost_thread%s' % env['BOOST_APPEND']
libraries = [boost_thread,'mapnik']
libraries = ['mapnik']
if env['THREADING'] == 'multi':
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
if env['HAS_CAIRO'] in env['CXXFLAGS']:
# add cairo and cairomm-1.0 to libs
libraries.append('cairomm-1.0')
libraries.append('cairo')
if env['PLATFORM'] == 'Darwin':
if env['PLATFORM'] in ('Darwin','SunOS'):
libraries.append(env['ICU_LIB_NAME'])
rundemo = env.Program('rundemo', source, CPPPATH=headers, LIBS=libraries)

View file

@ -581,9 +581,9 @@ def tool_list(platform, env):
ars = ['sgiar']
elif str(platform) == 'sunos':
"prefer Forte tools on SunOS"
linkers = ['sunlink', 'gnulink']
c_compilers = ['suncc', 'gcc', 'cc']
cxx_compilers = ['sunc++', 'g++', 'c++']
linkers = ['gnulink','sunlink']
c_compilers = ['gcc','suncc', 'cc']
cxx_compilers = ['g++','sunc++', 'c++']
assemblers = ['as', 'gas']
fortran_compilers = ['sunf95', 'sunf90', 'sunf77', 'f95', 'f90', 'f77',
'gfortran', 'g77', 'fortran']

View file

@ -66,8 +66,11 @@ if env['PLATFORM'] == 'Darwin':
lib_path = 'libmapnik.dylib'
linkflags = '-Wl,-install_name,%s' % lib_path
linkflags += ' -current_version 0.7.2 -compatibility_version 0.7.2'
elif env['PLATFORM'] == 'SunOS' and env['CXX'].startswith('CC'):
linkflags = '-R. -h libmapnik.so'
elif env['PLATFORM'] == 'SunOS':
if env['CXX'].startswith('CC'):
linkflags = '-R. -h libmapnik.so'
else:
linkflags = '-Wl,-h,libmapnik.so'
else: # Linux and others
linkflags = '-Wl,-rpath-link,. -Wl,-soname,libmapnik.so.' + ("%d.%d" % (ABI_VERSION[0],ABI_VERSION[1]))