diff options
-rw-r--r-- | src/glx/Makefile.am | 1 | ||||
-rw-r--r-- | src/glx/dri_common.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index 6e50e096fa2..e64955e3b3e 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -46,6 +46,7 @@ AM_CFLAGS = \ $(EXTRA_DEFINES_XF86VIDMODE) \ -D_REENTRANT \ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \ + -DGL_LIB_NAME=\"lib@[email protected]\" \ $(DEFINES) \ $(LIBDRM_CFLAGS) \ $(DRI2PROTO_CFLAGS) \ diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index eedcd46a15a..8a56385c4bd 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -73,6 +73,10 @@ dri_message(int level, const char *f, ...) } } +#ifndef GL_LIB_NAME +#define GL_LIB_NAME "libGL.so.1" +#endif + #ifndef DEFAULT_DRIVER_DIR /* this is normally defined in Mesa/configs/default with DRI_DRIVER_SEARCH_PATH */ #define DEFAULT_DRIVER_DIR "/usr/local/lib/dri" @@ -99,7 +103,7 @@ driOpenDriver(const char *driverName) int len; /* Attempt to make sure libGL symbols will be visible to the driver */ - glhandle = dlopen("libGL.so.1", RTLD_NOW | RTLD_GLOBAL); + glhandle = dlopen(GL_LIB_NAME, RTLD_NOW | RTLD_GLOBAL); libPaths = NULL; if (geteuid() == getuid()) { |