POSIX portability

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4291 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-09-24 15:50:40 +00:00
parent 54062c79b9
commit 9dc50cf8d5
2 changed files with 13 additions and 4 deletions

View file

@ -13,11 +13,18 @@ required = Split("""
mmap.cpp
""")
libs = Split("""
cppunitlibs = Split("""
cppunit
""")
Import('env')
extralibs = Split("""
dl
""")
Import('env AddAvailableLibs')
# Use available libraries
AddAvailableLibs(env, extralibs)
# compile using msvcrt (that's how cppunit.lib is built)
if 'msvc' in env['TOOLS'] or 'mstoolkit' in env['TOOLS']:
@ -28,7 +35,7 @@ env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
# test for CppUnit
conf = env.Configure()
cppunit = conf.CheckLibWithHeader(libs, 'cppunit/extensions/HelperMacros.h', 'C++')
cppunit = conf.CheckLibWithHeader(cppunitlibs, 'cppunit/extensions/HelperMacros.h', 'C++')
conf.Finish()
if cppunit:
@ -44,7 +51,7 @@ if cppunit:
required_obj.append(o)
# build test program
tests = env.Program(target, tests + required_obj, LIBS = libs)
tests = env.Program(target, tests + required_obj)
# alias running the test to 'test'
test = env.Alias('test-code', [tests], tests[0].abspath)