Lines 56-104
Link Here
|
56 |
AC_SUBST(GTK_CFLAGS) |
56 |
AC_SUBST(GTK_CFLAGS) |
57 |
AC_SUBST(GTK_LIBS) |
57 |
AC_SUBST(GTK_LIBS) |
58 |
|
58 |
|
59 |
PKG_CHECK_MODULES(DRM, [libdrm libdrm_intel libdrm_radeon libdrm_nouveau]) |
59 |
AC_ARG_ENABLE(libdrm_intel, AS_HELP_STRING([--enable-libdrm_intel],[enable building with libdrm_intel support]),enable_libdrm_intel=$enableval,enable_libdrm_intel=yes) |
|
|
60 |
AM_CONDITIONAL(ENABLE_LIBDRM_INTEL, [test "$enable_libdrm_intel" = yes]) |
60 |
|
61 |
|
61 |
OLD_CFLAGS="$CFLAGS" |
62 |
if test x$enable_libdrm_intel = xyes; then |
62 |
CFLAGS="$CFLAGS $DRM_CFLAGS" |
63 |
PKG_CHECK_MODULES(DRM_INTEL, [libdrm libdrm_intel]) |
63 |
AC_MSG_CHECKING([if i915_drm.h, radeon_drm.h and nouveau_drm.h are in include path]) |
64 |
OLD_CFLAGS="$CFLAGS" |
64 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
65 |
CFLAGS="$CFLAGS $DRM_INTEL_CFLAGS" |
65 |
[[ |
66 |
AC_MSG_CHECKING([if i915_drm.h is in include path]) |
66 |
#include <stdint.h> |
67 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
67 |
#include <stdlib.h> |
68 |
[[ |
68 |
#include "i915_drm.h" |
69 |
#include <stdint.h> |
69 |
#include "radeon_drm.h" |
70 |
#include <stdlib.h> |
70 |
#include "nouveau_drm.h" |
71 |
#include "i915_drm.h" |
71 |
]],[[]]),[found_drm_kernel_headers=yes],[found_drm_kernel_headers=no]) |
72 |
]],[[]]),[found_drm_intel_kernel_headers=yes],[found_drm_intel_kernel_headers=no]) |
72 |
|
73 |
|
73 |
if test "$found_drm_kernel_headers" = "yes"; then |
74 |
if test "$found_drm_intel_kernel_headers" = "yes"; then |
74 |
AC_MSG_RESULT([yes]) |
75 |
AC_MSG_RESULT([yes]) |
75 |
else |
76 |
else |
76 |
AC_MSG_RESULT([no]) |
77 |
AC_MSG_RESULT([no]) |
77 |
AC_MSG_CHECKING([if we can find them anyway]) |
78 |
AC_MSG_CHECKING([if we can find them anyway]) |
|
|
79 |
|
80 |
MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm" |
81 |
CFLAGS="$CFLAGS $MORE_DRM_CFLAGS" |
82 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
83 |
[[ |
84 |
#include <stdint.h> |
85 |
#include <stdlib.h> |
86 |
#include "i915_drm.h" |
87 |
]],[[]]),[found_drm_intel_kernel_headers=yes],[found_drm_intel_kernel_headers=no]) |
88 |
|
89 |
if test "$found_drm_intel_kernel_headers" = "yes"; then |
90 |
AC_MSG_RESULT([yes]) |
91 |
DRM_INTEL_CFLAGS="$DRM_INTEL_CFLAGS $MORE_DRM_CFLAGS" |
92 |
else |
93 |
AC_MSG_RESULT([no]) |
94 |
AC_MSG_ERROR([Could not find i915_drm.h]) |
95 |
fi |
96 |
fi |
97 |
|
98 |
AC_SUBST(DRM_INTEL_CFLAGS) |
99 |
AC_SUBST(DRM_INTEL_LIBS) |
100 |
AC_DEFINE(PLY_ENABLE_LIBDRM_INTEL, 1, [Enable support for libdrm_intel driver]) |
101 |
fi |
102 |
|
103 |
AC_ARG_ENABLE(libdrm_radeon, AS_HELP_STRING([--enable-libdrm_radeon],[enable building with libdrm_radeon support]),enable_libdrm_radeon=$enableval,enable_libdrm_radeon=yes) |
104 |
AM_CONDITIONAL(ENABLE_LIBDRM_RADEON, [test "$enable_libdrm_radeon" = yes]) |
78 |
|
105 |
|
79 |
MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm" |
106 |
if test x$enable_libdrm_radeon = xyes; then |
80 |
CFLAGS="$CFLAGS $MORE_DRM_CFLAGS" |
107 |
PKG_CHECK_MODULES(DRM_RADEON, [libdrm libdrm_radeon]) |
|
|
108 |
OLD_CFLAGS="$CFLAGS" |
109 |
CFLAGS="$CFLAGS $DRM_RADEON_CFLAGS" |
110 |
AC_MSG_CHECKING([if radeon_drm.h is in include path]) |
81 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
111 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
82 |
[[ |
112 |
[[ |
83 |
#include <stdint.h> |
113 |
#include <stdint.h> |
84 |
#include <stdlib.h> |
114 |
#include <stdlib.h> |
85 |
#include "i915_drm.h" |
115 |
#include "i915_drm.h" |
86 |
#include "radeon_drm.h" |
116 |
#include "radeon_drm.h" |
|
|
117 |
]],[[]]),[found_drm_radeon_kernel_headers=yes],[found_drm_radeon_kernel_headers=no]) |
118 |
|
119 |
if test "$found_drm_radeon_kernel_headers" = "yes"; then |
120 |
AC_MSG_RESULT([yes]) |
121 |
else |
122 |
AC_MSG_RESULT([no]) |
123 |
AC_MSG_CHECKING([if we can find them anyway]) |
124 |
|
125 |
MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm" |
126 |
CFLAGS="$CFLAGS $MORE_DRM_RADEON_CFLAGS" |
127 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
128 |
[[ |
129 |
#include <stdint.h> |
130 |
#include <stdlib.h> |
131 |
#include "radeon_drm.h" |
132 |
]],[[]]),[found_drm_radeon_kernel_headers=yes],[found_drm_radeon_kernel_headers=no]) |
133 |
|
134 |
if test "$found_drm_radeon_kernel_headers" = "yes"; then |
135 |
AC_MSG_RESULT([yes]) |
136 |
DRM_RADEON_CFLAGS="$DRM_RADEON_CFLAGS $MORE_DRM_CFLAGS" |
137 |
else |
138 |
AC_MSG_RESULT([no]) |
139 |
AC_MSG_ERROR([Could not find radeon_drm.h]) |
140 |
fi |
141 |
fi |
142 |
|
143 |
AC_SUBST(DRM_RADEON_CFLAGS) |
144 |
AC_SUBST(DRM_RADEON_LIBS) |
145 |
AC_DEFINE(PLY_ENABLE_LIBDRM_RADEON, 1, [Enable support for libdrm_radeon driver]) |
146 |
fi |
147 |
|
148 |
AC_ARG_ENABLE(libdrm_nouveau, AS_HELP_STRING([--enable-libdrm_nouveau],[enable building with libdrm_nouveau support]),enable_libdrm_nouveau=$enableval,enable_libdrm_nouveau=yes) |
149 |
AM_CONDITIONAL(ENABLE_LIBDRM_NOUVEAU, [test "$enable_libdrm_nouveau" = yes]) |
150 |
|
151 |
if test x$enable_libdrm_nouveau = xyes; then |
152 |
PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm libdrm_nouveau]) |
153 |
OLD_CFLAGS="$CFLAGS" |
154 |
CFLAGS="$CFLAGS $DRM_NOUVEAU_CFLAGS" |
155 |
AC_MSG_CHECKING([if nouveau_drm.h is in include path]) |
156 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
157 |
[[ |
158 |
#include <stdint.h> |
159 |
#include <stdlib.h> |
87 |
#include "nouveau_drm.h" |
160 |
#include "nouveau_drm.h" |
88 |
]],[[]]),[found_drm_kernel_headers=yes],[found_drm_kernel_headers=no]) |
161 |
]],[[]]),[found_drm_nouveau_kernel_headers=yes],[found_drm_nouveau_kernel_headers=no]) |
89 |
|
162 |
|
90 |
if test "$found_drm_kernel_headers" = "yes"; then |
163 |
if test "$found_drm_nouveau_kernel_headers" = "yes"; then |
91 |
AC_MSG_RESULT([yes]) |
164 |
AC_MSG_RESULT([yes]) |
92 |
DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS" |
165 |
DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS" |
93 |
else |
166 |
else |
94 |
AC_MSG_RESULT([no]) |
167 |
AC_MSG_RESULT([no]) |
95 |
AC_MSG_ERROR([Could not find i915_drm.h, radeon_drm.h and/or nouveau_drm.h]) |
168 |
AC_MSG_CHECKING([if we can find them anyway]) |
|
|
169 |
|
170 |
MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm" |
171 |
CFLAGS="$CFLAGS $MORE_DRM_CFLAGS" |
172 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM( |
173 |
[[ |
174 |
#include <stdint.h> |
175 |
#include <stdlib.h> |
176 |
#include "nouveau_drm.h" |
177 |
]],[[]]),[found_drm_nouveau_kernel_headers=yes],[found_drm_nouveau_kernel_headers=no]) |
178 |
|
179 |
if test "$found_drm_nouveau_kernel_headers" = "yes"; then |
180 |
AC_MSG_RESULT([yes]) |
181 |
DRM_NOUVEAU_CFLAGS="$DRM_NOUVEAU_CFLAGS $MORE_DRM_CFLAGS" |
182 |
else |
183 |
AC_MSG_RESULT([no]) |
184 |
AC_MSG_ERROR([Could not find nouveau_drm.h]) |
185 |
fi |
96 |
fi |
186 |
fi |
|
|
187 |
|
188 |
AC_SUBST(DRM_NOUVEAU_CFLAGS) |
189 |
AC_SUBST(DRM_NOUVEAU_LIBS) |
190 |
AC_DEFINE(PLY_ENABLE_LIBDRM_NOUVEAU, 1, [Enable support for libdrm_nouveau driver]) |
97 |
fi |
191 |
fi |
98 |
CFLAGS="$OLD_CFLAGS" |
192 |
|
|
|
193 |
DRM_CFLAGS="$DRM_INTEL_CFLAGS $DRM_RADEON_CFLAGS $DRM_NOUVEAU_CFLAGS" |
194 |
DRM_LIBS="$DRM_INTEL_LIBS $DRM_RADEON_LIBS $DRM_NOUVEAU_LIBS" |
99 |
AC_SUBST(DRM_CFLAGS) |
195 |
AC_SUBST(DRM_CFLAGS) |
100 |
AC_SUBST(DRM_LIBS) |
196 |
AC_SUBST(DRM_LIBS) |
101 |
|
197 |
|
|
|
198 |
AM_CONDITIONAL(ENABLE_DRM_RENDERER, |
199 |
[test x$enable_libdrm_intel = xyes \ |
200 |
-o x$enable_libdrm_radeon = xyes \ |
201 |
-o x$enable_libdrm_nouveau = xyes]) |
202 |
|
102 |
AC_ARG_ENABLE(tracing, AS_HELP_STRING([--enable-tracing],[enable verbose tracing code]),enable_tracing=$enableval,enable_tracing=yes) |
203 |
AC_ARG_ENABLE(tracing, AS_HELP_STRING([--enable-tracing],[enable verbose tracing code]),enable_tracing=$enableval,enable_tracing=yes) |
103 |
|
204 |
|
104 |
if test x$enable_tracing = xyes; then |
205 |
if test x$enable_tracing = xyes; then |