When trying to build Rhtslib in spack, the spack built bzip2 and xz
packages could not be found when the internal htslib was built. This PR
adds a couple of environment variables that can be used to define the
locations of bzip2 and xz.
BZIP2_INCLUDE and XZ_INCLUDE: Can be set like CPPFLAGS,
'-I/path/to/package/include'
BZIP2_LIB and XZ_LIB: Can be set like LDFLAGS, `-L/path/to/lib'
Rhtslib inherits LDFLAGS from R and R should "know" about the location of the bzip2 and xz libraries. If it doesn't then it's not properly configured. See https://github.com/Bioconductor/Rhtslib/issues/12
When trying to build Rhtslib in spack, the spack built bzip2 and xz packages could not be found when the internal htslib was built. This PR adds a couple of environment variables that can be used to define the locations of bzip2 and xz.
A PR for spack that implements this is https://github.com/spack/spack/pull/14863
This change, or similar, might be useful for other build environments as well.