Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5362 | serge | 1 | # Copyright (c) 2007 Intel Corporation. All Rights Reserved. |
2 | # |
||
3 | # Permission is hereby granted, free of charge, to any person obtaining a |
||
4 | # copy of this software and associated documentation files (the |
||
5 | # "Software"), to deal in the Software without restriction, including |
||
6 | # without limitation the rights to use, copy, modify, merge, publish, |
||
7 | # distribute, sub license, and/or sell copies of the Software, and to |
||
8 | # permit persons to whom the Software is furnished to do so, subject to |
||
9 | # the following conditions: |
||
10 | # |
||
11 | # The above copyright notice and this permission notice (including the |
||
12 | # next paragraph) shall be included in all copies or substantial portions |
||
13 | # of the Software. |
||
14 | # |
||
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
||
16 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||
17 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
||
18 | # IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR |
||
19 | # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
||
20 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
||
21 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||
22 | |||
23 | # VA-API version |
||
24 | # - increment major for any ABI change (which shall not occur!) |
||
25 | # - increment minor for any interface change (e.g. new/modified function) |
||
26 | # - increment micro for any other change (new flag, new codec definition, etc.) |
||
27 | # - reset micro version to zero when minor version is incremented |
||
28 | # - reset minor version to zero when major version is incremented |
||
29 | m4_define([va_api_major_version], [0]) |
||
30 | m4_define([va_api_minor_version], [36]) |
||
31 | m4_define([va_api_micro_version], [0]) |
||
32 | |||
33 | m4_define([va_api_version], |
||
34 | [va_api_major_version.va_api_minor_version.va_api_micro_version]) |
||
35 | |||
36 | # libva package version number, (as distinct from shared library version) |
||
37 | # XXX: we want the package version to remain at 1.0.x for VA-API 0.32.y |
||
38 | # |
||
39 | # - major version is automatically generated from VA-API major version |
||
40 | # - minor version is automatically generated from VA-API minor version |
||
41 | # - increment micro for any library release |
||
42 | # - reset micro version to zero when VA-API major or minor version is changed |
||
43 | m4_define([libva_major_version], [m4_eval(va_api_major_version + 1)]) |
||
44 | m4_define([libva_minor_version], [m4_eval(va_api_minor_version - 32)]) |
||
45 | m4_define([libva_micro_version], [1]) |
||
46 | m4_define([libva_pre_version], [0]) |
||
47 | |||
48 | m4_define([libva_version], |
||
49 | [libva_major_version.libva_minor_version.libva_micro_version]) |
||
50 | m4_if(libva_pre_version, [0], [], [ |
||
51 | m4_append([libva_version], libva_pre_version, [.pre]) |
||
52 | ]) |
||
53 | |||
54 | # libva library version number (generated, do not change) |
||
55 | # XXX: we want the SONAME to remain at libva.so.1 for VA-API major == 0 |
||
56 | # |
||
57 | # The library name is generated libva. |
||
58 | # |
||
59 | # |
||
60 | # |
||
61 | # For example: |
||
62 | # VA-API 0.32.0 generates libva.so.1.3200.0 |
||
63 | # VA-API 0.34.1 generates libva.so.1.3401.0 |
||
64 | # VA-API 1.2.13 generates libva.so.2.213.0 |
||
65 | m4_define([libva_interface_bias], [m4_eval(va_api_major_version + 1)]) |
||
66 | m4_define([libva_interface_age], [0]) |
||
67 | m4_define([libva_binary_age], |
||
68 | [m4_eval(100 * va_api_minor_version + va_api_micro_version - libva_interface_age)]) |
||
69 | |||
70 | m4_define([libva_lt_current], |
||
71 | [m4_eval(100 * va_api_minor_version + va_api_micro_version + libva_interface_bias)]) |
||
72 | m4_define([libva_lt_revision], |
||
73 | [m4_eval(libva_interface_age)]) |
||
74 | m4_define([libva_lt_age], |
||
75 | [m4_eval(libva_binary_age - libva_interface_age)]) |
||
76 | |||
77 | # libdrm minimun version requirement |
||
78 | m4_define([libdrm_version], [2.4]) |
||
79 | |||
80 | # Wayland minimum version number |
||
81 | m4_define([wayland_api_version], [1.0.0]) |
||
82 | |||
83 | AC_PREREQ(2.57) |
||
84 | AC_INIT([libva], [libva_version], [waldo.bastian@intel.com], libva) |
||
85 | AC_CONFIG_SRCDIR([Makefile.am]) |
||
86 | AC_CONFIG_MACRO_DIR([m4]) |
||
87 | AM_INIT_AUTOMAKE([dist-bzip2]) |
||
88 | |||
89 | AC_CONFIG_HEADERS([config.h]) |
||
90 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
||
91 | |||
92 | TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`" |
||
93 | AC_SUBST(TODAY) |
||
94 | |||
95 | VA_API_MAJOR_VERSION=va_api_major_version |
||
96 | VA_API_MINOR_VERSION=va_api_minor_version |
||
97 | VA_API_MICRO_VERSION=va_api_micro_version |
||
98 | VA_API_VERSION=va_api_version |
||
99 | AC_SUBST(VA_API_MAJOR_VERSION) |
||
100 | AC_SUBST(VA_API_MINOR_VERSION) |
||
101 | AC_SUBST(VA_API_MICRO_VERSION) |
||
102 | AC_SUBST(VA_API_VERSION) |
||
103 | |||
104 | LIBVA_MAJOR_VERSION=libva_major_version |
||
105 | LIBVA_MINOR_VERSION=libva_minor_version |
||
106 | LIBVA_MICRO_VERSION=libva_micro_version |
||
107 | LIBVA_VERSION=libva_version |
||
108 | AC_SUBST(LIBVA_MAJOR_VERSION) |
||
109 | AC_SUBST(LIBVA_MINOR_VERSION) |
||
110 | AC_SUBST(LIBVA_MICRO_VERSION) |
||
111 | AC_SUBST(LIBVA_VERSION) |
||
112 | |||
113 | LIBVA_LT_CURRENT=libva_lt_current |
||
114 | LIBVA_LT_REV=libva_lt_revision |
||
115 | LIBVA_LT_AGE=libva_lt_age |
||
116 | LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE" |
||
117 | LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION" |
||
118 | AC_SUBST(LIBVA_LT_VERSION) |
||
119 | AC_SUBST(LIBVA_LT_LDFLAGS) |
||
120 | |||
121 | AC_ARG_ENABLE(docs, |
||
122 | [AC_HELP_STRING([--enable-docs], |
||
123 | [build Doxygen documentation @<:@default=no@:>@])], |
||
124 | [], [enable_docs="no"]) |
||
125 | |||
126 | AC_ARG_ENABLE(drm, |
||
127 | [AC_HELP_STRING([--enable-drm], |
||
128 | [build with VA/DRM API support @<:@default=yes@:>@])], |
||
129 | [], [enable_drm="yes"]) |
||
130 | |||
131 | AC_ARG_ENABLE(x11, |
||
132 | [AC_HELP_STRING([--enable-x11], |
||
133 | [build with VA/X11 API support @<:@default=yes@:>@])], |
||
134 | [], [enable_x11="yes"]) |
||
135 | |||
136 | AC_ARG_ENABLE(glx, |
||
137 | [AC_HELP_STRING([--enable-glx], |
||
138 | [build with VA/GLX API support @<:@default=yes@:>@])], |
||
139 | [], [enable_glx="yes"]) |
||
140 | |||
141 | AC_ARG_ENABLE(egl, |
||
142 | [AC_HELP_STRING([--enable-egl], |
||
143 | [build with VA/EGL API support @<:@default=yes@:>@])], |
||
144 | [], [enable_egl="yes"]) |
||
145 | |||
146 | AC_ARG_ENABLE([wayland], |
||
147 | [AC_HELP_STRING([--enable-wayland], |
||
148 | [build with VA/Wayland API support @<:@default=yes@:>@])], |
||
149 | [], [enable_wayland="yes"]) |
||
150 | |||
151 | AC_ARG_ENABLE(dummy-driver, |
||
152 | [AC_HELP_STRING([--enable-dummy-driver], |
||
153 | [build dummy video driver @<:@default=yes@:>@])], |
||
154 | [], [enable_dummy_driver="yes"]) |
||
155 | AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes) |
||
156 | |||
157 | AC_ARG_WITH(drivers-path, |
||
158 | [AC_HELP_STRING([--with-drivers-path=[[path]]], |
||
159 | [drivers path])], |
||
160 | [], [with_drivers_path="$libdir/dri"]) |
||
161 | |||
162 | LIBVA_DRIVERS_PATH="$with_drivers_path" |
||
163 | AC_SUBST(LIBVA_DRIVERS_PATH) |
||
164 | |||
165 | AC_DISABLE_STATIC |
||
166 | AC_PROG_LIBTOOL |
||
167 | AC_PROG_CC |
||
168 | AC_PROG_CXX |
||
169 | AM_PROG_CC_C_O |
||
170 | PKG_PROG_PKG_CONFIG |
||
171 | |||
172 | AC_HEADER_STDC |
||
173 | AC_SYS_LARGEFILE |
||
174 | |||
175 | # Check for Doxygen |
||
176 | if test "$enable_docs" = "yes"; then |
||
177 | AC_CHECK_TOOL([DOXYGEN], [doxygen], [no]) |
||
178 | if test "$DOXYGEN" = "no"; then |
||
179 | enable_docs="no" |
||
180 | fi |
||
181 | fi |
||
182 | AM_CONDITIONAL(ENABLE_DOCS, test "$enable_docs" = "yes") |
||
183 | |||
184 | # Check for __attribute__((visibility())) |
||
185 | AC_CACHE_CHECK([whether __attribute__((visibility())) is supported], |
||
186 | ac_cv_have_gnuc_visibility_attribute, |
||
187 | [cat > conftest.c < |
||
188 | int foo __attribute__ ((visibility ("hidden"))) = 1; |
||
189 | int bar __attribute__ ((visibility ("protected"))) = 1; |
||
190 | EOF |
||
191 | ac_cv_have_gnuc_visibility_attribute="no" |
||
192 | if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then |
||
193 | if grep '\.hidden.*foo' conftest.s >/dev/null; then |
||
194 | if grep '\.protected.*bar' conftest.s >/dev/null; then |
||
195 | ac_cv_have_gnuc_visibility_attribute="yes" |
||
196 | fi |
||
197 | fi |
||
198 | fi |
||
199 | rm -f conftest.[cs] |
||
200 | ]) |
||
201 | if test "$ac_cv_have_gnuc_visibility_attribute" = "yes"; then |
||
202 | AC_DEFINE([HAVE_GNUC_VISIBILITY_ATTRIBUTE], [1], |
||
203 | [Defined to 1 if GCC visibility attribute is supported]) |
||
204 | fi |
||
205 | |||
206 | # Check for DRM (mandatory) |
||
207 | LIBDRM_VERSION=libdrm_version |
||
208 | PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION]) |
||
209 | AC_SUBST(LIBDRM_VERSION) |
||
210 | |||
211 | USE_DRM="no" |
||
212 | if test "$enable_drm" = "yes"; then |
||
213 | USE_DRM="yes" |
||
214 | AC_DEFINE([HAVE_VA_DRM], [1], [Defined to 1 if VA/DRM API is built]) |
||
215 | fi |
||
216 | AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes") |
||
217 | |||
218 | # Check for X11 |
||
219 | USE_X11="no" |
||
220 | if test "$enable_x11" = "yes"; then |
||
221 | USE_X11="yes" |
||
222 | PKG_CHECK_MODULES([X11], [x11], [:], [USE_X11="no"]) |
||
223 | PKG_CHECK_MODULES([XEXT], [xext], [:], [USE_X11="no"]) |
||
224 | PKG_CHECK_MODULES([XFIXES], [xfixes], [:], [USE_X11="no"]) |
||
225 | if test "$USE_X11" = "yes"; then |
||
226 | AC_DEFINE([HAVE_VA_X11], [1], [Defined to 1 if VA/X11 API is built]) |
||
227 | fi |
||
228 | fi |
||
229 | AM_CONDITIONAL(USE_X11, test "$USE_X11" = "yes") |
||
230 | |||
231 | # Check for GLX |
||
232 | USE_GLX="no" |
||
233 | if test "$USE_X11:$enable_glx" = "yes:yes"; then |
||
234 | PKG_CHECK_MODULES([GLX], [gl x11], [USE_GLX="yes"], [:]) |
||
235 | saved_CPPFLAGS="$CPPFLAGS" |
||
236 | saved_LIBS="$LIBS" |
||
237 | CPPFLAGS="$CPPFLAGS $GLX_CFLAGS" |
||
238 | LIBS="$LIBS $GLX_LIBS" |
||
239 | AC_CHECK_HEADERS([GL/gl.h GL/glx.h], [:], [USE_GLX="no"]) |
||
240 | AC_CHECK_LIB([GL], [glXCreateContext], [:] [USE_GLX="no"]) |
||
241 | CPPFLAGS="$saved_CPPFLAGS" |
||
242 | LIBS="$saved_LIBS" |
||
243 | if test "$USE_GLX" = "yes"; then |
||
244 | AC_DEFINE([HAVE_VA_GLX], [1], [Defined to 1 if VA/GLX API is built]) |
||
245 | fi |
||
246 | fi |
||
247 | AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes") |
||
248 | |||
249 | # Check for EGL |
||
250 | USE_EGL="no" |
||
251 | if test "$enable_egl" = "yes"; then |
||
252 | PKG_CHECK_MODULES([EGL], [egl], [USE_EGL="yes"], [:]) |
||
253 | saved_CPPFLAGS="$CPPFLAGS" |
||
254 | saved_LIBS="$LIBS" |
||
255 | CPPFLAGS="$CPPFLAGS $EGL_CFLAGS" |
||
256 | LIBS="$LIBS $EGL_LIBS" |
||
257 | AC_CHECK_HEADERS([EGL/egl.h], [:], [USE_EGL="no"]) |
||
258 | AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL="no"]) |
||
259 | CPPFLAGS="$saved_CPPFLAGS" |
||
260 | LIBS="$saved_LIBS" |
||
261 | if test "$USE_EGL" = "yes"; then |
||
262 | AC_DEFINE([HAVE_VA_EGL], [1], [Defined to 1 if VA/EGL API is built]) |
||
263 | fi |
||
264 | fi |
||
265 | AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes") |
||
266 | |||
267 | # Check for Wayland |
||
268 | WAYLAND_API_VERSION=wayland_api_version |
||
269 | AC_SUBST(WAYLAND_API_VERSION) |
||
270 | |||
271 | USE_WAYLAND="no" |
||
272 | if test "$enable_wayland" = "yes"; then |
||
273 | PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version], |
||
274 | [USE_WAYLAND="yes"], [:]) |
||
275 | if test "$USE_WAYLAND" = "yes"; then |
||
276 | AC_DEFINE([HAVE_VA_WAYLAND], [1], |
||
277 | [Defined to 1 if VA/Wayland API is built]) |
||
278 | fi |
||
279 | fi |
||
280 | AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes") |
||
281 | |||
282 | m4_ifdef([WAYLAND_SCANNER_RULES], |
||
283 | [WAYLAND_SCANNER_RULES(['$(top_srcdir)/va/wayland/protocol'])], |
||
284 | [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)]) |
||
285 | |||
286 | pkgconfigdir=${libdir}/pkgconfig |
||
287 | AC_SUBST(pkgconfigdir) |
||
288 | |||
289 | # Check for builds without backend |
||
290 | if test "$USE_DRM:$USE_X11:$USE_WAYLAND" = "no:no:no"; then |
||
291 | AC_MSG_ERROR([Please select at least one backend (DRM, X11, Wayland)]) |
||
292 | fi |
||
293 | |||
294 | # Define __vaDriverInit*() function name for dummy backend |
||
295 | VA_DRIVER_INIT_FUNC="__vaDriverInit_${VA_API_MAJOR_VERSION}_${VA_API_MINOR_VERSION}" |
||
296 | AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC], |
||
297 | [Defined to the versioned __vaDriverInit function name]) |
||
298 | |||
299 | AC_OUTPUT([ |
||
300 | Makefile |
||
301 | debian.upstream/Makefile |
||
302 | debian.upstream/changelog |
||
303 | debian.upstream/control |
||
304 | debian.upstream/libva$LIBVA_MAJOR_VERSION.install:\ |
||
305 | debian.upstream/libva.install.in |
||
306 | debian.upstream/libva-drm$LIBVA_MAJOR_VERSION.install:\ |
||
307 | debian.upstream/libva-drm.install.in |
||
308 | debian.upstream/libva-egl$LIBVA_MAJOR_VERSION.install:\ |
||
309 | debian.upstream/libva-egl.install.in |
||
310 | debian.upstream/libva-glx$LIBVA_MAJOR_VERSION.install:\ |
||
311 | debian.upstream/libva-glx.install.in |
||
312 | debian.upstream/libva-wayland$LIBVA_MAJOR_VERSION.install:\ |
||
313 | debian.upstream/libva-wayland.install.in |
||
314 | debian.upstream/libva-x11-$LIBVA_MAJOR_VERSION.install:\ |
||
315 | debian.upstream/libva-x11.install.in |
||
316 | doc/Makefile |
||
317 | dummy_drv_video/Makefile |
||
318 | pkgconfig/Makefile |
||
319 | pkgconfig/libva-drm.pc |
||
320 | pkgconfig/libva-egl.pc |
||
321 | pkgconfig/libva-glx.pc |
||
322 | pkgconfig/libva-tpi.pc |
||
323 | pkgconfig/libva-wayland.pc |
||
324 | pkgconfig/libva-x11.pc |
||
325 | pkgconfig/libva.pc |
||
326 | test/Makefile |
||
327 | test/basic/Makefile |
||
328 | test/common/Makefile |
||
329 | test/decode/Makefile |
||
330 | test/encode/Makefile |
||
331 | test/putsurface/Makefile |
||
332 | test/vainfo/Makefile |
||
333 | va/Makefile |
||
334 | va/drm/Makefile |
||
335 | va/egl/Makefile |
||
336 | va/glx/Makefile |
||
337 | va/va_version.h |
||
338 | va/wayland/Makefile |
||
339 | va/wayland/protocol/Makefile |
||
340 | va/x11/Makefile |
||
341 | ]) |
||
342 | |||
343 | # Print a small summary |
||
344 | BACKENDS="" |
||
345 | AS_IF([test x$USE_DRM = xyes], [BACKENDS="$BACKENDS drm"]) |
||
346 | AS_IF([test x$USE_X11 = xyes], [BACKENDS="$BACKENDS x11"]) |
||
347 | AS_IF([test x$USE_GLX = xyes], [BACKENDS="$BACKENDS glx"]) |
||
348 | AS_IF([test x$USE_EGL = xyes], [BACKENDS="$BACKENDS egl"]) |
||
349 | AS_IF([test x$USE_WAYLAND = xyes], [BACKENDS="$BACKENDS wayland"]) |
||
350 | |||
351 | echo |
||
352 | echo "libva - ${LIBVA_VERSION} (VA-API ${VA_API_VERSION})" |
||
353 | echo |
||
354 | echo Installation prefix .............. : $prefix |
||
355 | echo Default driver path .............. : $LIBVA_DRIVERS_PATH |
||
356 | echo Extra window systems ............. : $BACKENDS |
||
357 | echo Build dummy driver ............... : $enable_dummy_driver |
||
358 | echo Build documentation .............. : $enable_docs |
||
359 | echo |