summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2003-07-03 15:56:49 +0000
committerBrian Cameron <brian.cameron@sun.com>2003-07-03 15:56:49 +0000
commit4fe02ad53146f25468c923eabfcaf7cbd055c26b (patch)
tree1ec29d74d3fda1e6288b7785cf4e929f086c04b9
parente6995d884c5e441c08111e79e056909b462fdaae (diff)
downloadgst-plugins-bad-4fe02ad53146f25468c923eabfcaf7cbd055c26b.tar.gz
gst-plugins-bad-4fe02ad53146f25468c923eabfcaf7cbd055c26b.tar.bz2
gst-plugins-bad-4fe02ad53146f25468c923eabfcaf7cbd055c26b.zip
Now build xvideosink if Xwindows is available, and properly #ifdef the
Original commit message from CVS: Now build xvideosink if Xwindows is available, and properly #ifdef the Xv extension code in the xvideosink code.
-rw-r--r--configure.ac38
1 files changed, 24 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 83ca7fa2..08981793 100644
--- a/configure.ac
+++ b/configure.ac
@@ -412,21 +412,31 @@ dnl this is an error until XFree86 starts shipping one
translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink, [
- dnl use X_CFLAGS for check
- save_FLAGS=$CFLAGS
- CFLAGS=$X_CFLAGS
-
- dnl check for PIC static lib
- GST_CHECK_LIBHEADER(XVIDEO, Xv_pic, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xv.h, XVIDEO_LIBS="-lXv_pic -lXext")
- if test x$HAVE_XVIDEO = xno; then
- dnl PIC lib not found, check for regular lib
- GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xv.h, XVIDEO_LIBS="-lXv -lXext")
- fi
- AC_SUBST(XVIDEO_LIBS)
-
- dnl restore CFLAGS
- CFLAGS=$save_CFLAGS
+ if test -z $X_DISPLAY_MISSING; then
+ HAVE_XVIDEO=yes
+ else
+ HAVE_XVIDEO=no
+ fi
])
+
+dnl Check for Xv extension
+
+if test x$HAVE_XVIDEO = xyes; then
+ AC_CHECK_LIB(Xv_pic, XvQueryExtension, HAVE_XV="yes", HAVE_XV="no", $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+
+ if test x$HAVE_XV = xyes; then
+ AC_DEFINE(HAVE_XV, 1, [Define if Xv extension is available])
+ XVIDEO_LIBS="-lXv_pic -lXext"
+ AC_SUBST(XVIDEO_LIBS)
+ else
+ AC_CHECK_LIB(Xv, XvQueryExtension, HAVE_XVIDEO="yes", HAVE_XVIDEO="no", $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+ if test x$HAVE_XV = xyes; then
+ AC_DEFINE(HAVE_XV, 1, [Define if Xv extension is available])
+ XVIDEO_LIBS="-lXv -lXext"
+ AC_SUBST(XVIDEO_LIBS)
+ fi
+ fi
+fi
dnl Next, check for the optional libraries:
dnl These are all libraries used in building plug-ins