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"])
68 LIBVA_PACKAGE_VERSION=libva_package_version
69 AC_SUBST(LIBVA_PACKAGE_VERSION)
71 dnl Check for recent enough DRM
72 LIBDRM_VERSION=libdrm_version
73 PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION])
74 AC_SUBST(LIBDRM_VERSION)
77 PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
78 AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
79 AC_PATH_PROG([GEN4ASM], [intel-gen4asm])
82 PKG_CHECK_MODULES(LIBVA_DEPS, [libva >= libva_version])
84 dnl Check for VA/DRM API
86 if test "$USE_DRM" = "yes"; then
87 PKG_CHECK_MODULES(LIBVA_DRM_DEPS, [libva-drm],
88 [AC_DEFINE([HAVE_VA_DRM], [1], [Defined to 1 if VA/DRM API is enabled])],
91 # Check for <drm_fourcc.h>
92 if test "$USE_DRM" = "yes"; then
93 saved_CPPFLAGS="$CPPFLAGS"
94 CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
95 AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM="no"])
96 CPPFLAGS="$saved_CPPFLAGS"
99 AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes")
101 VA_VERSION=`$PKG_CONFIG --modversion libva`
102 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
103 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
104 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
105 VA_VERSION_STR="$VA_VERSION"
107 va_full_version_int=`expr ${VA_MAJOR_VERSION:-0} "*" 1000000 + \
108 ${VA_MINOR_VERSION:-0} "*" 10000 + \
109 ${VA_MICRO_VERSION:-0} "*" 100 + \
111 VA_DRIVER_INIT_FUNC="__vaDriverInit_${VA_MAJOR_VERSION}_${VA_MINOR_VERSION}"
112 AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC],
113 [Define driver entry-point])
115 dnl Check for VA/DRM API
116 USE_X11="$enable_x11"
117 if test "$USE_X11" = "yes"; then
118 PKG_CHECK_MODULES(LIBVA_X11_DEPS, [libva-x11],
119 [AC_DEFINE([HAVE_VA_X11], [1], [Defined to 1 if VA/X11 API is enabled])],
122 AM_CONDITIONAL(USE_X11, test "$USE_X11" = "yes")
124 dnl Check for VA-API drivers path
125 AC_MSG_CHECKING([for VA drivers path])
126 LIBVA_DRIVERS_PATH=`$PKG_CONFIG libva --variable driverdir`
127 if test -z "$LIBVA_DRIVERS_PATH"; then
128 LIBVA_DRIVERS_PATH="/usr/lib/xorg/modules/drivers"
130 AC_MSG_RESULT([$LIBVA_DRIVERS_PATH])
131 AC_SUBST(LIBVA_DRIVERS_PATH)
134 if test "$enable_wayland" = "yes"; then
139 if test "$enable_egl" = "yes"; then
140 PKG_CHECK_MODULES([EGL], [egl], [USE_EGL="yes"], [USE_EGL="no"])
141 saved_CPPFLAGS="$CPPFLAGS"
143 CPPFLAGS="$CPPFLAGS $EGL_CFLAGS"
144 LIBS="$LIBS $EGL_LIBS"
145 AC_CHECK_HEADERS([EGL/egl.h], [:], [USE_EGL="no"])
146 AC_CHECK_LIB([EGL], [eglGetDisplay], [:], [USE_EGL="no"])
147 CPPFLAGS="$saved_CPPFLAGS"
150 AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
154 WAYLAND_DRM_CFLAGS=""
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])],
161 if test "$USE_EGL" = "yes"; then
162 WAYLAND_DRM_CFLAGS="$DRM_CFLAGS"
163 WAYLAND_DRM_LIBS="$DRM_LIBS $EGL_LIBS"
166 AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes")
167 AC_SUBST([WAYLAND_DRM_CFLAGS])
168 AC_SUBST([WAYLAND_DRM_LIBS])
170 m4_ifdef([WAYLAND_SCANNER_RULES],
171 [WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/wayland'])],
172 [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)])
176 debian.upstream/Makefile
179 src/shaders/h264/Makefile
180 src/shaders/h264/ildb/Makefile
181 src/shaders/h264/mc/Makefile
182 src/shaders/mpeg2/Makefile
183 src/shaders/mpeg2/vld/Makefile
184 src/shaders/post_processing/Makefile
185 src/shaders/post_processing/gen5_6/Makefile
186 src/shaders/post_processing/gen7/Makefile
187 src/shaders/render/Makefile
188 src/shaders/utils/Makefile
189 src/shaders/vme/Makefile
195 AS_IF([test "$USE_DRM" = "yes"], [BACKENDS="$BACKENDS drm"])
196 AS_IF([test "$USE_X11" = "yes"], [BACKENDS="$BACKENDS x11"])
197 AS_IF([test "$USE_WAYLAND" = "yes"], [BACKENDS="$BACKENDS wayland"])
200 echo $PACKAGE configuration summary:
202 echo VA-API version ................... : $VA_VERSION_STR
203 echo VA-API drivers path .............. : $LIBVA_DRIVERS_PATH
204 echo Windowing systems ................ : $BACKENDS