summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCooper Yuan <cooperyuan@gmail.com>2009-05-27 12:49:26 +0800
committerCooper Yuan <cooperyuan@gmail.com>2009-05-27 12:49:26 +0800
commitf8e409b4e81416a81be9966572b8c85bd8447e68 (patch)
tree5f721f6737aca6e07dc4b00b21d165478965cfd4
parent72a79c8ee0991b890bb190004af5b16d26bc45bd (diff)
xvmc: Add Makefile.am which generates binary libRadeonXvMC.so
-rw-r--r--configure.ac24
-rw-r--r--src/Makefile.am2
-rw-r--r--src/r500_hwmc.c25
-rw-r--r--src/r500_hwmc.h32
-rw-r--r--src/xvmc/Makefile.am16
5 files changed, 99 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a2d7f97..fec70e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,12 @@ AC_ARG_WITH(xserver-source,AC_HELP_STRING([--with-xserver-source=XSERVER_SOURCE]
[ XSERVER_SOURCE="$withval" ],
[ XSERVER_SOURCE="" ])
+
+AC_ARG_ENABLE(xvmc, AC_HELP_STRING([--disable-xvmc],
+ [Disable XvMC support [[default=auto]]]),
+ [XVMC="$enableval"],
+ [XVMC=auto])
+
# Checks for extensions
XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -106,6 +112,23 @@ if test x$DRI = xauto; then
fi
AC_MSG_RESULT([$DRI])
+if test "$XVMC" = auto; then
+ XVMC="$DRI"
+fi
+if test "$XVMC" = yes && test "$DRI" = no; then
+ AC_MSG_ERROR([XvMC can't be enabled without DRI])
+fi
+if test "$XVMC" = yes; then
+ PKG_CHECK_MODULES(XVMCLIB, [xvmc], [XVMC=yes], [XVMC=no])
+fi
+AC_MSG_CHECKING([whether to include XvMC support])
+AC_MSG_RESULT([$XVMC])
+AM_CONDITIONAL(XVMC, test x$XVMC = xyes)
+if test "$XVMC" = yes; then
+ AC_DEFINE(ENABLE_XVMC,1,[Enable XvMC support])
+ AC_SUBST([XVMCLIB_CFLAGS])
+fi
+
AM_CONDITIONAL(DRI, test x$DRI = xyes)
if test "$DRI" = yes; then
PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto])
@@ -335,4 +358,5 @@ AC_OUTPUT([
Makefile
src/Makefile
man/Makefile
+ src/xvmc/Makefile
])
diff --git a/src/Makefile.am b/src/Makefile.am
index c8d8c1d..d9ee691 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,6 +28,8 @@
radeon_drv_la_LIBADD =
+SUBDIRS = xvmc
+
if DRI
RADEON_DRI_SRCS = radeon_dri.c
radeon_drv_la_LIBADD += $(DRI_LIBS)
diff --git a/src/r500_hwmc.c b/src/r500_hwmc.c
new file mode 100644
index 0000000..2c7073b
--- /dev/null
+++ b/src/r500_hwmc.c
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2008 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Cooper Yuan <cooper.yuan@amd.com>
+ *
+ */ \ No newline at end of file
diff --git a/src/r500_hwmc.h b/src/r500_hwmc.h
new file mode 100644
index 0000000..ba615e2
--- /dev/null
+++ b/src/r500_hwmc.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2008 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Cooper Yuan <cooper.yuan@amd.com>
+ *
+ */
+
+#ifndef RADEON_HWMC_H
+#define RADEON_HWMC_H
+
+
+
+#endif \ No newline at end of file
diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
new file mode 100644
index 0000000..1ddac45
--- /dev/null
+++ b/src/xvmc/Makefile.am
@@ -0,0 +1,16 @@
+if XVMC
+lib_LTLIBRARIES=libRadeonXvMC.la
+
+libRadeonXvMC_la_SOURCES = radeon_xvmc.c \
+ radeon_xvmc.h \
+ r500_xvmc.c \
+ r500_xvmc.h \
+ r100_xvmc.c \
+ r100_xvmc.h
+
+libRadeonXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(top_srcdir)/src \
+ @XVMCLIB_CFLAGS@ -DTRUE=1 -DFALSE=0
+libRadeonXvMC_la_LDFLAGS = -version-number 1:0:0
+libRadeonXvMC_la_LIBADD = @DRI_LIBS@
+
+endif