Portable shared library linking
This detects the OS and uses the appropriate method to add links for the compiled shared library.
I couldn't get this to compile on macOS 12.0.1 as --whole-archive is not supported, and this solved my issue (using -force_load instead of --whole-archive). I tested on the Dockerfile and it works on Ubuntu as well. I assume this works on Windows (using /WHOLEARCHIVE instead of --whole-archive), but I did not test it.
@breadbored, thanks for submitting a PR. Both portability and supporting wrappers are good goals to aim for.
Regarding the portability part, could you post logs of the builds you tried on each platform to support this part of the change?
The wrapping part of the change cannot be accepted, though, as it has a bug (see the commit review) and the natural solution is to use an already existing LibSWIFFT function.
I cannot believe I missed this PR! I've been flooded with work PRs and it got lost in the weeds.
I'll set a reminder to rebuild this weekend and I can describe what this PR aims to resolve.
@breadbored, the code-removal in the last commit looks OK. Reminder - could you post logs of the builds you tried on each platform to support the change?