libXv is now linked against by test/* and gstplay if it is present.
authorRichard Boulton <richard@tartarus.org>
Sat, 19 Aug 2000 00:29:57 +0000 (00:29 +0000)
committerRichard Boulton <richard@tartarus.org>
Sat, 19 Aug 2000 00:29:57 +0000 (00:29 +0000)
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
config.h.in
configure.in
gstplay/Makefile.am
test/Makefile.am

index efb8983..7ddfdb1 100644 (file)
@@ -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
index dc954e2..23093e2 100644 (file)
@@ -24,9 +24,6 @@
 
 #undef DEBUG_ENABLED
 
-/* Define if you have the Xv library (-lXv).  */
-#undef HAVE_LIBXV
-
 /* Name of package */
 #undef PACKAGE
 
index 55c3449..3995af7 100644 (file)
@@ -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
index d7a3c1c..63981b3 100644 (file)
@@ -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
 
 
index 32428c8..257d0d9 100644 (file)
@@ -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