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], [1])
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])
37 AC_INIT([gst_vaapi], [gst_vaapi_version],
38 [gbeauchesne@splitted-desktop.com],
40 AC_CONFIG_SRCDIR([Makefile.am])
43 AM_CONFIG_HEADER([config.h])
45 TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
48 GST_VAAPI_MAJOR_VERSION=gst_vaapi_major_version
49 AC_SUBST(GST_VAAPI_MAJOR_VERSION)
51 LIBVA_SDS_PACKAGE_VERSION=libva_sds_package_version
52 AC_SUBST(LIBVA_SDS_PACKAGE_VERSION)
54 dnl Check for __attribute__((visibility()))
55 AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
56 vaapi_cv_visibility_attribute,
57 [cat > conftest.c <<EOF
58 int foo __attribute__ ((visibility ("hidden"))) = 1;
59 int bar __attribute__ ((visibility ("protected"))) = 1;
61 vaapi_cv_visibility_attribute=no
62 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
63 if grep '\.hidden.*foo' conftest.s >/dev/null; then
64 if grep '\.protected.*bar' conftest.s >/dev/null; then
65 vaapi_cv_visibility_attribute=yes
71 if test $vaapi_cv_visibility_attribute = yes; then
72 vaapi_cv_visibility_attribute_hidden="__attribute__((visibility(\"hidden\")))"
74 vaapi_cv_visibility_attribute_hidden=""
76 AC_DEFINE_UNQUOTED([attribute_hidden],
77 [$vaapi_cv_visibility_attribute_hidden],
78 [Define the "hidden" visibility attribute])
80 dnl Versions for GStreamer and plugins-base
81 GST_MAJORMINOR=gst_major_minor_version
82 GST_VERSION_REQUIRED=gst_version
83 GST_PLUGINS_BASE_VERSION_REQUIRED=gst_plugins_base_version
84 AC_SUBST(GST_MAJORMINOR)
85 AC_SUBST(GST_VERSION_REQUIRED)
86 AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
95 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes"])
98 PKG_CHECK_MODULES([GLIB], [glib-2.0])
102 dnl Check for GStreamer
103 PKG_CHECK_MODULES([GST],
104 [gstreamer-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
109 dnl Check for GStreamer plugins-base
110 PKG_CHECK_MODULES([GST_PLUGINS_BASE],
111 [gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_PLUGINS_BASE_VERSION_REQUIRED]
113 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
114 AC_SUBST(GST_PLUGINS_BASE_LIBS)
116 dnl Check for GStreamer base
117 PKG_CHECK_MODULES([GST_BASE],
118 [gstreamer-base-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
120 AC_SUBST(GST_BASE_CFLAGS)
121 AC_SUBST(GST_BASE_LIBS)
123 dnl Check for GStreamer video
124 PKG_CHECK_MODULES([GST_VIDEO],
125 [gstreamer-video-$GST_MAJORMINOR >= $GST_VERSION_REQUIRED]
127 AC_SUBST(GST_VIDEO_CFLAGS)
128 AC_SUBST(GST_VIDEO_LIBS)
130 dnl Check for the GStreamer plugins directory
131 AC_MSG_CHECKING([for GStreamer plugins directory])
132 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-$GST_MAJORMINOR --variable pluginsdir`
133 if test -z "$GST_PLUGINS_DIR"; then
134 echo "FAIL FAIL FAIL"
135 GST_PLUGINS_DIR="\$(libdir)/gstreamer-$GST_MAJORMINOR"
137 AC_MSG_RESULT([$GST_PLUGINS_DIR])
138 plugindir="$GST_PLUGINS_DIR"
142 PKG_CHECK_MODULES(LIBVA, [libva])
143 PKG_CHECK_MODULES(X11, [x11])
144 PKG_CHECK_MODULES(LIBVA_X11, [libva-x11])
146 dnl Check for SDS extensions to VA-API
147 AC_CACHE_CHECK([for VA-API],
148 ac_cv_libva_sds_extensions, [
149 saved_CFLAGS="$CFLAGS"
150 CFLAGS="$CFLAGS $LIBVA_DEPS_CFLAGS"
152 #include <va/va_version.h>
153 #if VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION == 29
154 # if !defined(VA_SDS_VERSION) || (VA_SDS_VERSION < $LIBVA_SDS_VERSION_0_29)
155 # error "VA-API version >= 0.29.0-sds$LIBVA_SDS_VERSION_0_29 is required"
157 #elif VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION == 30
158 # if !defined(VA_SDS_VERSION) || (VA_SDS_VERSION < $LIBVA_SDS_VERSION_0_30)
159 # error "VA-API version >= 0.30.0-sds$LIBVA_SDS_VERSION_0_30 is required"
161 #elif !VA_CHECK_VERSION(0,31,0)
162 # error "VA-API version >= 0.31 is required"
165 [ac_cv_libva_sds_extensions="yes"],
166 [ac_cv_libva_sds_extensions="no"])
167 CFLAGS="$saved_CFLAGS"
169 VA_VERSION=`$PKG_CONFIG --modversion libva`
170 VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
171 VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
172 VA_DRIVER_INIT_FUNC="__vaDriverInit_${VA_MAJOR_VERSION}_${VA_MINOR_VERSION}_sds"
173 if test "$ac_cv_libva_sds_extensions" = "yes"; then
174 AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC], [Define driver entry-point])
176 AC_MSG_ERROR([Your VA-API SDK does not include SDS extensions])
179 pkgconfigdir=${libdir}/pkgconfig
180 AC_SUBST(pkgconfigdir)
187 debian/gstreamer$GST_MAJORMINOR-vaapi.install:\
188 debian/gstreamer-vaapi.install.in
189 debian/libgstvaapi$GST_VAAPI_MAJOR_VERSION.install:\
190 debian/libgstvaapi.install.in
191 debian/libgstvaapi$GST_VAAPI_MAJOR_VERSION-dev.install:\
192 debian/libgstvaapi-dev.install.in
193 debian/libgstvaapi-x11-$GST_VAAPI_MAJOR_VERSION.install:\
194 debian/libgstvaapi-x11.install.in
196 docs/reference/Makefile
197 docs/reference/libs/Makefile
198 docs/reference/libs/libs-docs.xml
200 gst-libs/gst/Makefile
201 gst-libs/gst/vaapi/Makefile
203 pkgconfig/gstreamer-vaapi.pc
204 pkgconfig/gstreamer-vaapi-x11.pc
206 sys/vaapiconvert/Makefile
207 sys/vaapisink/Makefile