Quote Originally Posted by pvtcupcakes View Post
The S3TC library doesn't have to be present at compile time. You can compile it after compiling Mesa, and Mesa dynamically loads it somehow. It's linked at runtime rather than compile time. I think they use dlopen() ? It has a man page that you can read up on if you're interested.
This is correct. The dlopen(<libname>) function opens a shared library at run-time, and then you use the dlsym() function to get pointers to named functions within that library. Then you just store a reference to the function pointer and call that whenever you need to do S3TC-related work. Check out <dlfcn.h> and the dlopen/dlsym/dlclose man pages.

Think of the S3TC library as a plugin which is loaded if it's present, but if the Mesa library doesn't find it, or can't load it, it's no big deal.