find versioned libGL, libEGL, libX11 on linux
As asked about here Additional context: symlinks and .so files on linux - what you need to know
On linux systems without an -devel package, the symlinks for unversioned library access are often(?) not available, and -devel packages are not installed by default on most distros.
So on a fresh install, both moderngl and glcontext are not able to find the unversioned libEGL.so, libGL.so, and libX11.so.
To deal with that, I first patched moderngl to use python's ctypes.util.find_library, which looks at what the dynamic linker has available when given a base name.
Since moderngl's test suite relies heavily on glcontext, I had to port that functionality to over there as well.
glcontext is written in C, and a "find" function for dynamic libraries does not exist, thus the solution here is more limited and inflexible. It tries both the versioned and unversioned names for all modules that use dlopen.
On my system, both glcontext and moderngl test successfully.
In the process I also removed a few warnings and made the error messages about loading the shared libraries between glcontext.egl and glcontext.x11 more consistent.
Sadly, glcontext is not part of moderngl, so two PRs are needed, and checks of moderngl won't pass until the functionality is in glcontext first.
Besides functionality checks, if any of this breaks style guides, please let me know.
Nothing I can do here. Creating the build container fails, since python 3.7 is no longer available. CI needs to be fixed.