https://bugs.winehq.org/show_bug.cgi?id=51541
--- Comment #8 from Liam Middlebrook loothelion@nvidia.com --- Sorry for the slow reply.
We should be using WINE_CHECK_SONAME like everything else.
How does that work for say distro re-packaging? Note that libcuda.so.1 is a DSO which ships with the driver, so there's a multi-hundered MB cost to having it present on a system. I would assume that most distro re-packagers don't install more graphics drivers than they necessarily need, likely if their focus for a machine (I think a lot of it is done on VMs these days) is just re-packaging, it'll just have Mesa as that's default.
Also, I'm a bit confused by the WINE_CHECK_SONAME usage. I skimmed various uses of it (and the subsequent definitions that it creates) and noticed that it doesn't pass along information about the SONAME version to the preprocessor. Maybe I'm misreading something, but it seems like the Wine source has to assume some given SONAME version of a DSO anyways, it can't tell the difference between libcurl.so.3 and libcurl.so.4, it will link against whatever it finds and then hope that the interface it's using matches well enough that it won't hit issues at runtime.