1 # intel-driver package version number
2 m4_define([intel_driver_major_version], [1])
3 m4_define([intel_driver_minor_version], [0])
4 m4_define([intel_driver_micro_version], [16])
5 m4_define([intel_driver_pre_version], [1])
6 m4_define([intel_driver_version],
7 [intel_driver_major_version.intel_driver_minor_version.intel_driver_micro_version])
8 m4_if(intel_driver_pre_version, [0], [], [
9 m4_append([intel_driver_version], intel_driver_pre_version, [.pre])
12 # libva minimum version requirement
13 m4_define([libva_version], [0.34])
14 m4_define([libva_package_version], [1.2.0])
16 # libdrm minimum version requirement
17 m4_define([libdrm_version], [2.4.23])
20 AC_INIT([intel_driver], [intel_driver_version], [haihao.xiang@intel.com],
22 AC_CONFIG_SRCDIR([Makefile.am])
23 AM_INIT_AUTOMAKE([1.9 tar-ustar])
25 AM_CONFIG_HEADER([src/config.h])
27 INTEL_DRIVER_MAJOR_VERSION=intel_driver_major_version
28 INTEL_DRIVER_MINOR_VERSION=intel_driver_minor_version
29 INTEL_DRIVER_MICRO_VERSION=intel_driver_micro_version
30 AC_DEFINE([INTEL_DRIVER_MAJOR_VERSION], [intel_driver_major_version], [Major version of the driver])
31 AC_DEFINE([INTEL_DRIVER_MINOR_VERSION], [intel_driver_minor_version], [Minor version of the driver])
32 AC_DEFINE([INTEL_DRIVER_MICRO_VERSION], [intel_driver_micro_version], [Micro version of the driver])
33 AC_DEFINE([INTEL_DRIVER_PRE_VERSION], [intel_driver_pre_version], [Preversion of the driver])
35 INTEL_DRIVER_LT_LDFLAGS="-avoid-version"
36 AC_SUBST(INTEL_DRIVER_LT_LDFLAGS)
38 dnl Use pretty build output with automake >= 1.11
39 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
40 AM_DEFAULT_VERBOSITY=1
41 AC_SUBST(AM_DEFAULT_VERBOSITY)
45 [AC_HELP_STRING([--enable-drm],
46 [build with VA/DRM API support @<:@default=yes@:>@])],
47 [], [enable_drm="yes"])
50 [AC_HELP_STRING([--enable-x11],
51 [build with VA/X11 API support @<:@default=yes@:>@])],
52 [], [enable_x11="yes"])
54 AC_ARG_ENABLE([wayland],
55 [AC_HELP_STRING([--enable-wayland],
56 [build with VA/Wayland API support @<:@default=yes@:>@])],
57 [], [enable_wayland="yes"])
67 AC_CHECK_LIB([m], [sin])
68 AC_CHECK_FUNCS([log2f])
70 LIBVA_PACKAGE_VERSION=libva_package_version
71 AC_SUBST(LIBVA_PACKAGE_VERSION)
73 dnl Check for recent enough DRM
74 LIBDRM_VERSION=libdrm_version
75 PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION])
76 AC_SUBST(LIBDRM_VERSION)
79 PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
80 AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
81 AC_PATH_PROG([GEN4ASM], [intel-gen4asm])
84 PKG_CHECK_MODULES(LIBVA_DEPS, [libva >= libva_version])
86 dnl Check for VA/DRM API
88 if test "$USE_DRM" = "yes"; then
89 PKG_CHECK_MODULES(LIBVA_DRM_DEPS, [libva-drm],
90 [AC_DEFINE([HAVE_VA_DRM], [1], [Defined to 1 if VA/DRM API is enabled])],
93 # Check for <drm_fourcc.h>
94 if test "$USE_DRM" = "yes"; then
95 saved_CPPFLAGS="$CPPFLAGS"
96 CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
97 AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM="no"])
98 CPPFLAGS="$saved_CPPFLAGS"
101 AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes")
103 VA_VERSION=`$PKG_CONFIG --modversion libva`
104 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
105 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
106 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
107 VA_VERSION_STR="$VA_VERSION"
109 va_full_version_int=`expr ${VA_MAJOR_VERSION:-0} "*" 1000000 + \
110 ${VA_MINOR_VERSION:-0} "*" 10000 + \
111 ${VA_MICRO_VERSION:-0} "*" 100 + \
113 VA_DRIVER_INIT_FUNC="__vaDriverInit_${VA_MAJOR_VERSION}_${VA_MINOR_VERSION}"
114 AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC],
115 [Define driver entry-point])
117 dnl Check for VA/DRM API
118 USE_X11="$enable_x11"
119 if test "$USE_X11" = "yes"; then
120 PKG_CHECK_MODULES(LIBVA_X11_DEPS, [libva-x11],
121 [AC_DEFINE([HAVE_VA_X11], [1], [Defined to 1 if VA/X11 API is enabled])],
124 AM_CONDITIONAL(USE_X11, test "$USE_X11" = "yes")
126 dnl Check for VA-API drivers path
127 AC_MSG_CHECKING([for VA drivers path])
128 LIBVA_DRIVERS_PATH=`$PKG_CONFIG libva --variable driverdir`
129 if test -z "$LIBVA_DRIVERS_PATH"; then
130 LIBVA_DRIVERS_PATH="/usr/lib/xorg/modules/drivers"
132 AC_MSG_RESULT([$LIBVA_DRIVERS_PATH])
133 AC_SUBST(LIBVA_DRIVERS_PATH)
136 if test "$enable_wayland" = "yes"; then
141 if test "$enable_egl" = "yes"; then
142 PKG_CHECK_MODULES([EGL], [egl], [USE_EGL="yes"], [USE_EGL="no"])
143 saved_CPPFLAGS="$CPPFLAGS"
145 CPPFLAGS="$CPPFLAGS $EGL_CFLAGS"
146 LIBS="$LIBS $EGL_LIBS"
147 AC_CHECK_HEADERS([EGL/egl.h], [:], [USE_EGL="no"])
148 AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL="no"])
149 CPPFLAGS="$saved_CPPFLAGS"
152 AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
156 if test "$enable_wayland" = "yes"; then
157 PKG_CHECK_MODULES([WAYLAND], [wayland-client], [USE_WAYLAND="yes"], [:])
158 PKG_CHECK_MODULES([LIBVA_WAYLAND_DEPS], [libva-wayland],
159 [AC_DEFINE([HAVE_VA_WAYLAND], [1], [Defined to 1 if VA/Wayland API is enabled])],
162 AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes")
164 m4_ifdef([WAYLAND_SCANNER_RULES],
165 [WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/wayland'])],
166 [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)])
170 debian.upstream/Makefile
173 src/shaders/h264/Makefile
174 src/shaders/h264/ildb/Makefile
175 src/shaders/h264/mc/Makefile
176 src/shaders/mpeg2/Makefile
177 src/shaders/mpeg2/vld/Makefile
178 src/shaders/post_processing/Makefile
179 src/shaders/post_processing/gen5_6/Makefile
180 src/shaders/post_processing/gen7/Makefile
181 src/shaders/render/Makefile
182 src/shaders/utils/Makefile
183 src/shaders/vme/Makefile
189 AS_IF([test "$USE_DRM" = "yes"], [BACKENDS="$BACKENDS drm"])
190 AS_IF([test "$USE_X11" = "yes"], [BACKENDS="$BACKENDS x11"])
191 AS_IF([test "$USE_WAYLAND" = "yes"], [BACKENDS="$BACKENDS wayland"])
194 echo $PACKAGE configuration summary:
196 echo VA-API version ................... : $VA_VERSION_STR
197 echo VA-API drivers path .............. : $LIBVA_DRIVERS_PATH
198 echo Windowing systems ................ : $BACKENDS