1
# Copyright 2005 Adam Jackson.
3
# Permission is hereby granted, free of charge, to any person obtaining a
4
# copy of this software and associated documentation files (the "Software"),
5
# to deal in the Software without restriction, including without limitation
6
# on the rights to use, copy, modify, merge, publish, distribute, sub
7
# license, and/or sell copies of the Software, and to permit persons to whom
8
# the Software is furnished to do so, subject to the following conditions:
10
# The above copyright notice and this permission notice (including the next
11
# paragraph) shall be included in all copies or substantial portions of the
14
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17
# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
# Process this file with autoconf to produce a configure script
25
AC_INIT([xf86-video-intel],
27
[https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/issues/new],
29
AC_CONFIG_SRCDIR([Makefile.am])
30
AC_CONFIG_HEADERS([config.h])
31
AC_CONFIG_MACRO_DIR([m4])
35
AM_INIT_AUTOMAKE([foreign dist-bzip2])
37
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
38
m4_ifndef([XORG_MACROS_VERSION],
39
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen.
40
Hint: either install from source, git://anongit.freedesktop.org/xorg/util/macros or,
41
depending on you distribution, try package 'xutils-dev' or 'xorg-x11-util-macros'])])
43
XORG_MACROS_VERSION(1.8)
46
# And disable a few very noisy warnings
47
m4_ifdef([XORG_TESTSET_CFLAG], [
48
XORG_TESTSET_CFLAG([NOWARNFLAGS], [-Wno-cast-qual])
49
XORG_TESTSET_CFLAG([NOWARNFLAGS], [-Wno-redundant-decls])
50
XORG_TESTSET_CFLAG([NOWARNFLAGS], [-Wno-maybe-uninitialized])
54
# Require X.Org server macros (i.e. XORG_DRIVER_CHECK_EXT) to check for required modules
55
m4_ifndef([XORG_DRIVER_CHECK_EXT],
56
[m4_fatal([must install xorg-server macros before running autoconf/autogen.
57
Hint: either install from source, git://anongit.freedesktop.org/xorg/xserver or,
58
depending on your distribution, try package 'xserver-xorg-dev' or 'xorg-x11-server-devel'])])
65
# Check for common libc routines redefined by os.h
66
AC_CHECK_FUNCS([strlcpy strlcat strndup], [], [])
68
# Platform specific settings
75
AC_ARG_ENABLE(backlight,
76
AS_HELP_STRING([--disable-backlight],
77
[Enable control over the backlight [default=yes]]),
78
[backlight="$enableval"],
80
if test "x$backlight" = "xyes"; then
81
AC_DEFINE(USE_BACKLIGHT, 1, [Enable control of the backlight])
84
AC_ARG_ENABLE(backlight-helper,
85
AS_HELP_STRING([--disable-backlight-helper],
86
[Enable building the backlight helper executable for running X under a normal user [default=auto]]),
87
[backlight_helper="$enableval"],)
88
AM_CONDITIONAL(BUILD_BACKLIGHT_HELPER, [test "x$backlight" = "xyes" -a "x$backlight_helper" = "xyes"])
89
if test "x$backlight_helper" = "xyes"; then
90
tools_msg="$tools_msg xf86-video-intel-backlight-helper"
91
AC_DEFINE(USE_BACKLIGHT_HELPER, 1, [Enable use of the backlight helper interfaces])
94
# Are we in a git checkout?
97
AC_DEFINE(HAVE_DOT_GIT, 1, [Are we in a git checkout?])
100
AM_CONDITIONAL(HAVE_DOT_GIT, test "x$dot_git" = "xyes")
102
# If so, we include the git description in our logs for sanity checking.
104
# However, for people not running their own drivers this is just noise.
105
# So we copy the xserver's builderstring idiom to allow for this to be
106
# overridden and perhaps replaced with something more useful.
107
AC_ARG_WITH(builderstring,
108
AS_HELP_STRING([--with-builderstring=BUILDERSTRING],
109
[Additional builder string (default: use git describe)]),
110
[BUILDERSTRING="$withval"],
111
[BUILDERSTRING="x-magic-git-describe"])
113
if test "x$BUILDERSTRING" = "xx-magic-git-describe" -a "x$dot_git" = "xyes"; then
114
AC_DEFINE(USE_GIT_DESCRIBE, 1, [Use automagic builder description])
116
if test "x$BUILDERSTRING" != x -a "x$BUILDERSTRING" != "xno" -a "x$BUILDERSTRING" != xx-magic-git-describe; then
117
AC_DEFINE_UNQUOTED(BUILDER_DESCRIPTION, ["$BUILDERSTRING"], [Builder description])
121
AC_ARG_ENABLE(gen4asm,
122
AS_HELP_STRING([--enable-gen4asm],
123
[Enable rebuilding the gen4 assembly files [default=no]]),
128
if test "x$ASM" != "xno"; then
130
AS_HELP_STRING([--with-gen4asm=PATH],
131
[Path to intel-gen4asm binary]),
134
if test -n "$path" ; then
137
PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
138
if test "x$ASM" = "xyes" -a "x$gen4asm" != "xyes"; then
139
AC_MSG_ERROR([intel-gen4asm support requested but not found])
142
if test "x$gen4asm" = "xyes"; then
143
AC_MSG_CHECKING([path to use for intel-gen4asm])
144
if test -n "$path" ; then
145
INTEL_GEN4ASM="$path"
147
INTEL_GEN4ASM="`pkg-config intel-gen4asm --variable=exec_prefix`/bin/intel-gen4asm"
149
if ! test -e "$INTEL_GEN4ASM"; then
150
AC_MSG_ERROR([intel-gen4asm enabled, but not found. Tried '$INTEL_GEN4ASM'.])
152
AC_MSG_RESULT([$INTEL_GEN4ASM])
153
AC_SUBST([INTEL_GEN4ASM])
156
AM_CONDITIONAL(HAVE_GEN4ASM, test "x$gen4asm" = "xyes")
158
# Check for atomic intrinsics
159
AC_CACHE_CHECK([for native atomic primitives], intel_cv_atomic_primitives,
161
intel_cv_atomic_primitives="none"
163
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
164
int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }
165
int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i, j, k); }
167
[intel_cv_atomic_primitives="Intel"],[])
169
if test "x$intel_cv_atomic_primitives" = "xnone"; then
170
AC_CHECK_HEADER([atomic_ops.h], intel_cv_atomic_primitives="libatomic-ops")
173
# atomic functions defined in <atomic.h> & libc on Solaris
174
if test "x$intel_cv_atomic_primitives" = "xnone"; then
175
AC_CHECK_FUNC([atomic_cas_uint],
176
intel_cv_atomic_primitives="Solaris")
180
if test "x$intel_cv_atomic_primitives" = "xIntel"; then
181
AC_DEFINE(HAVE_ATOMIC_PRIMITIVES, 1,
182
[Enable if your compiler supports the Intel __sync_* atomic primitives])
184
if test "x$intel_cv_atomic_primitives" = "xlibatomic-ops"; then
185
AC_DEFINE(HAVE_LIB_ATOMIC_OPS, 1, [Enable if you have libatomic-ops-dev installed])
188
if test "x$intel_cv_atomic_primitives" = "xnone"; then
189
AC_MSG_ERROR([xf86-video-intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package.])
193
AS_HELP_STRING([--disable-udev],
194
[Disable udev-based monitor hotplug detection [default=auto]]),
199
if test "x$UDEV" != "xno"; then
200
PKG_CHECK_MODULES(UDEV, [libudev], [udev="yes"], [udev="no"])
201
AC_CHECK_HEADERS([sys/stat.h], [], [udev="no"])
202
if test "x$UDEV" = "xyes" -a "x$udev" != "xyes"; then
203
AC_MSG_ERROR([udev support requested but not found (libudev)])
205
if test "x$udev" = "xyes"; then
206
AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
213
PKG_CHECK_MODULES(X11, [x11 x11-xcb xcb-dri2 xcomposite xdamage xrender xrandr xext xfixes cairo cairo-xlib-xrender pixman-1 libpng], [x11="yes"], [x11="no"])
214
AM_CONDITIONAL(HAVE_X11, test "x$x11" = "xyes")
215
echo X11_CLFAGS="$X11_CLFAGS" X11_LIBS="$X11_LIBS"
223
int eax, ebx, ecx, edx;
224
if (__get_cpuid_max(0, NULL) < 4)
226
__cpuid_count(4, 0, eax, ebx, ecx, edx);
231
if test "x$cpuid" = "xyes"; then
232
AC_DEFINE(HAVE_CPUID_H,1,[Found a useable cpuid.h])
236
AC_CHECK_HEADERS([sys/ipc.h sys/ipc.h], [], [shm="no"])
237
AC_CHECK_HEADERS([X11/extensions/XShm.h], [], [shm="no"], [
238
#include <X11/Xlibint.h>
239
#include <X11/Xproto.h>
241
AC_CHECK_HEADERS([X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [], [
242
#include <X11/Xlibint.h>
243
#include <X11/Xproto.h>
245
if test "x$ac_cv_header_X11_extensions_shmproto_h" != "xyes" -a "x$ac_cv_header_X11_extensions_shmstr_h" != "xyes"; then
249
if test "x$shm" = "xyes"; then
250
AC_DEFINE([HAVE_MIT_SHM], 1, [Define to 1 if MIT-SHM is available])
253
PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-xfixes xcb-present x11-xcb xshmfence x11 xcomposite xdamage xrender xrandr xxf86vm xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
254
AM_CONDITIONAL(X11_DRI3, test "x$x11_dri3" = "xyes" -a "x$shm" = "xyes")
255
AM_CONDITIONAL(X11_SHM, test "x$shm" = "xyes")
257
PKG_CHECK_MODULES(X11_VM, [xxf86vm], [x11_vm="yes"], [x11_vm="no"])
258
AM_CONDITIONAL(X11_VM, test "x$x11_vm" = "xyes")
261
AS_HELP_STRING([--disable-tools],
262
[Enable building and installing the miscellaneous tools [default=auto]]),
263
[tools="$enableval"], [tools="auto"])
264
if test "x$shm" != "xyes"; then
265
if test "x$tools" = "xyes"; then
266
AC_MSG_ERROR([Incomplete requirements for extra tools, X11 MIT-SHM extension required])
270
if test "x$tools" != "xno"; then
271
ivo_requires="xrandr xdamage xfixes xcursor xtst xrender xscrnsaver xext x11 pixman-1"
275
PKG_CHECK_MODULES(IVO_EXTRA, [$ignore],
276
[AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [ivo_requires="$ignore $ivo_requires"], [],
277
[#include <X11/Xlibint.h>
278
#include <X11/Xproto.h>
281
ignore="xcb-dri3 xcb-sync x11-xcb xshmfence x11"
282
PKG_CHECK_MODULES(IVO_EXTRA, [$ignore], [ivo_requires="$ivo_requires $ignore"; extra_cflags="-DDRI3"], [ignore=""])
284
PKG_CHECK_MODULES(IVO, [$ivo_requires], [ivo="yes"], [ivo="no"])
285
AC_CHECK_HEADER([sys/timerfd.h], [], [ivo="no"])
286
if test "x$ivo" = "xno"; then
287
if test "x$tools" = "xyes"; then
288
AC_MSG_ERROR([Incomplete requirements for intel-virtual-output, requires $ivo_requires])
293
PKG_CHECK_MODULES(TOOL_CURSOR, [xfixes x11 libpng], [cursor="yes"], [ivo="no"])
295
IVO_CFLAGS="$IVO_CFLAGS $extra_cflags"
297
if test "x$tools" != "xno"; then
298
tools_msg="$tools_msg intel-virtual-output"
300
AC_MSG_CHECKING([whether to build additional tools])
301
AC_MSG_RESULT([$tools])
302
AM_CONDITIONAL(BUILD_TOOLS, test "x$tools" != "xno")
303
AM_CONDITIONAL(BUILD_TOOL_CURSOR, test "x$cursor" = "xyes")
305
# Define a configure option for an alternate module directory
306
AC_ARG_WITH(xorg-module-dir,
307
AS_HELP_STRING([--with-xorg-module-dir=DIR],
308
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
309
[moduledir="$withval"],
310
[moduledir="$libdir/xorg/modules"])
313
AS_HELP_STRING([--disable-dri],
314
[Disable DRI support [[default=auto]]]),
318
AS_HELP_STRING([--disable-dri1],
319
[Disable DRI1 support [[default=auto]]]),
323
AS_HELP_STRING([--disable-dri2],
324
[Disable DRI2 support [[default=yes]]]),
328
AS_HELP_STRING([--disable-dri3],
329
[Disable DRI3 support [[default=yes]]]),
332
AC_ARG_WITH(default-dri,
333
AS_HELP_STRING([--with-default-dri],
334
[Select the default maximum DRI level [default 2]]),
335
[DRI_DEFAULT=$withval],
337
if test "x$DRI_DEFAULT" = "x0"; then
338
AC_DEFINE(DEFAULT_DRI_LEVEL, 0,[Default DRI level])
340
AC_DEFINE(DEFAULT_DRI_LEVEL, ~0, [Default DRI level])
343
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc],
344
[Disable XvMC support [[default=yes]]]),
349
AS_HELP_STRING([--enable-kms],
350
[Assume KMS support [[default=yes]]]),
354
AS_HELP_STRING([--enable-ums],
355
[Assume UMS support [[default=auto]]]),
359
AC_ARG_ENABLE(kms-only,
360
AS_HELP_STRING([--enable-kms-only],
361
[Only assume KMS support (no UMS) [[default=no]]]),
362
[ONLY_KMS="$enableval"],
365
AC_ARG_ENABLE(ums-only,
366
AS_HELP_STRING([--enable-ums-only],
367
[Only assume UMS support (no KMS) [[default=no]]]),
368
[ONLY_UMS="$enableval"],
371
required_xorg_server_version=1.6
372
required_pixman_version=0.16
374
PKG_CHECK_EXISTS([pixman-1 >= 0.24.0],
375
AC_DEFINE([HAS_PIXMAN_TRIANGLES], 1, [Enable pixman triangle rasterisation])
377
PKG_CHECK_EXISTS([pixman-1 >= 0.27.1],
378
[AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache])],
380
# Store the list of server defined optional extensions in REQUIRED_MODULES
381
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
382
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
383
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
385
# Obtain compiler/linker options for the driver dependencies
386
PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.20]) # libdrm_intel is checked separately
387
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
390
AS_HELP_STRING([--enable-sna],
391
[Enable SandyBridge\'s New Acceleration (SNA) [default=auto]]),
395
AC_CHECK_HEADERS([dev/wscons/wsconsio.h])
399
if test "x$SNA" != "xno"; then
400
AC_DEFINE(USE_SNA, 1, [Enable SNA support])
401
AC_CHECK_HEADERS([sys/sysinfo.h], AC_CHECK_MEMBERS([struct sysinfo.totalram], [], [], [[#include <sys/sysinfo.h>]]))
404
uxa_requires_libdrm=2.4.52
405
uxa_requires_pixman=0.24.0
408
AS_HELP_STRING([--enable-uxa],
409
[Enable Unified Acceleration Architecture (UXA) [default=auto]]),
412
if test "x$UXA" = "xauto"; then
413
PKG_CHECK_EXISTS([libdrm_intel >= $uxa_requires_libdrm pixman-1 >= $uxa_requires_pixman], [], [UXA=no])
415
if test "x$UXA" != "xno"; then
416
AC_DEFINE(USE_UXA, 1, [Enable UXA support])
417
PKG_CHECK_MODULES(DRMINTEL, [libdrm_intel >= $uxa_requires_libdrm])
418
required_pixman_version=0.24
422
PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto damageproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
423
ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server`
424
XSERVER_VERSION=`$PKG_CONFIG --modversion xorg-server`
425
PIXMAN_VERSION=`$PKG_CONFIG --modversion pixman-1`
427
if test "x$ONLY_UMS" = "xyes"; then
432
if test "x$ONLY_KMS" = "xyes"; then
437
save_CPPFLAGS=$CPPFLAGS
438
CPPFLAGS=$XORG_CFLAGS
439
AC_CHECK_HEADERS([vgaHW.h], legacy="yes", legacy="no")
440
CPPFLAGS=$save_CPPFLAGS
441
if test "x$UMS" = "xauto"; then
444
if test "x$UMS" = "xyes" -a "x$legacy" = "xno"; then
445
AC_MSG_ERROR([vgaHW support required for UMS (i810) driver])
448
if test "x$UMS" = "xyes"; then
450
AS_HELP_STRING([--enable-xaa],
451
[Enable legacy X Acceleration Architecture (XAA) for i810 chipsets [default=auto]]),
454
if test "x$XAA" != "xno"; then
455
save_CPPFLAGS=$CPPFLAGS
456
CPPFLAGS=$XORG_CFLAGS
457
AC_CHECK_HEADERS([xaa.h], XAA="yes", XAA="no")
458
CPPFLAGS=$save_CPPFLAGS
460
AC_MSG_CHECKING([whether to include XAA support])
461
AC_MSG_RESULT([$XAA])
464
AS_HELP_STRING([--enable-dga],
465
[Enable legacy Direct Graphics Access (DGA) for i810 chipsets [default=auto]]),
468
if test "x$DGA" != "xno"; then
471
AC_CHECK_HEADERS([dgaproc.h], DGA="yes", DGA="no", [#include <dixstruct.h>])
474
AC_MSG_CHECKING([whether to include DGA support])
475
AC_MSG_RESULT([$DGA])
477
AM_CONDITIONAL(DGA, test "x$DGA" = "xyes")
478
AM_CONDITIONAL(XAA, test "x$XAA" = "xyes")
480
AM_CONDITIONAL(KMS, test "x$KMS" = "xyes")
481
if test "x$KMS" = "xyes"; then
482
AC_DEFINE(KMS,1,[Assume KMS support])
484
AM_CONDITIONAL(UMS, test "x$UMS" = "xyes")
485
if test "x$UMS" = "xyes"; then
486
AC_DEFINE(UMS,1,[Assume UMS support])
490
XORG_DRIVER_CHECK_EXT(XF86DRI, xf86driproto)
491
if test "x$_EXT_CHECK" != "xno" -a "x$DRI" != "xno" -a "x$DRI1" != "xno" -a "x$UMS" = "xyes"; then
492
PKG_CHECK_MODULES(DRI1, [xf86driproto], [have_dri1=$DRI], [have_dri1=no])
493
save_CFLAGS="$CFLAGS"
494
save_CPPFLAGS="$CPPFLAGS"
495
CFLAGS="$CFLAGS $XORG_CFLAGS $DRI1_CFLAGS $DRM_CFLAGS"
496
CPPFLAGS="$CPPFLAGS $XORG_CFLAGS $DRI1_CFLAGS $DRM_CFLAGS"
497
AC_CHECK_HEADERS([dri.h sarea.h dristruct.h], [], [have_dri1=no],
500
/* for dristruct.h */
501
#include <xorg-server.h>
509
CFLAGS="$save_CFLAGS"
510
CPPFLAGS="$save_CPPFLAGS"
513
AC_MSG_CHECKING([whether to include DRI1 support])
514
AC_MSG_RESULT([$have_dri1])
516
AM_CONDITIONAL(DRI1, test "x$have_dri1" != "xno")
517
if test "x$have_dri1" != "xno"; then
518
AC_DEFINE(HAVE_DRI1,1,[Enable DRI1 driver support])
520
if test "x$DRI_DEFAULT" = "x1"; then
521
AC_DEFINE(DEFAULT_DRI_LEVEL,1,[Default DRI level])
524
dri_msg="$dri_msg $str"
529
if test "x$DRI" = "xyes" -a "x$UMS" = "xyes" -a "x$DRI1" != "xno"; then
530
AC_MSG_ERROR([DRI1 requested but prerequisites not found])
536
if test "x$DRI" != "xno"; then
537
if test "x$DRI2" != "xno"; then
538
PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6], [have_dri2=$DRI], [have_dri2=no])
540
if test "x$have_dri2" != "xno"; then
542
CFLAGS="$XORG_CFLAGS $DRM_CFLAGS $DRI1_CFLAGS $DRI2_CFLAGS"
543
AC_CHECK_HEADERS([dri2.h], [], [have_dri2=no], [
544
#include <dixstruct.h>
549
if test "x$have_dri2" != "xno"; then
550
dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
551
if test "x$dridriverdir" = "x"; then
552
dridriverdir="$libdir/dri"
554
AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default have_dri2 driver path])
557
if test "x$DRI3" != "xno"; then
558
XORG_DRIVER_CHECK_EXT(DRI3, dri3proto)
559
if test "x$_EXT_CHECK" != "xno"; then
560
PKG_CHECK_MODULES(DRI3, [dri3proto], [have_dri3=$DRI], [])
563
if test "x$have_dri3" != "xno"; then
565
CFLAGS="$XORG_CFLAGS $DRI3_CFLAGS"
566
AC_CHECK_DECL(DRI3, [], [have_dri3=no], [#include <xorg-server.h>])
567
AC_CHECK_HEADERS([misyncstr.h misyncshm.h], [], [have_dri3=no], [
568
#include <xorg-server.h>
576
AC_MSG_CHECKING([whether to include DRI2 support])
577
AM_CONDITIONAL(DRI2, test "x$have_dri2" != "xno")
578
AC_MSG_RESULT([$have_dri2])
579
if test "x$have_dri2" != "xno"; then
580
AC_DEFINE(HAVE_DRI2,1,[Enable DRI2 driver support])
582
if test "x$DRI_DEFAULT" = "x2"; then
583
AC_DEFINE(DEFAULT_DRI_LEVEL,2,[Default DRI level])
586
dri_msg="$dri_msg $str"
588
if test "x$DRI" = "xyes" -a "x$DRI2" != "xno" -a "x$KMS" = "xyes"; then
589
AC_MSG_ERROR([DRI2 requested but prerequisites not found])
592
# UXA doesn't build without DRI2 headers, too late to fix
596
AC_MSG_CHECKING([whether to include DRI3 support])
597
AM_CONDITIONAL(DRI3, test "x$have_dri3" != "xno")
598
AC_MSG_RESULT([$have_dri3])
599
if test "x$have_dri3" != "xno"; then
600
AC_DEFINE(HAVE_DRI3,1,[Enable DRI3 driver support])
602
if test "x$DRI_DEFAULT" = "x3"; then
603
AC_DEFINE(DEFAULT_DRI_LEVEL,3,[Default DRI level])
606
dri_msg="$dri_msg $str"
608
if test "x$DRI" = "xyes" -a "x$DRI3" != "xno" -a "x$KMS" = "xyes"; then
609
AC_MSG_ERROR([DRI3 requested but prerequisites not found])
613
AC_MSG_CHECKING([default DRI support])
614
AC_MSG_RESULT([$DEFAULT_DRI_DEFAULT])
616
AC_CHECK_HEADERS([X11/extensions/dpmsconst.h])
619
XORG_DRIVER_CHECK_EXT(PRESENT, presentproto)
620
if test "x$_EXT_CHECK" != "xno"; then
621
PKG_CHECK_MODULES(PRESENT, [presentproto], [PRESENT="yes"], [])
623
if test "x$PRESENT" != "xno"; then
625
CFLAGS="$XORG_CFLAGS $PRESENT_CFLAGS"
626
AC_CHECK_HEADERS([present.h], [], [PRESENT="no"], [
627
#include <xorg-server.h>
632
AC_MSG_CHECKING([whether to include PRESENT support])
633
AM_CONDITIONAL(PRESENT, test "x$PRESENT" != "xno")
634
AC_MSG_RESULT([$PRESENT])
635
if test "x$PRESENT" != "xno"; then
636
AC_DEFINE(HAVE_PRESENT,1,[Enable PRESENT driver support])
637
dri_msg="$dri_msg Present"
640
AC_MSG_CHECKING([whether to include UXA support])
641
AC_MSG_RESULT([$UXA])
642
AM_CONDITIONAL(UXA, test "x$UXA" != "xno")
644
AC_MSG_CHECKING([whether to include SNA support])
645
AM_CONDITIONAL(SNA, test "x$SNA" != "xno")
646
AC_MSG_RESULT([$SNA])
648
if test "$XVMC" = "yes"; then
649
PKG_CHECK_MODULES(XVMCLIB, [xvmc dri2proto x11 x11-xcb xcb-dri2 xcb-aux libdrm_intel], [], [XVMC="no"])
651
AC_MSG_CHECKING([whether to include XvMC support])
652
AC_MSG_RESULT([$XVMC])
653
AM_CONDITIONAL(XVMC, test "x$XVMC" = "xyes")
654
if test "x$XVMC" = "xyes"; then
655
AC_DEFINE(ENABLE_XVMC,1,[Enable XvMC support])
662
AC_ARG_WITH(default-accel,
663
AS_HELP_STRING([--with-default-accel],
664
[Select the default acceleration method out of none, sna, or uxa [default is sna if enabled, otherwise uxa]]),
667
if test "x$accel" = "xyes"; then
668
AC_MSG_WARN([No default acceleration specified, choosing automatic selection])
672
AC_MSG_CHECKING([which acceleration method to use by default])
673
if test "x$accel" = "xauto"; then
674
if test "x$SNA" != "xno"; then
677
if test "x$UXA" != "xno"; then
681
if test "x$accel" = "xauto" -a "x$KMS" = "xyes"; then
682
AC_MSG_ERROR([No default acceleration option])
687
if test "x$accel" = "xsna"; then
688
if test "x$SNA" != "xno"; then
689
AC_DEFINE(DEFAULT_ACCEL_METHOD, SNA, [Default acceleration method])
692
AC_MSG_ERROR([SNA requested as default, but is not enabled])
696
if test "x$accel" = "xuxa"; then
697
if test "x$UXA" != "xno"; then
698
AC_DEFINE(DEFAULT_ACCEL_METHOD, UXA, [Default acceleration method])
701
AC_MSG_ERROR([UXA requested as default, but is not enabled])
705
if test "x$have_accel" = "xnone"; then
706
if test "x$KMS" = "xyes"; then
707
if test "x$SNA" != "xno" -o "x$UXA" != "xno"; then
708
AC_DEFINE(DEFAULT_ACCEL_METHOD, NOACCEL, [Default acceleration method])
710
AC_MSG_ERROR([Invalid default acceleration option])
715
AC_MSG_RESULT($accel)
719
AC_ARG_ENABLE(tear-free,
720
AS_HELP_STRING([--enable-tear-free],
721
[Enable use of TearFree by default [default=no]]),
722
[TEARFREE="$enableval"],
724
if test "x$TEARFREE" = "xyes"; then
725
AC_DEFINE(TEARFREE,1,[Enable "TearFree" by default])
726
xp_msg="$xp_msg TearFree"
729
AC_ARG_ENABLE(create2,
730
AS_HELP_STRING([--enable-create2],
731
[Enable use of create2 ioctl (experimental) [default=no]]),
732
[CREATE2="$enableval"],
734
AM_CONDITIONAL(USE_CREATE2, test "x$CREATE2" = "xyes")
735
if test "x$CREATE2" = "xyes"; then
736
AC_DEFINE(USE_CREATE2,1,[Assume "create2" support])
737
xp_msg="$xp_msg create2"
740
AC_ARG_ENABLE(async-swap,
741
AS_HELP_STRING([--enable-async-swap],
742
[Enable use of asynchronous swaps (experimental) [default=no]]),
743
[ASYNC_SWAP="$enableval"],
745
AM_CONDITIONAL(USE_ASYNC_SWAP, test "x$ASYNC_SWAP" = "xyes")
746
if test "x$ASYNC_SWAP" = "xyes"; then
747
AC_DEFINE(USE_ASYNC_SWAP,1,[Assume asynchronous swap support])
748
xp_msg="$xp_msg async-swap"
752
AS_HELP_STRING([--enable-debug],
753
[Enables internal debugging [default=no]]),
754
[DEBUG="$enableval"],
756
AC_ARG_ENABLE(valgrind,
757
AS_HELP_STRING([--enable-valgrind],
758
[Enables valgrindified ioctls for debugging [default=no]]),
763
AC_SEARCH_LIBS(clock_gettime, rt, [CLOCK_GETTIME_LIBS=$LIBS])
764
AC_SUBST(CLOCK_GETTIME_LIBS)
766
sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
768
AM_CONDITIONAL(DEBUG, test "x$DEBUG" != "xno")
769
AM_CONDITIONAL(FULL_DEBUG, test "x$DEBUG" = "xfull")
770
if test "x$DEBUG" = "xno"; then
771
AC_DEFINE(NDEBUG,1,[Disable internal debugging])
773
if test "x$VG" != "xyes"; then
779
if test "x$VG" != "xno"; then
780
PKG_CHECK_MODULES(VALGRIND, [valgrind], have_valgrind="yes", have_valgrind="no")
781
AC_MSG_CHECKING([whether to include valgrind support])
782
if test "x$have_valgrind" = "xyes"; then
783
AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
785
if test "x$VG" = "xyes"; then
786
AC_MSG_ERROR([valgrind support requested, but valgrind-dev headers not found])
789
AC_MSG_RESULT([$have_valgrind ($VG)])
791
AM_CONDITIONAL(VALGRIND, test "x$have_valgrind" = "xyes")
792
if test "x$have_valgrind" = "xyes"; then
793
debug_msg="$debug_msg valgrind"
795
if test "x$DEBUG" = "xsync"; then
796
AC_DEFINE(DEBUG_SYNC,1,[Enable synchronous rendering for debugging])
797
debug_msg="$debug_msg sync"
799
if test "x$DEBUG" = "xmemory"; then
800
AC_DEFINE(DEBUG_MEMORY,1,[Enable memory debugging])
801
debug_msg="$debug_msg memory"
803
if test "x$DEBUG" = "xpixmap"; then
804
AC_DEFINE(DEBUG_PIXMAP,1,[Enable pixmap debugging])
805
debug_msg="$debug_msg pixmaps"
807
if test "x$DEBUG" = "xfull"; then
808
AC_DEFINE(DEBUG_MEMORY,1,[Enable memory debugging])
809
AC_DEFINE(DEBUG_PIXMAP,1,[Enable pixmap debugging])
810
AC_DEFINE(HAS_DEBUG_FULL,1,[Enable all debugging])
811
CFLAGS="$CFLAGS -O0 -ggdb3"
814
if test "x$debug_msg" = "x"; then
818
AC_CONFIG_LIBOBJ_DIR(libobj)
819
AC_REPLACE_FUNCS(getline)
822
AC_SUBST([DRIVER_NAME])
823
AC_SUBST([moduledir])
824
AC_DEFINE_DIR([PREFIX_PATH], prefix, [installation prefix])
825
AC_DEFINE_DIR([LIBEXEC_PATH], libexecdir, [libexec directory])
833
src/legacy/i810/Makefile
834
src/legacy/i810/xvmc/Makefile
835
src/render_program/Makefile
842
xvmc/shader/mc/Makefile
843
xvmc/shader/vld/Makefile
847
tools/org.x.xf86-video-intel.backlight-helper.policy
856
if test "x$SNA" != "xno"; then
857
if test "$accel" = "none"; then
858
accel_msg="$accel_msg *none"
860
accel_msg="$accel_msg none"
862
if test "$accel" = "sna"; then
863
accel_msg="$accel_msg *sna"
865
accel_msg="$accel_msg sna"
868
if test "x$UXA" != "xno"; then
869
if test "x$SNA" = "xno"; then
870
if test "$accel" = "none"; then
871
accel_msg="$accel_msg *none"
873
accel_msg="$accel_msg none"
876
if test "$accel" = "uxa"; then
877
accel_msg="$accel_msg *uxa"
879
accel_msg="$accel_msg uxa"
883
if test "x$dri_msg" = "x"; then
887
if test "x$tools_msg" = "x"; then
892
echo "AC_PACKAGE_STRING will be compiled with:"
893
echo " Xorg Video ABI version: $ABI_VERSION (xorg-server-$XSERVER_VERSION)"
894
echo " pixman version: pixman-1-$PIXMAN_VERSION"
895
echo " Acceleration backends:$accel_msg"
896
echo " Additional debugging support?$debug_msg"
897
echo " Support for Kernel Mode Setting? $KMS"
898
echo " Support for legacy User Mode Setting (for i810)? $UMS"
899
echo " Support for Direct Rendering Infrastructure:$dri_msg"
900
echo " Support for Xv motion compensation (XvMC and libXvMC):$xvmc_msg"
901
echo " Support for display hotplug notifications (udev):$udev_msg"
902
echo " Build additional tools and utilities?$tools_msg"
903
if test -n "$xp_msg"; then
904
echo " Experimental support:$xp_msg"