From f8e409b4e81416a81be9966572b8c85bd8447e68 Mon Sep 17 00:00:00 2001 From: Cooper Yuan Date: Wed, 27 May 2009 12:49:26 +0800 Subject: xvmc: Add Makefile.am which generates binary libRadeonXvMC.so --- configure.ac | 24 ++++++++++++++++++++++++ src/Makefile.am | 2 ++ src/r500_hwmc.c | 25 +++++++++++++++++++++++++ src/r500_hwmc.h | 32 ++++++++++++++++++++++++++++++++ src/xvmc/Makefile.am | 16 ++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 src/r500_hwmc.c create mode 100644 src/r500_hwmc.h create mode 100644 src/xvmc/Makefile.am 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 + * + */ \ 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 + * + */ + +#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 -- cgit v1.2.3