summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2009-11-06 06:23:21 +0100
committerLuc Verhaegen <libv@skynet.be>2009-11-06 06:23:21 +0100
commit0776d86e3cf8d198817fba07dbfca4e04aa760c6 (patch)
tree615c6b0685526e91f11549620f25910e22762c70
parent6260e0fc9f0754d101dda014a8f4b5f76f58e978 (diff)
XvMC: Further build fixes.
Fix issues pointed out by NixOS's LluĂ­s Batlle i Rossell: * xvmc has its own .pc file and thus its own header location. * dpms headers are part of xextproto and not xproto and thus need a different header .pc location as well. Further issues fixed: * xvmc build depends on DRI (for no good reason). * fix variable status uninitialized warnings on older X.
-rw-r--r--configure.ac23
-rw-r--r--src/via_xvmc.c6
2 files changed, 17 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index bacea8a..d7fcb01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,10 +73,6 @@ AC_MSG_CHECKING([X SDK headers directory])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
AC_MSG_RESULT([$sdkdir])
-AC_MSG_CHECKING([X protocol headers directory])
-protodir=$(pkg-config --variable=includex11dir xproto)
-AC_MSG_RESULT([$protodir])
-
# Checks for libraries.
# Checks for header files.
@@ -134,18 +130,23 @@ AC_MSG_RESULT([$have_xv])
AM_CONDITIONAL(XV, test x$have_xv = xyes)
# Check what parts of XvMC are around.
+AC_MSG_CHECKING([XvMC protocol headers directory])
+xvmcprotodir=$(pkg-config --variable=includedir xvmc)
+AC_MSG_RESULT([$xvmcprotodir])
+
if test "x$have_xvmc" != xno; then
- AC_CHECK_FILE([${protodir}/extensions/XvMC.h],
+ AC_CHECK_FILE([${xvmcprotodir}/X11/extensions/XvMC.h],
[have_xvmc_h="yes"], [have_xvmc_h="no"])
- AC_CHECK_FILE([${protodir}/extensions/vldXvMC.h],
+ AC_CHECK_FILE([${xvmcprotodir}/X11/extensions/vldXvMC.h],
[have_vldxvmc_h="yes"], [have_vldxvmc_h="no"])
- AC_CHECK_FILE([${protodir}/extensions/XvMClib.h],
+ AC_CHECK_FILE([${xvmcprotodir}/X11/extensions/XvMClib.h],
[have_xvmclib_h="yes"], [have_xvmclib_h="no"])
fi
# check for driver side xvmc support.
AC_MSG_CHECKING([whether to include driver-side XvMC support])
if test "x$have_xv" = xyes -a \
+ "x$DRI" = xyes -a \
"x$have_xvmc" != xno -a \
"x$have_xvmc_h" = xyes -a \
"x$have_vldxvmc_h" = xyes; then
@@ -192,7 +193,7 @@ fi
if test "x$build_xvmc" = xyes; then
# if we have xvmclib.h, then we test this way.
if test "x$have_xvmclib_h" = xyes; then
- AC_EGREP_HEADER([XvMCQueryExtension], [${protodir}/extensions/vldXvMC.h],
+ AC_EGREP_HEADER([XvMCQueryExtension], [${xvmcprotodir}/X11/extensions/vldXvMC.h],
[broken_vldxvmc_h="yes"], [broken_vldxvmc_h="no"])
else
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include "vldXvMC.h"]])],
@@ -225,7 +226,11 @@ fi
CFLAGS="$SAVED_CFLAGS"
# in the xserver 1.7 timeframe, the protocol headers were split up.
-AC_CHECK_FILE([${protodir}/extensions/dpmsconst.h],
+AC_MSG_CHECKING([Xext protocol headers directory])
+xextprotodir=$(pkg-config --variable=includedir xextproto)
+AC_MSG_RESULT([$xextprotodir])
+
+AC_CHECK_FILE([${xextprotodir}/X11/extensions/dpmsconst.h],
[have_dpmsconst_h="yes"], [have_dpmsconst_h="no"])
if test "x$have_dpmsconst_h" = xyes; then
AC_DEFINE(HAVE_DPMSCONST_H, 1, [Proto Headers have dpmsconst.h])
diff --git a/src/via_xvmc.c b/src/via_xvmc.c
index bad50e3..3b68f86 100644
--- a/src/via_xvmc.c
+++ b/src/via_xvmc.c
@@ -93,7 +93,7 @@ XvMCEProcQMatrixSend(ClientPtr client)
struct XvMCEPrivates *Private;
ScrnInfoPtr pScrn;
XvPortPtr Port = NULL;
- int status;
+ int status = Success;
REQUEST(xvmceQMatrixSendReq);
REQUEST_AT_LEAST_SIZE(xvmceQMatrixSendReq);
@@ -144,7 +144,7 @@ XvMCEProcBufferSliceInit(ClientPtr client)
struct XvMCEPrivates *Private;
ScrnInfoPtr pScrn;
XvPortPtr Port = NULL;
- int status;
+ int status = Success;
CARD8 F_MV_Range, B_MV_Range;
CARD8 PictureStructure, FrameType, IntraDCPrecision;
Bool ScanningAlternate, PredictionFrame, TopFieldFirst;
@@ -280,7 +280,7 @@ XvMCEProcBufferSliceSend(ClientPtr client)
struct XvMCEPrivates *Private;
ScrnInfoPtr pScrn;
XvPortPtr Port = NULL;
- int status;
+ int status = Success;
REQUEST(xvmceBufferSliceSendReq);
REQUEST_AT_LEAST_SIZE(xvmceBufferSliceSendReq);