examples: Link rtpool-test to libpthread for using the POSIX threads
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 19 Aug 2009 13:25:41 +0000 (15:25 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 19 Aug 2009 13:25:41 +0000 (15:25 +0200)
Also the other streams example can run without pthreads therefore
enable it even if pthreads are not available.

Fixes bug #592314.

tests/examples/Makefile.am
tests/examples/streams/Makefile.am

index 4aca55f..20d7877 100644 (file)
@@ -17,20 +17,14 @@ else
   ADAPTER_TEST_DIR =
 endif
 
-# streams test needs pthreads
-if HAVE_PTHREAD_H
-  STREAMS_TEST_DIR = streams
-else
-  STREAMS_TEST_DIR =
-endif
-
 always_dirs = \
        controller \
        helloworld \
        manual     \
        metadata   \
        queue      \
-       stepping
+       stepping \
+       streams
 
 #appreader
 #cutter
@@ -51,7 +45,6 @@ always_dirs = \
 SUBDIRS =                              \
        $(always_dirs)                  \
        $(ADAPTER_TEST_DIR)             \
-       $(STREAMS_TEST_DIR)             \
        $(GST_PARSE_DIRS)               \
        $(GST_LOADSAVE_DIRS)
 
index 39f574d..910df0a 100644 (file)
@@ -1,9 +1,14 @@
-noinst_PROGRAMS = stream-status rtpool-test
+noinst_PROGRAMS = stream-status
+if HAVE_PTHREAD_H
+noinst_PROGRAMS += rtpool-test
+endif
 
 stream_status_SOURCES = stream-status.c
 stream_status_LDADD = $(GST_OBJ_LIBS)
 stream_status_CFLAGS = $(GST_OBJ_CFLAGS)
 
 rtpool_test_SOURCES = rtpool-test.c testrtpool.h testrtpool.c
-rtpool_test_LDADD = $(GST_OBJ_LIBS)
+rtpool_test_LDADD = $(GST_OBJ_LIBS) -lpthread
 rtpool_test_CFLAGS = $(GST_OBJ_CFLAGS)
+
+EXTRA_DIST = rtpool-test.c testrtpool.h testrtpool.c