From ae89ac2619fa2fb03a9b2291831cff2d7edf6837 Mon Sep 17 00:00:00 2001 From: Kyle Brenneman Date: Wed, 31 Aug 2016 12:01:00 -0600 Subject: [PATCH] EGL: Change the vendor config search paths. Changed the default vendor config paths to be based on the directory options for configure. libEGL will now look under the sysconfigdir and datadir paths, in a "glvnd/egl_vendor.d" subdirectory. Added the "datadir" variable to the pkg-config file, so that other packages can find the expected location of the JSON files. --- configure.ac | 10 ---------- libglvnd.pc.in | 2 ++ src/EGL/Makefile.am | 3 +++ src/EGL/libeglvendor.c | 4 ---- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index dfff12b..6f2e197 100644 --- a/configure.ac +++ b/configure.ac @@ -108,16 +108,6 @@ AC_C_TYPEOF dnl Checks for library functions. AC_FUNC_STRNLEN -AC_ARG_WITH([egl-vendor-dirs], - [AS_HELP_STRING([--with-egl-vendor-dirs], - [specify default EGL vendor config directories])], - [egl_vendor_dirs="$withval"], - [egl_vendor_dirs=]) -AS_IF([test "x$egl_vendor_dirs" = xyes], [egl_vendor_dirs=]) -AS_IF([test "x$egl_vendor_dirs" != "x"], - [AC_DEFINE_UNQUOTED([DEFAULT_EGL_VENDOR_CONFIG_DIRS], ["$egl_vendor_dirs"], - [The default directories to search for EGL vendor config files.])]) - dnl TLS detection AC_ARG_ENABLE([tls], [AS_HELP_STRING([--disable-tls], diff --git a/libglvnd.pc.in b/libglvnd.pc.in index e9891e8..2d6a41a 100644 --- a/libglvnd.pc.in +++ b/libglvnd.pc.in @@ -1,5 +1,7 @@ prefix=@prefix@ includedir=@includedir@ +datarootdir=@datarootdir@ +datadir=@datadir@ Name: libglvnd Description: Vendor-neutral OpenGL dispatch library vendor interface diff --git a/src/EGL/Makefile.am b/src/EGL/Makefile.am index a3417a8..9a4d81a 100644 --- a/src/EGL/Makefile.am +++ b/src/EGL/Makefile.am @@ -49,6 +49,9 @@ libEGL_la_CFLAGS += -I$(srcdir)/$(UTIL_DIR) libEGL_la_CFLAGS += -I$(srcdir)/$(GL_DISPATCH_DIR) libEGL_la_CFLAGS += -I$(top_srcdir)/include +libEGL_la_CFLAGS += \ + -DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"@sysconfdir@/glvnd/egl_vendor.d:@datadir@/glvnd/egl_vendor.d\" + # Required library flags libEGL_la_CFLAGS += $(PTHREAD_CFLAGS) diff --git a/src/EGL/libeglvendor.c b/src/EGL/libeglvendor.c index d787955..1fffc4c 100644 --- a/src/EGL/libeglvendor.c +++ b/src/EGL/libeglvendor.c @@ -18,10 +18,6 @@ #include "cJSON.h" #include "egldispatchstubs.h" -#if !defined(DEFAULT_EGL_VENDOR_CONFIG_DIRS) -#define DEFAULT_EGL_VENDOR_CONFIG_DIRS "/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d" -#endif - #define FILE_FORMAT_VERSION_MAJOR 1 #define FILE_FORMAT_VERSION_MINOR 0