Compile adapter test/example only if the required headers are available (fixes #391915).
authorTim-Philipp Müller <tim@centricular.net>
Tue, 2 Jan 2007 17:01:33 +0000 (17:01 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 2 Jan 2007 17:01:33 +0000 (17:01 +0000)
Original commit message from CVS:
* configure.ac:
* tests/examples/Makefile.am:
Compile adapter test/example only if the required headers are
available (fixes #391915).

ChangeLog
configure.ac
tests/examples/Makefile.am

index b1ffc60..0df4ae1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-02  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * configure.ac:
+       * tests/examples/Makefile.am:
+         Compile adapter test/example only if the required headers are
+         available (fixes #391915).
+
 2007-01-01  David Schleef  <ds@schleef.org>
 
        * gst/gstplugin.c:
index 67f37b0..f257831 100644 (file)
@@ -268,8 +268,17 @@ AC_HEADER_STDC
 
 dnl Check for ucontext.h
 AC_CHECK_HEADERS([ucontext.h])
+
+dnl Check for sys/socket.h
 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
 AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
+
+dnl check for sys/times.h for tests/examples/adapter/
+AC_CHECK_HEADERS([sys/times.h], HAVE_SYS_TIMES_H=yes)
+AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
+AM_CONDITIONAL(HAVE_SYS_TIMES_H_AND_UNISTD_H, test "x$HAVE_SYS_TIMES_H" = "xyes" -a "x$HAVE_UNISTD_H" = "xyes")
+
+dnl Check for process.h for getpid() on win32
 AC_CHECK_HEADERS([process.h])
 
 dnl Check for sys/utsname.h for uname
index e27f19d..e688d8e 100644 (file)
@@ -10,13 +10,19 @@ else
 GST_PARSE_DIRS = launch
 endif
 
+# adapter test needs sys/times.h and unistd.h
+if HAVE_SYS_TIMES_H_AND_UNISTD_H
+  ADAPTER_TEST_DIR = adapter
+else
+  ADAPTER_TEST_DIR =
+endif
+
 always_dirs = \
-       controller                      \
-       helloworld                      \
-       manual                          \
-       metadata                        \
-       queue                           \
-       adapter
+       controller \
+       helloworld \
+       manual     \
+       metadata   \
+       queue
 
 #appreader
 #cutter
@@ -36,7 +42,8 @@ always_dirs = \
 
 SUBDIRS =                              \
        $(always_dirs)                  \
+       $(ADAPTER_TEST_DIR)             \
        $(GST_PARSE_DIRS)               \
        $(GST_LOADSAVE_DIRS)
 
-DIST_SUBDIRS = $(always_dirs) xml typefind launch
+DIST_SUBDIRS = $(always_dirs) adapter xml typefind launch