Build each one as a separate shared library and wrap each one with a C interface?
I have used many libraries that use boost internally (often in a custom namespace) but do not expose it on the API