From: Carl Worth Date: Tue, 22 Oct 2013 19:19:37 +0000 (-0700) Subject: Respect GLAZE_LIBGL environment variable (if FIPS_LIBGL is unset) X-Git-Url: https://git.cworth.org/git?p=fips;a=commitdiff_plain;h=a19c938ab14709674bcadfcc9d6ccdee136d45bb Respect GLAZE_LIBGL environment variable (if FIPS_LIBGL is unset) Since the LD_PRELOAD mechanism of fips may not work with some programs, users may want to run fips within glaze instead, (which uses LD_LIBRARY_PATH instead of LD_PRELOAD). In order to make this convenient, fips can recognize that glaze has identified the appropriate libGL.so library by examining the GLAZE_LIBGL environment variable. So, if the user has not specifically set the FIPS_LIBGL variable, and the GLAZE_LIBGL variable is set, use it to find the libGL.so to load. --- diff --git a/glwrap.c b/glwrap.c index f5b4f84..aa56038 100644 --- a/glwrap.c +++ b/glwrap.c @@ -97,6 +97,8 @@ glwrap_lookup (char *name) const char *path; path = getenv ("FIPS_LIBGL"); + if (! path) + path = getenv ("GLAZE_LIBGL"); if (path) { gl_handle = dlopen (path, RTLD_LAZY);