summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-17 11:15:36 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-17 21:26:34 +0000
commita8fe50ab6503d9cb63931771318dc3e84d002092 (patch)
tree68b704d8590de6330a26d13cdcafad71e788438d
parent3320b459d6fe90d1145e3874c840b95279fb16c8 (diff)
uxa: Explicitly check for libdrm_intel in configure
And remove the excess dependencies from the common files. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--configure.ac5
-rw-r--r--src/Makefile.am6
-rw-r--r--src/intel.h1
-rw-r--r--src/intel_display.c1
-rw-r--r--src/intel_dri.c1
-rw-r--r--src/intel_driver.c1
-rw-r--r--src/intel_module.c10
-rw-r--r--src/intel_video.c1
8 files changed, 15 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index da5fd775..1ac72ec2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,11 +142,12 @@ AC_ARG_ENABLE(uxa,
[Enable Unified Acceleration Architecture (UXA) [default=yes]]),
[UXA="$enableval"],
[UXA=yes])
+AC_MSG_RESULT([$UXA])
AM_CONDITIONAL(UXA, test x$UXA != xno)
if test "x$UXA" != "xno"; then
AC_DEFINE(USE_UXA, 1, [Enable UXA support])
+ PKG_CHECK_MODULES(DRMINTEL, [libdrm_intel >= 2.4.29])
fi
-AC_MSG_RESULT([$UXA])
AC_MSG_CHECKING([whether to include GLAMOR support])
AC_ARG_ENABLE(glamor,
@@ -187,7 +188,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_xserver_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.29])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.24]) # libdrm_intel is checked separately
PKG_CHECK_MODULES(DRI, [xf86driproto], , DRI=no)
PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6],, DRI2=no)
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
diff --git a/src/Makefile.am b/src/Makefile.am
index afaed360..62ac04f1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,8 +26,7 @@ SUBDIRS = xvmc render_program legacy
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @UDEV_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
- @PCIACCESS_CFLAGS@
+AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @PCIACCESS_CFLAGS@
intel_drv_la_LTLIBRARIES = intel_drv.la
intel_drv_la_LDFLAGS = -module -avoid-version
@@ -46,8 +45,9 @@ intel_drv_la_SOURCES = \
$(NULL)
if UXA
+AM_CFLAGS += @UDEV_CFLAGS@ @DRM_CFLAGS@ @DRMINTEL_CFLAGS@
AM_CFLAGS += -I$(top_srcdir)/uxa -I$(top_srcdir)/src/render_program
-intel_drv_la_LIBADD += @UDEV_LIBS@ @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la
+intel_drv_la_LIBADD += @UDEV_LIBS@ @DRMINTEL_LIBS@ @DRM_LIBS@ ../uxa/libuxa.la
intel_drv_la_SOURCES += \
brw_defines.h \
brw_structs.h \
diff --git a/src/intel.h b/src/intel.h
index 5423c20a..b497bdf9 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -63,7 +63,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xorg-server.h"
#include <pciaccess.h>
-#include "xf86drm.h"
#define _XF86DRI_SERVER_
#include "dri2.h"
#include "intel_bufmgr.h"
diff --git a/src/intel_display.c b/src/intel_display.c
index 5ad8625e..d525ffab 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -40,6 +40,7 @@
#include "intel.h"
#include "intel_bufmgr.h"
+#include "xf86drm.h"
#include "xf86drmMode.h"
#include "X11/Xatom.h"
#include "X11/extensions/dpmsconst.h"
diff --git a/src/intel_dri.c b/src/intel_dri.c
index 135ba4e1..152313ae 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -53,6 +53,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86PciInfo.h"
#include "xf86Pci.h"
+#include "xf86drm.h"
#include "windowstr.h"
#include "shadow.h"
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 9094fd16..9d1c4e87 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -48,6 +48,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86cmap.h"
+#include "xf86drm.h"
#include "compiler.h"
#include "mibstore.h"
#include "mipointer.h"
diff --git a/src/intel_module.c b/src/intel_module.c
index f452e1b7..fb98a040 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -31,15 +31,13 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86cmap.h"
+#include "xf86drmMode.h"
#include "common.h"
-#include "intel.h"
#include "intel_driver.h"
#include "legacy/legacy.h"
#include "sna/sna_module.h"
-#include <xf86drmMode.h>
-
static struct intel_device_info *chipset_info;
static const struct intel_device_info intel_i81x_info = {
@@ -140,6 +138,8 @@ static const SymTabRec _intel_chipsets[] = {
{PCI_CHIP_IVYBRIDGE_S_GT1, "Ivybridge Server" },
{-1, NULL}
};
+#define NUM_CHIPSETS (sizeof(_intel_chipsets) / sizeof(_intel_chipsets[0]))
+
SymTabRec *intel_chipsets = (SymTabRec *) _intel_chipsets;
#define INTEL_DEVICE_MATCH(d,i) \
@@ -298,7 +298,7 @@ static Bool intel_pci_probe(DriverPtr driver,
intptr_t match_data)
{
ScrnInfoPtr scrn;
- PciChipsets intel_pci_chipsets[ARRAY_SIZE(_intel_chipsets)];
+ PciChipsets intel_pci_chipsets[NUM_CHIPSETS];
unsigned i;
chipset_info = (void *)match_data;
@@ -319,7 +319,7 @@ static Bool intel_pci_probe(DriverPtr driver,
#endif
}
- for (i = 0; i < ARRAY_SIZE(_intel_chipsets); i++) {
+ for (i = 0; i < NUM_CHIPSETS; i++) {
intel_pci_chipsets[i].numChipset = intel_chipsets[i].token;
intel_pci_chipsets[i].PCIid = intel_chipsets[i].token;
intel_pci_chipsets[i].dummy = NULL;
diff --git a/src/intel_video.c b/src/intel_video.c
index d1d61269..6d74d51f 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -61,6 +61,7 @@
#include "xf86PciInfo.h"
#include "xf86Pci.h"
#include "xf86fbman.h"
+#include "xf86drm.h"
#include "regionstr.h"
#include "randrstr.h"
#include "windowstr.h"