summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-07-08 07:50:01 +0000
committerAustin Yuan <shengquan.yuan@intel.com>2009-07-08 17:06:30 +0800
commit6f6eabaf89974eef96d9f0ae26b472f9b06e14d3 (patch)
treea469fbaf3ba574c10462361e12dac9357b9add4d
parentff089d968ae84887a25862819a5728477c3ea222 (diff)
downloadlibva-6f6eabaf89974eef96d9f0ae26b472f9b06e14d3.tar.gz
Allow conditional build of video drivers (dummy, i965).
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--Makefile.am9
-rw-r--r--configure.ac18
2 files changed, 26 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 3515b69..d1c7cce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,14 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src dummy_drv_video i965_drv_video test
+
+SUBDIRS = src test
+if BUILD_DUMMY_DRIVER
+SUBDIRS += dummy_drv_video
+endif
+if BUILD_I965_DRIVER
+SUBDIRS += i965_drv_video
+endif
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libva.pc
diff --git a/configure.ac b/configure.ac
index 5d53059..5b5314c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,17 @@ AM_INIT_AUTOMAKE([dist-bzip2])
AM_CONFIG_HEADER([config.h])
+AC_ARG_ENABLE(dummy-driver,
+ [AC_HELP_STRING([--enable-dummy-driver],
+ [build dummy video driver])],
+ [], [enable_dummy_driver=yes])
+AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes)
+
+AC_ARG_ENABLE(i965-driver,
+ [AC_HELP_STRING([--enable-i965-driver],
+ [build i965 video driver])],
+ [], [enable_i965_driver=yes])
+
AC_ARG_WITH(drivers-path,
[AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
[with_drivers_path="$libdir/va/drivers"])
@@ -49,6 +60,13 @@ PKG_CHECK_MODULES(LIBDRM_DEPS, [libdrm])
AC_CHECK_PROG(gen4asm, [intel-gen4asm], yes, no)
AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
+# Check for libdrm >= 2.4 (needed for i965_drv_video.so)
+if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then
+ AC_MSG_WARN([libdrm < 2.4 found, disabling build of i965 video driver])
+ enable_i965_driver=no
+fi
+AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
+
# We only need the headers, we don't link against the DRM libraries
LIBVA_CFLAGS="$LIBDRM_DEPS_CFLAGS"
AC_SUBST(LIBVA_CFLAGS)