1 # gstreamer-vaapi package version number
2 m4_define([gst_vaapi_major_version], [0])
3 m4_define([gst_vaapi_minor_version], [1])
4 m4_define([gst_vaapi_micro_version], [2])
5 m4_define([gst_vaapi_version],
6 [gst_vaapi_major_version.gst_vaapi_minor_version.gst_vaapi_micro_version])
9 m4_define([gst_major_version], [0])
10 m4_define([gst_minor_version], [10])
11 m4_define([gst_micro_version], [0])
12 m4_define([gst_major_minor_version],
13 [gst_major_version.gst_minor_version])
14 m4_define([gst_version],
15 [gst_major_version.gst_minor_version.gst_micro_version])
17 # gst plugins-base version number
18 m4_define([gst_plugins_base_major_version], [0])
19 m4_define([gst_plugins_base_minor_version], [10])
20 m4_define([gst_plugins_base_micro_version], [16])
21 m4_define([gst_plugins_base_version],
22 [gst_plugins_base_major_version.gst_plugins_base_minor_version.gst_plugins_base_micro_version])
24 # libva package version number
25 m4_define([libva_sds_version_0_29], [8])
26 m4_define([libva_sds_package_version_0_29], [0.29-2+sds11])
27 m4_define([libva_sds_version_0_30], [1])
28 m4_define([libva_sds_package_version_0_30], [0.30-1+sds1])
29 m4_define([libva_glx_sds_version_0_30], [5])
30 m4_define([libva_glx_sds_package_version_0_30], [0.30.4-1+sds6])
31 m4_define([libva_glx_sds_version_0_31], [1])
32 m4_define([libva_glx_sds_package_version_0_31], [0.31.0-1+sds1])
33 m4_define([libva_sds_version], [libva_glx_sds_version_0_31])
34 m4_define([libva_sds_package_version], [libva_glx_sds_package_version_0_31])
36 # gtk-doc version number
37 # XXX: introspection annotations require gtk-doc >= 1.12
38 m4_define([gtkdoc_major_version], [1])
39 m4_define([gtkdoc_minor_version], [9])
40 m4_define([gtkdoc_version], [gtkdoc_major_version.gtkdoc_minor_version])
43 AC_INIT([gst_vaapi], [gst_vaapi_version],
44 [gbeauchesne@splitted-desktop.com],
46 AC_CONFIG_SRCDIR([Makefile.am])
49 AM_CONFIG_HEADER([config.h])
51 TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
54 GST_VAAPI_MAJOR_VERSION=gst_vaapi_major_version
55 AC_SUBST(GST_VAAPI_MAJOR_VERSION)
57 LIBVA_SDS_PACKAGE_VERSION=libva_sds_package_version
58 AC_SUBST(LIBVA_SDS_PACKAGE_VERSION)
60 dnl Versions for GStreamer and plugins-base
61 GST_MAJORMINOR=gst_major_minor_version
62 GST_VERSION_REQUIRED=gst_version
63 GST_PLUGINS_BASE_VERSION_REQUIRED=gst_plugins_base_version
64 AC_SUBST(GST_MAJORMINOR)
65 AC_SUBST(GST_VERSION_REQUIRED)
66 AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
74 AC_HELP_STRING([--enable-glx],
75 [enable OpenGL/X11 @<:@default=yes@:>@]),
76 [], [enable_glx="yes"])
78 dnl Check for __attribute__((visibility()))
79 AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
80 vaapi_cv_visibility_attribute,
81 [cat > conftest.c <<EOF
82 int foo __attribute__ ((visibility ("hidden"))) = 1;
83 int bar __attribute__ ((visibility ("protected"))) = 1;
85 vaapi_cv_visibility_attribute=no
86 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
87 if grep '\.hidden.*foo' conftest.s >/dev/null; then
88 if grep '\.protected.*bar' conftest.s >/dev/null; then
89 vaapi_cv_visibility_attribute=yes
95 if test $vaapi_cv_visibility_attribute = yes; then
96 vaapi_cv_visibility_attribute_hidden="__attribute__((visibility(\"hidden\")))"
98 vaapi_cv_visibility_attribute_hidden=""
100 AC_DEFINE_UNQUOTED([attribute_hidden],
101 [$vaapi_cv_visibility_attribute_hidden],
102 [Define the "hidden" visibility attribute])
104 dnl Check for Gtk doc
105 GTKDOC_VERSION=gtkdoc_version
106 GTK_DOC_CHECK([$GTKDOC_VERSION])
107 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes"])
108 AC_SUBST(GTKDOC_VERSION)
111 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
112 PKG_CHECK_MODULES([GLIB], [glib-2.0])
113 AC_SUBST(GLIB_CFLAGS)
116 dnl Check for GStreamer
117 PKG_CHECK_MODULES([GST],
118 [gstreamer-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
123 dnl Check for GStreamer plugins-base
124 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
125 [gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_VERSION_REQUIRED]
127 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
128 AC_SUBST(GST_PLUGINS_BASE_LIBS)
130 dnl Check for GStreamer base
131 PKG_CHECK_MODULES([GST_BASE],
132 [gstreamer-base-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
134 AC_SUBST(GST_BASE_CFLAGS)
135 AC_SUBST(GST_BASE_LIBS)
137 dnl Check for GStreamer video
138 PKG_CHECK_MODULES([GST_VIDEO],
139 [gstreamer-video-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
141 AC_SUBST(GST_VIDEO_CFLAGS)
142 AC_SUBST(GST_VIDEO_LIBS)
144 dnl Check for the GStreamer plugins directory
145 AC_MSG_CHECKING([for GStreamer plugins directory])
146 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
147 if test -z "$GST_PLUGINS_DIR"; then
148 echo "FAIL FAIL FAIL"
149 GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_MAJORMINOR"
151 AC_MSG_RESULT([$GST_PLUGINS_DIR])
152 plugindir="$GST_PLUGINS_DIR"
156 PKG_CHECK_MODULES(X11, [x11])
160 if test "$enable_glx" != "yes"; then
165 AC_CHECK_HEADERS([GL/gl.h GL/glext.h GL/glx.h], [], [USE_GLX=0], [
170 AC_CHECK_LIB(GL, glXCreateContext, [GLX_LIBS="-lGL"], [USE_GLX=0])
175 LIBVA_PKGNAME="libva"
176 PKG_CHECK_MODULES(LIBVA, [$LIBVA_PKGNAME])
177 AC_SUBST(LIBVA_PKGNAME)
179 dnl ... original VA-API 0.29
180 AC_CACHE_CHECK([for old VA-API 0.29],
181 ac_cv_have_vaapi_old, [
182 saved_CFLAGS="$CFLAGS"
183 CFLAGS="$CFLAGS $LIBVA_CFLAGS"
185 LIBS="$LIBS $LIBVA_LIBS"
187 [#include <va_x11.h>],
188 [vaGetDisplay(NULL)],
189 [ac_cv_have_vaapi_old="yes"],
190 [ac_cv_have_vaapi_old="no"])
191 CFLAGS="$saved_CFLAGS"
194 if test "$ac_cv_have_vaapi_old" = "yes"; then
195 LIBVA_EXTRA_CFLAGS="$LIBVA_CFLAGS -DGST_VAAPI_USE_OLD_VAAPI_0_29"
198 dnl ... VA-API >= 0.31 or -sds
199 LIBVA_X11_PKGNAME="libva-x11"
200 PKG_CHECK_MODULES(LIBVA_X11, [$LIBVA_X11_PKGNAME],
201 [ac_cv_have_vaapi_x11="yes"],
202 [ac_cv_have_vaapi_x11="no"]
204 if test "$ac_cv_have_vaapi_x11" = "no"; then
205 if test "$ac_cv_have_vaapi_old" = "yes"; then
206 LIBVA_X11_PKGNAME="libva"
207 CFLAGS="$CFLAGS $LIBVA_EXTRA_CFLAGS"
208 LIBS="$LIBS $LIBVA_EXTRA_LIBS"
210 AC_MSG_ERROR([could not find VA-API])
213 AC_SUBST(LIBVA_X11_PKGNAME)
215 dnl ... VA-API >= 0.31 or -sds
216 LIBVA_GLX_PKGNAME="libva-glx"
217 PKG_CHECK_MODULES(LIBVA_GLX, [$LIBVA_GLX_PKGNAME],
218 [ac_cv_have_vaapi_glx="yes"],
219 [ac_cv_have_vaapi_glx="no"]
221 if test "$ac_cv_have_vaapi_glx" = "no"; then
222 AC_MSG_WARN([could not find VA/GLX extensions. Disabling GLX support])
225 AC_SUBST(LIBVA_GLX_PKGNAME)
227 AC_SUBST(LIBVA_EXTRA_CFLAGS)
228 AC_SUBST(LIBVA_EXTRA_LIBS)
230 AC_DEFINE_UNQUOTED(USE_GLX, $USE_GLX, [Defined to 1 if GLX is enabled])
231 AM_CONDITIONAL(USE_GLX, test $USE_GLX -eq 1)
233 VA_VERSION=`$PKG_CONFIG --modversion libva`
234 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
235 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
236 VA_MICRO_VERSION=`echo "$VA_VERSION" | cut -d'.' -f3`
237 VA_SDS_VERSION=`$PKG_CONFIG libva --variable sdsversion`
239 VA_VERSION_STR="$VA_VERSION"
240 if test -n "$VA_SDS_VERSION"; then
241 VA_VERSION_STR="$VA_VERSION_STR-sds$VA_SDS_VERSION"
244 pkgconfigdir=${libdir}/pkgconfig
245 AC_SUBST(pkgconfigdir)
249 debian.upstream/Makefile
250 debian.upstream/changelog
251 debian.upstream/control
252 debian.upstream/gstreamer$GST_MAJORMINOR-vaapi.install:\
253 debian.upstream/gstreamer-vaapi.install.in
254 debian.upstream/gstreamer$GST_MAJORMINOR-vaapi-doc.install:\
255 debian.upstream/gstreamer-vaapi-doc.install.in
256 debian.upstream/libgstvaapi$GST_VAAPI_MAJOR_VERSION.install:\
257 debian.upstream/libgstvaapi.install.in
258 debian.upstream/libgstvaapi$GST_VAAPI_MAJOR_VERSION-dev.install:\
259 debian.upstream/libgstvaapi-dev.install.in
260 debian.upstream/libgstvaapi-x11-$GST_VAAPI_MAJOR_VERSION.install:\
261 debian.upstream/libgstvaapi-x11.install.in
263 docs/reference/Makefile
264 docs/reference/libs/Makefile
265 docs/reference/libs/libs-docs.xml
266 docs/reference/plugins/Makefile
267 docs/reference/plugins/plugins-docs.xml
269 gst-libs/gst/Makefile
270 gst-libs/gst/vaapi/Makefile
272 pkgconfig/gstreamer-vaapi-$GST_MAJORMINOR.pc:\
273 pkgconfig/gstreamer-vaapi.pc.in
274 pkgconfig/gstreamer-vaapi-glx-$GST_MAJORMINOR.pc:\
275 pkgconfig/gstreamer-vaapi-glx.pc.in
276 pkgconfig/gstreamer-vaapi-x11-$GST_MAJORMINOR.pc:\
277 pkgconfig/gstreamer-vaapi-x11.pc.in
279 sys/vaapiconvert/Makefile
280 sys/vaapisink/Makefile
286 echo $PACKAGE configuration summary:
288 echo VA-API version ................... : $VA_VERSION_STR
289 echo GLX support ...................... : $(test $USE_GLX -eq 1 && echo yes || echo no)