summaryrefslogtreecommitdiff
path: root/graphics/MesaLib/patches/patch-configure
blob: fd42b6578851957357eb1406f98d67554ed98552 (plain)
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
$NetBSD: patch-configure,v 1.3 2016/01/05 13:02:57 tnn Exp $

Make sure toolchain can assemble SSE stuff in addition to having intrinsics.
Add libdevq support from FreeBSD ports.

--- configure.orig	2015-12-15 14:52:26.000000000 +0000
+++ configure
@@ -859,6 +859,8 @@ GLPROTO_LIBS
 GLPROTO_CFLAGS
 XLIBGL_LIBS
 XLIBGL_CFLAGS
+LIBDEVQ_LIBS
+LIBDEVQ_CFLAGS
 LIBUDEV_LIBS
 LIBUDEV_CFLAGS
 ENABLE_SHADER_CACHE_FALSE
@@ -1173,6 +1175,8 @@ OPENSSL_CFLAGS
 OPENSSL_LIBS
 LIBUDEV_CFLAGS
 LIBUDEV_LIBS
+LIBDEVQ_CFLAGS
+LIBDEVQ_LIBS
 XLIBGL_CFLAGS
 XLIBGL_LIBS
 GLPROTO_CFLAGS
@@ -5281,6 +5285,7 @@ DRI2PROTO_REQUIRED=2.6
 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.38.0
@@ -19935,7 +19940,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
 #include <smmintrin.h>
 int main () {
     __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
-    c = _mm_max_epu32(a, b);
+    c = _mm_max_epu32(a, b); asm volatile ("movntdqa (%esi),%xmm3\n");
     return 0;
 }
 _ACEOF
@@ -20720,7 +20725,7 @@ _ACEOF
 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
         flag=no
         case ${host_os} in
-            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            aix* | freebsd* | dragonfly* | darwin*) flag="-D_THREAD_SAFE";;
             osf* | hpux*) flag="-D_REENTRANT";;
             solaris*)
             if test "$GCC" = "yes"; then
@@ -22080,6 +22085,89 @@ else
 fi
 
 
+
+# Check for libdevq
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDEVQ" >&5
+$as_echo_n "checking for LIBDEVQ... " >&6; }
+if test -n "$LIBDEVQ_CFLAGS"; then
+    pkg_cv_LIBDEVQ_CFLAGS="$LIBDEVQ_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
+ --print-errors \"libdevq-1.0 >= \$LIBDEVQ_REQUIRED\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= $LIBDEVQ_REQUIRED") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBDEVQ_CFLAGS=`$PKG_CONFIG --cflags "libdevq-1.0 >=
+ $LIBDEVQ_REQUIRED" 2>/dev/null`
+              test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBDEVQ_LIBS"; then
+    pkg_cv_LIBDEVQ_LIBS="$LIBDEVQ_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
+ --print-errors \"libdevq-1.0 >= \$LIBDEVQ_REQUIRED\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= $LIBDEVQ_REQUIRED") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBDEVQ_LIBS=`$PKG_CONFIG --libs "libdevq-1.0 >=
+ $LIBDEVQ_REQUIRED" 2>/dev/null`
+              test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+            LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --short-errors
+ --print-errors --cflags --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED"
+ 2>&1`
+        else
+            LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags
+ --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED" 2>&1`
+        fi
+    # Put the nasty error message in config.log where it belongs
+    echo "$LIBDEVQ_PKG_ERRORS" >&5
+
+    have_libdevq=no
+elif test $pkg_failed = untried; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    have_libdevq=no
+else
+    LIBDEVQ_CFLAGS=$pkg_cv_LIBDEVQ_CFLAGS
+    LIBDEVQ_LIBS=$pkg_cv_LIBDEVQ_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    have_libdevq=yes
+fi
+
+
+
+
 if test "x$enable_dri" = xyes; then
     if test "$enable_static" = yes; then
         as_fn_error $? "Cannot use static libraries for DRI drivers" "$LINENO" 5
@@ -22882,6 +22970,10 @@ if test "$have_sysfs" = yes; then
     DEFINES="$DEFINES -DHAVE_SYSFS"
     have_pci_id=yes
 fi
+if test "$have_libdevq" = yes; then
+    DEFINES="$DEFINES -DHAVE_LIBDEVQ"
+    have_pci_id=yes
+fi
 
 # This is outside the case (above) so that it is invoked even for non-GLX
 # builds.
@@ -23814,6 +23906,8 @@ fi
 
 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
@@ -25381,9 +25475,6 @@ fi
                 CLANG_LIBDIR=${LLVM_LIBDIR}
             fi
             CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
-            if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
-  as_fn_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." "$LINENO" 5
-fi
         fi
     else
         MESA_LLVM=0