1 This patch changes metabat so that (1) it is not build statically, (2) it uses
2 shared libraries rather than static libraries where possible.
4 diff --git a/SConstruct b/SConstruct
5 index 69cdc0a..ac99bcb 100644
8 @@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None)
9 build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp']
10 link_flags = ['-lstdc++', '-lm', '-fopenmp']
12 -if platform.platform(True, True).find('Darwin') == -1:
13 - link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++'])
16 build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable'])
17 @@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat
18 for path in testPaths:
19 if not os.path.isdir(path):
21 + for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
22 + if os.path.isfile(testfile):
23 + print "Found shared library %s as %s" % (lib, testfile)
24 + link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
26 for suffix in staticSuffixes:
27 testfile = '%s/lib%s%s' % (path, lib, suffix)
28 if os.path.isfile(testfile):
29 static_source_list.append(testfile)
30 print "Found static library %s as %s" % (lib, testfile)
32 - for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
33 - if os.path.isfile(testfile):
34 - print "Found shared library %s as %s" % (lib, testfile)
35 - link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
37 print "Could not find library for %s!!! Looked in %s" % (lib, testPaths)