Fix build issue
authorAustin Yuan <shengquan.yuan@gmail.com>
Wed, 9 Feb 2011 07:07:07 +0000 (15:07 +0800)
committerAustin Yuan <shengquan.yuan@gmail.com>
Wed, 9 Feb 2011 07:07:07 +0000 (15:07 +0800)
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
Makefile.am
configure.ac
libva-egl.pc.in [new file with mode: 0644]
libva.spec
va/Makefile.am

index 1be7da0..4d4fb49 100644 (file)
@@ -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)
 
index 74c08f8..2660ac7 100644 (file)
@@ -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 " \95 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 (file)
index 0000000..3d621b2
--- /dev/null
@@ -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}
+
index 70fbaf4..fc522dc 100644 (file)
@@ -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
index ddb53a2..a73fde7 100644 (file)
@@ -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)