From 899c057132408222a2ec778e924172ff6a1223b7 Mon Sep 17 00:00:00 2001 From: Austin Yuan Date: Wed, 9 Feb 2011 15:07:07 +0800 Subject: [PATCH] Fix build issue Signed-off-by: Austin Yuan --- Makefile.am | 6 +++++- configure.ac | 7 +++++++ libva-egl.pc.in | 13 +++++++++++++ libva.spec | 2 +- va/Makefile.am | 6 +++++- 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 libva-egl.pc.in diff --git a/Makefile.am b/Makefile.am index 1be7da0..4d4fb49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,12 +30,16 @@ if BUILD_I965_DRIVER SUBDIRS += i965_drv_video endif -pcfiles = libva.pc libva-tpi.pc libva-egl.pc +pcfiles = libva.pc libva-tpi.pc pcfiles += libva-x11.pc if USE_GLX pcfiles += libva-glx.pc endif +if USE_EGL +pcfiles += libva-egl.pc +endif + pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = $(pcfiles) diff --git a/configure.ac b/configure.ac index 74c08f8..2660ac7 100644 --- a/configure.ac +++ b/configure.ac @@ -134,6 +134,11 @@ fi AC_SUBST(GL_DEPS_CFLAGS) AC_SUBST(GL_DEPS_LIBS) AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes") +AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes") + +# TBD: Check for EGL +USE_EGL="yes" + # Make sure drivers use the correctly versioned __vaDriverInit*() function name VA_DRIVER_INIT_FUNC="__vaDriverInit_${LIBVA_MAJOR_VERSION}_${LIBVA_MINOR_VERSION}" @@ -202,6 +207,8 @@ AS_IF([test x$enable_dummy_driver = xyes], [DRIVERS="dummy $DRIVERS"]) echo " • Drivers: ${DRIVERS}" AS_IF([test x$USE_GLX = xyes], [BACKENDS="glx $BACKENDS"]) +AS_IF([test x$USE_EGL = xyes], [BACKENDS="egl $BACKENDS"]) + BACKENDS="x11 $BACKENDS" AS_IF([test x$enable_dummy_backend = xyes], [BACKENDS="dummy $BACKENDS"]) diff --git a/libva-egl.pc.in b/libva-egl.pc.in new file mode 100644 index 0000000..3d621b2 --- /dev/null +++ b/libva-egl.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +display=egl + +Name: libva-${display} +Description: Userspace Video Acceleration (VA) ${display} interface +Requires: libva +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lva-${display} +Cflags: -I${includedir} + diff --git a/libva.spec b/libva.spec index 70fbaf4..fc522dc 100644 --- a/libva.spec +++ b/libva.spec @@ -2,7 +2,7 @@ %define libversion 1.0.8 Name: libva -Version: %{libversion} +Version: %{libversion}MFLD Release: 0.0 License: MIT Source: %{name}-%{version}.tar.bz2 diff --git a/va/Makefile.am b/va/Makefile.am index ddb53a2..a73fde7 100644 --- a/va/Makefile.am +++ b/va/Makefile.am @@ -74,13 +74,17 @@ libva_glx_backend = libva_glx_backenddir = endif -# tbd: make it configurable? +if USE_EGL libva_egl_backend = libva-egl.la libva_egl_backenddir = egl libva_egl_la_SOURCES = libva_egl_la_LIBADD = $(libvacorelib) egl/libva_egl.la libva-x11.la $(GL_DEPS_LIBS) -ldl libva_egl_la_LDFLAGS = $(LDADD) libva_egl_la_DEPENDENCIES = $(libvacorelib) egl/libva_egl.la libva-x11.la +else +libva_egl_backend = +libva_egl_backenddir = +endif lib_LTLIBRARIES = libva.la libva-tpi.la $(libva_x11_backend) $(libva_dummy_backend) $(libva_glx_backend) $(libva_egl_backend) -- 2.7.4