Run otool -L
on the .dylib. That will show you the libraries it depends on and their compatibility versions. Then, run otool -L
against the libraries from the OS of interest. That will show you (on the first line) the current version of that library. If the current version is at least the compatibility version, then that library can be used by your .dylib. Repeat for all of the libraries.
There's not much of a shortcut. A .dylib doesn't directly contain any explicit indication of what SDK it was linked against. It only indirectly and implicitly does so via the library dependencies.
If the .dylib links against a central system library, such as /usr/lib/libSystem.B.dylib (which is likely), then you can use compatibility with that one library as a proxy for compatibility with the OS version as a whole.