Add ability to choose to build only shared and/or static library
Would it be possible to add the configure option to only build htslib as a shared or static library? Currently, both are built always.
The tools provided by htslib (e.g. bgzip) seem to use the static variant of htslib. However, when compiling samtools, it's tools link against htslib dynamically.
Ideally, I'd like to choose to only compile htslib as a dynamic library. Thus, bgzip and alike should then link against htslib dynamically.
bgzip is currently hard-coded to use libhts.a in the Makefile. In principle, this could replaced by a variable, allowing the shared library to be used instead (samtools does this). Setting LD_LIBRARY_PATH might be necessary too (for example if you want to run the test harness).