summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMarcin Ślusarz <[email protected]>2015-09-19 19:17:34 +0200
committerMarcin Ślusarz <[email protected]>2015-09-19 19:17:34 +0200
commitc228514c72cb2fd5fb9e510808e29204fc9e7ae1 (patch)
tree5b06403fbbecda27bd079e164b26f11af366522f /src/mesa/drivers
parent9ffc1049cae07e4e2d2dc8f4d1f5f113b4b1fdc4 (diff)
dri/common: use sysconfdir when looking for drirc
Useful when locally installed mesa has more quirks than the system one. Signed-off-by: Marcin Ślusarz <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/Makefile.am1
-rw-r--r--src/mesa/drivers/dri/common/xmlconfig.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am
index b307f10f56b..ea52cb5a0d8 100644
--- a/src/mesa/drivers/dri/common/Makefile.am
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -34,6 +34,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary \
$(LIBDRM_CFLAGS) \
$(DEFINES) \
+ -DSYSCONFDIR=\"$(sysconfdir)\"
$(VISIBILITY_CFLAGS)
noinst_LTLIBRARIES = \
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index f17693e739f..b8ab480ddfe 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -935,9 +935,13 @@ static void parseOneConfigFile (XML_Parser p) {
#undef BUF_SIZE
}
+#ifndef SYSCONFDIR
+#define SYSCONFDIR "/etc"
+#endif
+
void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
int screenNum, const char *driverName) {
- char *filenames[2] = {"/etc/drirc", NULL};
+ char *filenames[2] = { SYSCONFDIR "/drirc", NULL};
char *home;
uint32_t i;
struct OptConfData userData;