summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct15
1 files changed, 6 insertions, 9 deletions
diff --git a/SConstruct b/SConstruct
index 1fb9ca4..b3c7009 100644
--- a/SConstruct
+++ b/SConstruct
@@ -6,16 +6,13 @@ if env['PLATFORM'] == 'darwin':
env.Append(LIBS = ['boost_system', 'boost_filesystem', 'boost_regex', 'boost_thread', 'boost_program_options', 'mp3lame', 'soci_core'])
else:
conf = Configure(env)
- conf.CheckLib('boost_system-mt')
- conf.CheckLib('boost_filesystem-mt')
- conf.CheckLib('boost_regex-mt')
- conf.CheckLib('boost_thread-mt')
- conf.CheckLib('boost_program_options-mt')
- conf.CheckLib('mp3lame')
- conf.CheckLib('soci_core')
- env = conf.Finish()
+ for lib in ['boost_system-mt', 'boost_filesystem-mt', 'boost_regex-mt','boost_thread-mt', 'boost_program_options-mt', 'mp3lame']:
+ if not conf.CheckLib(lib):
+ Exit(1)
# scons' CheckLib doesn't seem to find soci_core
- env.Append(LIBS = ['soci_core'])
+ if conf.CheckCXXHeader('soci/soci.h'):
+ env.Append(LIBS = ['soci_core'])
+ env = conf.Finish()
if GetOption('release'):
env.Append(CCFLAGS = ['-O2'])