$NetBSD: patch-SConstruct,v 1.2 2013/05/28 19:01:22 joerg Exp $ Create shared object. --- SConstruct.orig 2008-04-21 00:05:35.000000000 +0000 +++ SConstruct @@ -5,7 +5,7 @@ tools = ['default'] if os.name == 'nt': tools = ['mingw'] -env = Environment(tools = tools) +env = Environment(tools = tools, ENV = {'PATH': os.environ['PATH']}) options_file = None if sys.platform == 'linux2': @@ -22,6 +22,7 @@ opts.Add('CXX', 'The C++ compiler (for t opts.Add('CCFLAGS', 'Flags for the compiler.', ['-O2', '-Wall']) opts.Add('LINK', 'The linker.') opts.Add('LINKFLAGS', 'Linker flags.', []) +opts.Add('SONAME', 'Shared library name.') opts.Add('no_cygwin', 'Use -mno-cygwin to build using the mingw compiler on cygwin', 0) opts.Add('LIBS', 'libraries', []) opts.Add('LIBPATH', 'library path', []) @@ -147,6 +148,8 @@ Files will be installed on /bin, env['CPPPATH'] = '#/include' env['LIBPATH'] = ['#/lib'] + env['LIBPATH'] +env.Append(SHLINKFLAGS=' -Wl,-soname='+env['SONAME']) + if env['no_cygwin']: env['CCFLAGS'] += ['-mno-cygwin']