+ const char *path;
+
+ path = getenv ("GLAZE_LIBGL");
+ if (path == NULL) {
+ fprintf (stderr, "GLAZE_LIBGL unset. "
+ "Please set to path of libGL.so under glaze.\n"
+ );
+ exit (1);
+ }
+
+ libgl_handle = dlopen (path, RTLD_LAZY | RTLD_GLOBAL);
+ if (libgl_handle == NULL) {
+ fprintf (stderr, "Error: Failed to dlopen %s\n", path);
+ exit (1);
+ }