diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-07 22:20:54 +0200 |
---|---|---|
committer | Wim Taymans <wim@metal.(none)> | 2009-06-07 22:20:54 +0200 |
commit | fbaa49faf4a1122cf2d3fb4f4425a4e028b20460 (patch) | |
tree | 82035b18e13ebb0bc670e54adbc4876d66cf3ea1 | |
parent | 1769cc729799ea1c141f9d2320fb9fcd72f25546 (diff) |
tests: conditionally compile the streams example
Detect pthreads.h in configure.ac
Only compile the streams example when pthreads.h is present.
Fixes #585039
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | tests/examples/Makefile.am | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 87793e142c..6ac296d29b 100644 --- a/configure.ac +++ b/configure.ac @@ -305,6 +305,10 @@ AC_CHECK_HEADERS([sys/utsname.h]) dnl Check for stdio_ext.f for __fbufsize AC_CHECK_HEADERS([stdio_ext.h]) +dnl check for pthreads +AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes) +AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes") + dnl Check for valgrind.h dnl separate from HAVE_VALGRIND because you can have the program, but not dnl the dev package diff --git a/tests/examples/Makefile.am b/tests/examples/Makefile.am index 88fbe7db62..4aca55f980 100644 --- a/tests/examples/Makefile.am +++ b/tests/examples/Makefile.am @@ -17,12 +17,18 @@ 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 \ - streams \ queue \ stepping @@ -45,7 +51,8 @@ always_dirs = \ SUBDIRS = \ $(always_dirs) \ $(ADAPTER_TEST_DIR) \ + $(STREAMS_TEST_DIR) \ $(GST_PARSE_DIRS) \ $(GST_LOADSAVE_DIRS) -DIST_SUBDIRS = $(always_dirs) adapter xml typefind launch +DIST_SUBDIRS = $(always_dirs) adapter streams xml typefind launch |