1 # Copyright (c) 2007 Intel Corporation. All Rights Reserved.
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:
11 # The above copyright notice and this permission notice (including the
12 # next paragraph) shall be included in all copies or substantial portions
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.
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], [32])
31 m4_define([va_api_micro_version], [0])
33 m4_define([va_api_version],
34 [va_api_major_version.va_api_minor_version.va_api_micro_version])
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
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], [14])
47 m4_define([libva_version],
48 [libva_major_version.libva_minor_version.libva_micro_version])
50 # libva library version number (generated, do not change)
51 # XXX: we want the SONAME to remain at libva.so.1 for VA-API major == 0
53 # The library name is generated libva.<x>.<y>.0 where
54 # <x> = VA-API major version + 1
55 # <y> = 100 * VA-API minor version + VA-API micro version
58 # VA-API 0.32.0 generates libva.so.1.3200.0
59 # VA-API 0.34.1 generates libva.so.1.3401.0
60 # VA-API 1.2.13 generates libva.so.2.213.0
61 m4_define([libva_interface_bias], [m4_eval(va_api_major_version + 1)])
62 m4_define([libva_interface_age], [0])
63 m4_define([libva_binary_age],
64 [m4_eval(100 * va_api_minor_version + va_api_micro_version - libva_interface_age)])
66 m4_define([libva_lt_current],
67 [m4_eval(100 * va_api_minor_version + va_api_micro_version + libva_interface_bias)])
68 m4_define([libva_lt_revision],
69 [m4_eval(libva_interface_age)])
70 m4_define([libva_lt_age],
71 [m4_eval(libva_binary_age - libva_interface_age)])
74 AC_INIT([libva], [libva_version], [waldo.bastian@intel.com], libva)
75 AC_CONFIG_SRCDIR([Makefile.am])
76 AM_INIT_AUTOMAKE([dist-bzip2])
78 AM_CONFIG_HEADER([config.h])
79 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
81 VA_API_MAJOR_VERSION=va_api_major_version
82 VA_API_MINOR_VERSION=va_api_minor_version
83 VA_API_MICRO_VERSION=va_api_micro_version
84 VA_API_VERSION=va_api_version
85 AC_SUBST(VA_API_MAJOR_VERSION)
86 AC_SUBST(VA_API_MINOR_VERSION)
87 AC_SUBST(VA_API_MICRO_VERSION)
88 AC_SUBST(VA_API_VERSION)
90 LIBVA_MAJOR_VERSION=libva_major_version
91 LIBVA_MINOR_VERSION=libva_minor_version
92 LIBVA_MICRO_VERSION=libva_micro_version
93 LIBVA_VERSION=libva_version
94 AC_SUBST(LIBVA_MAJOR_VERSION)
95 AC_SUBST(LIBVA_MINOR_VERSION)
96 AC_SUBST(LIBVA_MICRO_VERSION)
97 AC_SUBST(LIBVA_VERSION)
99 LIBVA_LT_CURRENT=libva_lt_current
100 LIBVA_LT_REV=libva_lt_revision
101 LIBVA_LT_AGE=libva_lt_age
102 LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE"
103 LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
104 AC_SUBST(LIBVA_LT_VERSION)
105 AC_SUBST(LIBVA_LT_LDFLAGS)
108 [AC_HELP_STRING([--enable-glx],
109 [build with OpenGL for X11 support])],
110 [], [enable_glx=yes])
112 AC_ARG_ENABLE(dummy-driver,
113 [AC_HELP_STRING([--enable-dummy-driver],
114 [build dummy video driver])],
115 [], [enable_dummy_driver=yes])
116 AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes)
118 AC_ARG_ENABLE(dummy-backend,
119 [AC_HELP_STRING([--enable-dummy-backend],
120 [build dummy libva backend])],
121 [], [enable_dummy_backend=no])
123 AC_ARG_WITH(drivers-path,
124 [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
125 [with_drivers_path="$libdir/dri"])
127 LIBVA_DRIVERS_PATH="$with_drivers_path"
128 AC_SUBST(LIBVA_DRIVERS_PATH)
138 PKG_CHECK_MODULES([X11], [x11])
139 PKG_CHECK_MODULES([XEXT],[xext])
140 PKG_CHECK_MODULES([XFIXES], [xfixes])
141 PKG_CHECK_MODULES([DRM], [libdrm])
143 if test x$enable_dummy_backend = xyes; then
144 PKG_CHECK_MODULES([UDEV], [libudev], [libudev=yes], [libudev=no])
146 if test x$libudev = xno; then
147 enable_dummy_backend=no
149 AM_CONDITIONAL(BUILD_DUMMY_BACKEND, test x$enable_dummy_backend = xyes)
151 # Check for OpenGL (X11)
155 if test x$enable_glx = xyes; then
156 AC_CHECK_HEADERS([GL/gl.h])
157 AC_CHECK_HEADERS([GL/glx.h])
158 AC_CHECK_LIB(GL, glXCreateContext, [
160 GL_DEPS_LIBS="-lX11 -lGL"
163 AC_SUBST(GL_DEPS_CFLAGS)
164 AC_SUBST(GL_DEPS_LIBS)
165 AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
169 AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
171 # We only need the headers, we don't link against the DRM libraries
172 LIBVA_CFLAGS="$DRM_CFLAGS"
173 AC_SUBST(LIBVA_CFLAGS)
176 pkgconfigdir=${libdir}/pkgconfig
177 AC_SUBST(pkgconfigdir)
180 libvacorelib=libva.la
181 libvabackendlib=libva-$LIBVA_DISPLAY.la
182 AC_SUBST([libvacorelib])
183 AC_SUBST([libvabackendlib])
193 dummy_drv_video/Makefile
197 test/putsurface/Makefile
200 pkgconfig/libva-egl.pc
201 pkgconfig/libva-glx.pc
202 pkgconfig/libva-tpi.pc
203 pkgconfig/libva-x11.pc
208 # Print a small summary
211 echo "libva - ${LIBVA_VERSION} (VA-API ${VA_API_VERSION})"
215 echo " Prefix: ${prefix}"
218 AS_IF([test x$enable_dummy_driver = xyes], [DRIVERS="dummy $DRIVERS"])
220 echo "
\95 Drivers: ${DRIVERS}"
222 AS_IF([test x$USE_GLX = xyes], [BACKENDS="glx $BACKENDS"])
223 AS_IF([test x$USE_EGL = xyes], [BACKENDS="egl $BACKENDS"])
225 BACKENDS="x11 $BACKENDS"
226 AS_IF([test x$enable_dummy_backend = xyes], [BACKENDS="dummy
229 echo "
\95 Winsys : ${BACKENDS}"