Description: Static link only the internal libraries
 Libraries that are part of the source distribution are apparently only
 used by the binaries in this package, so they are probably best statically
 linked. Unfortunately, specifying static linking in the build system
 will statically link even zlib and other external libraries.
Author: Afif Elghraoui <afif@ghraoui.name>
Forwarded: no
Last-Update: 2015-07-28
--- blasr.orig/configure.py
+++ blasr/configure.py
@@ -142,13 +142,13 @@
         'LIBBLASR_LIB':  os.path.join(ROOT, 'libcpp', 'alignment'),
         'LIBPBDATA_LIB':  os.path.join(ROOT, 'libcpp', 'pbdata'),
         'LIBPBIHDF_LIB':  os.path.join(ROOT, 'libcpp', 'hdf'),
-        'LIBBLASR_LIBFLAGS':  '-lblasr',
-        'LIBPBDATA_LIBFLAGS': '-lpbdata',
-        'LIBPBIHDF_LIBFLAGS': '-lpbihdf',
-        'HDF5_LIBFLAGS': '-lhdf5_cpp -lhdf5',
-        'ZLIB_LIBFLAGS': '-lz',
-        'PTHREAD_LIBFLAGS': '-lpthread',
-        'DL_LIBFLAGS': '-ldl', # neeeded by HDF5 always
+        'LIBBLASR_LIBFLAGS':  '-Wl,-Bstatic -lblasr',
+        'LIBPBDATA_LIBFLAGS': '-Wl,-Bstatic -lpbdata',
+        'LIBPBIHDF_LIBFLAGS': '-Wl,-Bstatic -lpbihdf',
+        'HDF5_LIBFLAGS': '-Wl,-Bdynamic -lhdf5_cpp -lhdf5',
+        'ZLIB_LIBFLAGS': '-Wl,-Bdynamic -lz',
+        'PTHREAD_LIBFLAGS': '-Wl,-Bdynamic -lpthread',
+        'DL_LIBFLAGS': '-Wl,-Bdynamic -ldl', # neeeded by HDF5 always
         'SHELL': 'bash -xe',
     }
     #setifenvf(defaults, env, 'OS_STRING', get_OS_STRING)
