Skip to content
Snippets Groups Projects
Commit 00aa3ee7 authored by Kyle Brenneman's avatar Kyle Brenneman Committed by Emil Velikov
Browse files

glx: Don't hard-code the name "libGL.so.1" in driOpenDriver (v3)


Add a macro GL_LIB_NAME to hold the filename that configure comes up with
based on the --with-gl-lib-name and --enable-mangling options.

In driOpenDriver, use the GL_LIB_NAME macro instead of hard-coding
"libGL.so.1".

v2: Add an #ifndef/#define for GL_LIB_NAME so that non-autoconf builds will
    work.
v3: Fix the library filename in the Makefile.

Signed-off-by: default avatarKyle Brenneman <kbrenneman@nvidia.com>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d35391cf)
parent 256df77d
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ AM_CFLAGS = \ ...@@ -46,6 +46,7 @@ AM_CFLAGS = \
$(EXTRA_DEFINES_XF86VIDMODE) \ $(EXTRA_DEFINES_XF86VIDMODE) \
-D_REENTRANT \ -D_REENTRANT \
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
-DGL_LIB_NAME=\"lib@GL_LIB@.so.1\" \
$(DEFINES) \ $(DEFINES) \
$(LIBDRM_CFLAGS) \ $(LIBDRM_CFLAGS) \
$(DRI2PROTO_CFLAGS) \ $(DRI2PROTO_CFLAGS) \
......
...@@ -73,6 +73,10 @@ dri_message(int level, const char *f, ...) ...@@ -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 #ifndef DEFAULT_DRIVER_DIR
/* this is normally defined in Mesa/configs/default with DRI_DRIVER_SEARCH_PATH */ /* this is normally defined in Mesa/configs/default with DRI_DRIVER_SEARCH_PATH */
#define DEFAULT_DRIVER_DIR "/usr/local/lib/dri" #define DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
...@@ -99,7 +103,7 @@ driOpenDriver(const char *driverName) ...@@ -99,7 +103,7 @@ driOpenDriver(const char *driverName)
int len; int len;
/* Attempt to make sure libGL symbols will be visible to the driver */ /* 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; libPaths = NULL;
if (geteuid() == getuid()) { if (geteuid() == getuid()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment