[Mesa-dev] [PATCH] glx: Don't hard-code the name "libGL.so.1" in driOpenDriver.

Ilia Mirkin imirkin at alum.mit.edu
Fri Sep 25 10:07:10 PDT 2015


This will break non-autoconf builds... how about #ifndef GL_LIB_NAME
#define GL_LIB_NAME "libGL.so.1"?

On Fri, Sep 25, 2015 at 12:43 PM, Kyle Brenneman <kbrenneman at nvidia.com> wrote:
> 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".
> ---
>  src/glx/Makefile.am  | 1 +
>  src/glx/dri_common.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
> index 6e50e09..8ea81c1 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 at GL_LIB@.la\" \
>         $(DEFINES) \
>         $(LIBDRM_CFLAGS) \
>         $(DRI2PROTO_CFLAGS) \
> diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
> index eedcd46..c30db8f 100644
> --- a/src/glx/dri_common.c
> +++ b/src/glx/dri_common.c
> @@ -99,7 +99,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()) {
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list