From cf0a34528d618eeda1ad7066d0370f6d0ae70fa7 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Sat, 19 Aug 2000 00:29:57 +0000 Subject: [PATCH] libXv is now linked against by test/* and gstplay if it is present. Original commit message from CVS: libXv is now linked against by test/* and gstplay if it is present. -lXv isn't leaked all over the place due to AC_CHECK_LIB test. This is still messy though - we shouldn't have to link explicitly with extra things just because we use certain plugins. Build Makefile in tests, but don't recurse into tests when doing the build (tests no longer in SUBDIRS). --- Makefile.am | 2 +- config.h.in | 3 --- configure.in | 8 +++++--- gstplay/Makefile.am | 8 +++++++- test/Makefile.am | 11 +++++++++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index efb89834fa..7ddfdb16dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,7 @@ gstplay_subdir= endif # These are the subdirs which might get used. -SUBDIRS = gst libs plugins . $(gstplay_subdir) test editor tools docs tests +SUBDIRS = gst libs plugins . $(gstplay_subdir) test editor tools docs # tests # These are all the possible subdirs DIST_SUBDIRS = gst libs plugins . gstplay test editor tools docs tests diff --git a/config.h.in b/config.h.in index dc954e2c16..23093e2433 100644 --- a/config.h.in +++ b/config.h.in @@ -24,9 +24,6 @@ #undef DEBUG_ENABLED -/* Define if you have the Xv library (-lXv). */ -#undef HAVE_LIBXV - /* Name of package */ #undef PACKAGE diff --git a/configure.in b/configure.in index 55c3449e19..3995af79ad 100644 --- a/configure.in +++ b/configure.in @@ -129,7 +129,6 @@ else [Couldn't find gnome libraries for libglade - Can't build gstplay]) ) CFLAGS=${libglade_save_CFLAGS} - AC_MSG_WARN() fi dnl Check for atomic.h @@ -183,8 +182,9 @@ AC_SUBST(X_PRE_LIBS) AC_SUBST(X_EXTRA_LIBS) AC_SUBST(X_LIBS) -AC_CHECK_LIB(Xv, XvQueryExtension,,, - $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) +xvsave_LIBS=${LIBS} +AC_CHECK_LIB(Xv, XvQueryExtension, HAVE_LIBXV=yes, HAVE_LIBXV=no, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) +LIBS=${xvsave_LIBS} dnl Check for xaudio AC_CHECK_HEADER(xaudio/decoder.h,[ @@ -339,6 +339,7 @@ AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes") AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes") AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes") AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes") +AM_CONDITIONAL(HAVE_LIBXV, test "x$HAVE_LIBXV" = "xyes") AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC) @@ -426,6 +427,7 @@ test/Makefile test/xml/Makefile test/bindings/Makefile test/cothreads/Makefile +tests/Makefile editor/Makefile tools/Makefile docs/Makefile diff --git a/gstplay/Makefile.am b/gstplay/Makefile.am index d7a3c1c7df..63981b300f 100644 --- a/gstplay/Makefile.am +++ b/gstplay/Makefile.am @@ -22,7 +22,13 @@ CFLAGS += -O2 -Wall -DDATADIR=\""$(gladedir)/"\" gstplay_CFLAGS = $(shell gnome-config --cflags gnomeui) $(shell libglade-config --cflags gnome) gstplay_LDFLAGS = $(shell gnome-config --libs gnomeui) $(shell libglade-config --libs gnome) +if HAVE_LIBXV +xvlibs=-lXv +else +xvlibs= +endif + gstplay_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \ - $(top_builddir)/plugins/videosink/gdkxvimage.lo -lXv -lXxf86vm + $(top_builddir)/plugins/videosink/gdkxvimage.lo ${xvlibs} -lXxf86vm diff --git a/test/Makefile.am b/test/Makefile.am index 32428c8ca3..257d0d9baf 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -15,8 +15,15 @@ ac3play_SOURCES = ac3play.c mem.c noinst_HEADERS = mem.h -LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \ - $(top_builddir)/plugins/videosink/gdkxvimage.lo -lXv -lXxf86vm +if HAVE_LIBXV +xvlibs=-lXv +else +xvlibs= +endif + +LDADD = $(top_builddir)/gst/libgst.la \ + $(GLIB_LIBS) $(GTK_LIBS) \ + $(top_builddir)/plugins/videosink/gdkxvimage.lo ${xvlibs} -lXxf86vm #LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \ # $(top_builddir)/plugins/videosink/libvideosink.la -L/usr/X11/lib -lXxf86dga