1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
--- configure.ac.orig 2015-12-21 10:05:52.000000000 +0100
+++ configure.ac 2015-12-22 17:04:25.728359000 +0100
@@ -78,6 +78,7 @@
DRI3PROTO_REQUIRED=1.0
PRESENTPROTO_REQUIRED=1.0
LIBUDEV_REQUIRED=151
+LIBDEVQ_REQUIRED=0.0.2
GLPROTO_REQUIRED=1.4.14
LIBOMXIL_BELLAGIO_REQUIRED=0.0
LIBVA_REQUIRED=0.35.0
@@ -743,7 +744,7 @@
[enable_dri=yes])
case "$host_os" in
-linux*)
+linux*|freebsd*)
dri3_default=yes
;;
*)
@@ -1000,6 +1001,9 @@
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
+PKG_CHECK_MODULES([LIBDEVQ], [libdevq-1.0 >= $LIBDEVQ_REQUIRED],
+ have_libdevq=yes, have_libdevq=no)
+
AC_ARG_ENABLE([sysfs],
[AS_HELP_STRING([--enable-sysfs],
[enable /sys PCI identification @<:@default=disabled@:>@])],
@@ -1096,6 +1100,10 @@
DEFINES="$DEFINES -DHAVE_LIBUDEV"
have_pci_id=yes
fi
+if test "$have_libdevq" = yes; then
+ DEFINES="$DEFINES -DHAVE_LIBDEVQ"
+ have_pci_id=yes
+fi
if test "$have_sysfs" = yes; then
DEFINES="$DEFINES -DHAVE_SYSFS"
@@ -1228,6 +1236,23 @@
;;
gnu*)
DEFINES="$DEFINES -DHAVE_ALIAS"
+dnl not sure about dri3 support, just enable it for now.
+ if test "x$enable_dri3" = xyes; then
+ DEFINES="$DEFINES -DHAVE_DRI3"
+ fi
+
+ if test "x$have_libdevq" != xyes; then
+ AC_MSG_ERROR([libdevq required for building DRI])
+ fi
+
+ case "$host_cpu" in
+ powerpc* | sparc*)
+ # Build only the drivers for cards that exist on PowerPC/sparc
+ if test "x$with_dri_drivers" = "xyes"; then
+ with_dri_drivers="r200 radeon swrast"
+ fi
+ ;;
+ esac
;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
@@ -1384,6 +1409,8 @@
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
if test "x$need_pci_id$have_libudev" = xyesyes; then
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
+elif test "x$need_libdevq" = xyes; then
+ GBM_PC_REQ_PRIV="libdevq-1.0 >= $LIBDEVQ_REQUIRED"
else
GBM_PC_REQ_PRIV=""
fi
@@ -1545,9 +1572,19 @@
AC_MSG_ERROR([cannot enable OpenCL without Gallium])
fi
+ if test "x$acv_mesa_CLANG" = xno; then
+
+ GCC_VERSION=`$CC -dumpversion`
+ if test $? -eq 0; then
+ GCC_VERSION_MAJOR=`echo $GCC_VERSION | cut -d. -f1`
+ GCC_VERSION_MINOR=`echo $GCC_VERSION | cut -d. -f2`
+ fi
+
if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 7; then
AC_MSG_ERROR([gcc >= 4.7 is required to build clover])
fi
+# end of clang test.
+ fi
if test "x$have_libclc" = xno; then
AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
@@ -1815,8 +1852,6 @@
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
fi
else
MESA_LLVM=0
|