hardware/intel/libva
Révision | 3cc18d820a60748c1c19fa5f4a388d9c05013392 (tree) |
---|---|
l'heure | 2009-07-08 18:42:05 |
Auteur | Gwenole Beauchesne <gbeauchesne@spli...> |
Commiter | Austin Yuan |
Allow conditional build of video drivers (dummy, i965).
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
@@ -21,7 +21,14 @@ | ||
21 | 21 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 | 22 | |
23 | 23 | AUTOMAKE_OPTIONS = foreign |
24 | -SUBDIRS = src dummy_drv_video i965_drv_video test | |
24 | + | |
25 | +SUBDIRS = src test | |
26 | +if BUILD_DUMMY_DRIVER | |
27 | +SUBDIRS += dummy_drv_video | |
28 | +endif | |
29 | +if BUILD_I965_DRIVER | |
30 | +SUBDIRS += i965_drv_video | |
31 | +endif | |
25 | 32 | |
26 | 33 | pkgconfigdir = @pkgconfigdir@ |
27 | 34 | pkgconfig_DATA = libva.pc |
@@ -27,6 +27,17 @@ AM_INIT_AUTOMAKE([dist-bzip2]) | ||
27 | 27 | |
28 | 28 | AM_CONFIG_HEADER([config.h]) |
29 | 29 | |
30 | +AC_ARG_ENABLE(dummy-driver, | |
31 | + [AC_HELP_STRING([--enable-dummy-driver], | |
32 | + [build dummy video driver])], | |
33 | + [], [enable_dummy_driver=yes]) | |
34 | +AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes) | |
35 | + | |
36 | +AC_ARG_ENABLE(i965-driver, | |
37 | + [AC_HELP_STRING([--enable-i965-driver], | |
38 | + [build i965 video driver])], | |
39 | + [], [enable_i965_driver=yes]) | |
40 | + | |
30 | 41 | AC_ARG_WITH(drivers-path, |
31 | 42 | [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],, |
32 | 43 | [with_drivers_path="$libdir/va/drivers"]) |
@@ -49,6 +60,13 @@ PKG_CHECK_MODULES(LIBDRM_DEPS, [libdrm]) | ||
49 | 60 | AC_CHECK_PROG(gen4asm, [intel-gen4asm], yes, no) |
50 | 61 | AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes) |
51 | 62 | |
63 | +# Check for libdrm >= 2.4 (needed for i965_drv_video.so) | |
64 | +if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then | |
65 | + AC_MSG_WARN([libdrm < 2.4 found, disabling build of i965 video driver]) | |
66 | + enable_i965_driver=no | |
67 | +fi | |
68 | +AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes) | |
69 | + | |
52 | 70 | # We only need the headers, we don't link against the DRM libraries |
53 | 71 | LIBVA_CFLAGS="$LIBDRM_DEPS_CFLAGS" |
54 | 72 | AC_SUBST(LIBVA_CFLAGS) |