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.
23 # libva package version number, (as distinct from shared library version)
24 m4_define([libva_major_version], [0])
25 m4_define([libva_minor_version], [31])
26 m4_define([libva_micro_version], [0])
28 m4_define([libva_version],
29 [libva_major_version.libva_minor_version.libva_micro_version])
31 # increase this number for each API change
32 m4_define([libva_sds_version], [2])
34 # if the library source code has changed, increment revision
35 m4_define([libva_lt_revision], [0])
36 # if any interface was added/removed/changed, then inc current, reset revision
37 m4_define([libva_lt_current], [1])
38 # if any interface was added since last public release, then increment age
39 # if any interface was removed since last public release, then set age to 0
40 m4_define([libva_lt_age], [0])
43 AC_INIT([libva], [libva_version], [waldo.bastian@intel.com], libva)
44 AC_CONFIG_SRCDIR([Makefile.am])
45 AM_INIT_AUTOMAKE([dist-bzip2])
47 AM_CONFIG_HEADER([config.h])
49 LIBVA_MAJOR_VERSION=libva_major_version
50 LIBVA_MINOR_VERSION=libva_minor_version
51 LIBVA_MICRO_VERSION=libva_micro_version
52 LIBVA_VERSION=libva_version
53 AC_SUBST(LIBVA_MAJOR_VERSION)
54 AC_SUBST(LIBVA_MINOR_VERSION)
55 AC_SUBST(LIBVA_MICRO_VERSION)
56 AC_SUBST(LIBVA_VERSION)
58 LIBVA_SDS_VERSION=libva_sds_version
59 AC_SUBST(LIBVA_SDS_VERSION)
61 LIBVA_LT_CURRENT=libva_lt_current
62 LIBVA_LT_REV=libva_lt_revision
63 LIBVA_LT_AGE=libva_lt_age
64 LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE"
65 LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
66 AC_SUBST(LIBVA_LT_VERSION)
67 AC_SUBST(LIBVA_LT_LDFLAGS)
69 AC_ARG_ENABLE(dummy-driver,
70 [AC_HELP_STRING([--enable-dummy-driver],
71 [build dummy video driver])],
72 [], [enable_dummy_driver=yes])
73 AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes)
75 AC_ARG_ENABLE(i965-driver,
76 [AC_HELP_STRING([--enable-i965-driver],
77 [build i965 video driver])],
78 [], [enable_i965_driver=no])
80 AC_ARG_WITH(drivers-path,
81 [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
82 [with_drivers_path="$libdir/dri"])
84 LIBVA_DRIVERS_PATH="$with_drivers_path"
85 AC_SUBST(LIBVA_DRIVERS_PATH)
94 PKG_CHECK_MODULES([X11], [x11])
95 PKG_CHECK_MODULES([XEXT],[xext])
96 PKG_CHECK_MODULES([XFIXES], [xfixes])
97 PKG_CHECK_MODULES([DRM], [libdrm])
99 PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.0], [gen4asm=yes], [gen4asm=no])
100 AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
102 # Check for libdrm >= 2.4 (needed for i965_drv_video.so)
103 if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then
104 AC_MSG_WARN([libdrm < 2.4 found, disabling build of i965 video driver])
105 enable_i965_driver=no
107 AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
109 # We only need the headers, we don't link against the DRM libraries
110 LIBVA_CFLAGS="$DRM_CFLAGS"
111 AC_SUBST(LIBVA_CFLAGS)
114 pkgconfigdir=${libdir}/pkgconfig
115 AC_SUBST(pkgconfigdir)
117 libvabackendlib=libva.la
118 AC_SUBST([libvabackendlib])
125 dummy_drv_video/Makefile
126 i965_drv_video/Makefile
127 i965_drv_video/shaders/Makefile
128 i965_drv_video/shaders/mpeg2/Makefile
129 i965_drv_video/shaders/mpeg2/vld/Makefile
130 i965_drv_video/shaders/render/Makefile