OSDN Git Service

Drop duplicate LIBDRM_DEPS pkg-config check.
[android-x86/hardware-intel-common-libva.git] / configure.ac
1 # Copyright (c) 2007 Intel Corporation. All Rights Reserved.
2 #
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:
10
11 # The above copyright notice and this permission notice (including the
12 # next paragraph) shall be included in all copies or substantial portions
13 # of the Software.
14
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.
22
23 AC_PREREQ(2.57)
24 AC_INIT([libva], 0.30.4, [waldo.bastian@intel.com], libva)
25 AC_CONFIG_SRCDIR([Makefile.am])
26 AM_INIT_AUTOMAKE([dist-bzip2])
27
28 AM_CONFIG_HEADER([config.h])
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
41 AC_ARG_WITH(drivers-path,
42             [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
43             [with_drivers_path="$libdir/va/drivers"])
44
45 LIBVA_DRIVERS_PATH="$with_drivers_path"
46 AC_SUBST(LIBVA_DRIVERS_PATH)
47
48 AC_DISABLE_STATIC
49 AC_PROG_LIBTOOL
50 AC_PROG_CC
51
52 AC_HEADER_STDC
53 AC_SYS_LARGEFILE
54
55 PKG_CHECK_MODULES([X11], [x11])
56 PKG_CHECK_MODULES([XEXT],[xext])
57 PKG_CHECK_MODULES([DRM], [libdrm])
58
59 AC_CHECK_PROG(gen4asm, [intel-gen4asm], yes, no)
60 AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
61
62 # Check for libdrm >= 2.4 (needed for i965_drv_video.so)
63 if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then
64     AC_MSG_WARN([libdrm < 2.4 found, disabling build of i965 video driver])
65     enable_i965_driver=no
66 fi
67 AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
68
69 # We only need the headers, we don't link against the DRM libraries
70 LIBVA_CFLAGS="$DRM_CFLAGS"
71 AC_SUBST(LIBVA_CFLAGS)
72 AC_SUBST(LIBVA_LIBS)
73
74 pkgconfigdir=${libdir}/pkgconfig
75 AC_SUBST(pkgconfigdir)
76
77 AC_OUTPUT([
78         Makefile
79         src/Makefile
80         src/x11/Makefile
81         dummy_drv_video/Makefile
82         i965_drv_video/Makefile
83         i965_drv_video/shaders/Makefile
84         i965_drv_video/shaders/mpeg2/Makefile
85         i965_drv_video/shaders/mpeg2/vld/Makefile
86         i965_drv_video/shaders/render/Makefile
87         test/Makefile
88         libva.pc
89 ])
90