summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-02-22 16:44:14 +0000
committerEmil Velikov <[email protected]>2014-02-24 14:52:27 +0000
commit3445e8bb921545f74e2b6a823d47fa29352e9262 (patch)
tree4d53688fbb389a511157263b6fc13c53d71e680f /src/gallium/auxiliary/pipe-loader
parent0e7c30233f10d834ee26b7d6d32b397625e11e10 (diff)
pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIB
The above function implies using the the xlib winsys, which has additional library dependencies that should not be forced. Make the software xlib pipe loader optional thus avoid all the dependency hell. A user that wishes to use the particular pipe-loader would need to set the following within configure.ac. enable_gallium_xlib_loader=yes v2: - Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems lacking X11 headers. Spotted by Christian Prochaska. Tested-by: Tom Stellard <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356 Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader')
-rw-r--r--src/gallium/auxiliary/pipe-loader/Makefile.am4
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.h4
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c5
3 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am
index 232fe40f12e..ccdbea56d7a 100644
--- a/src/gallium/auxiliary/pipe-loader/Makefile.am
+++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
@@ -8,10 +8,6 @@ AM_CPPFLAGS = $(DEFINES) \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/winsys
-if NEED_WINSYS_XLIB
-AM_CPPFLAGS += -DHAVE_WINSYS_XLIB
-endif
-
noinst_LTLIBRARIES =
if HAVE_LOADER_GALLIUM
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index 125086d24ab..a5e49fc2c1a 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -35,7 +35,7 @@
#include "pipe/p_compiler.h"
-#ifdef HAVE_WINSYS_XLIB
+#ifdef HAVE_PIPE_LOADER_XLIB
#include <X11/Xlib.h>
#endif
@@ -105,7 +105,7 @@ pipe_loader_create_screen(struct pipe_loader_device *dev,
void
pipe_loader_release(struct pipe_loader_device **devs, int ndev);
-#ifdef HAVE_WINSYS_XLIB
+#ifdef HAVE_PIPE_LOADER_XLIB
/**
* Initialize Xlib for an associated display.
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index ece687bf2f5..35ec37fa2db 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -31,7 +31,10 @@
#include "util/u_dl.h"
#include "sw/dri/dri_sw_winsys.h"
#include "sw/null/null_sw_winsys.h"
+#ifdef HAVE_PIPE_LOADER_XLIB
+/* Explicitly wrap the header to ease build without X11 headers */
#include "sw/xlib/xlib_sw_winsys.h"
+#endif
#include "target-helpers/inline_sw_helper.h"
#include "state_tracker/drisw_api.h"
@@ -49,7 +52,7 @@ static struct sw_winsys *(*backends[])() = {
null_sw_create
};
-#ifdef HAVE_WINSYS_XLIB
+#ifdef HAVE_PIPE_LOADER_XLIB
bool
pipe_loader_sw_probe_xlib(struct pipe_loader_device **devs, Display *display)
{