AC_SUBST(CHECK_MICRO_VERSION)
AC_SUBST(CHECK_VERSION)
-# Checks for header files.
+dnl Checks for header files and declarations
+AC_CHECK_HEADERS([unistd.h sys/wait.h sys/time.h])
-# Create _stdint.h in the top-level directory
+AC_CHECK_FUNCS([localtime_r])
+
+
+dnl Create _stdint.h in the top-level directory
AX_CREATE_STDINT_H
+dnl Disable subunit support for the time being
+enable_subunit=false
+
+if test xfalse = x"$enable_subunit"; then
+ENABLE_SUBUNIT="0"
+else
+ENABLE_SUBUNIT="1"
+fi
+AC_SUBST(ENABLE_SUBUNIT)
+AC_DEFINE_UNQUOTED(ENABLE_SUBUNIT, $ENABLE_SUBUNIT, [Subunit protocol result output])
+
+AM_CONDITIONAL(SUBUNIT, test x"$enable_subunit" != "xfalse")
+
])
AC_SUBST(GST_DISABLE_XML_DEFINE)
dnl building of unit test libraries
+dnl FIXME: disable gstcheck if we don't have pthread
AC_ARG_ENABLE(check,
AC_HELP_STRING([--disable-check], [disable building unit test libraries]),
[
noinst_HEADERS = $(HFILES)
libcheckinternal_la_SOURCES = $(CFILES) $(HFILES)
-libcheckinternal_la_LIBADD =
+# define HAVE_PTHREAD here as well so we keep changes to the code to a minimum
+if HAVE_PTHREAD_H
+libcheckinternal_la_CFLAGS = -D_GNU_SOURCE -DHAVE_PTHREAD
+libcheckinternal_la_LIBADD = -lpthread
+else
+libcheckinternal_la_CFLAGS = -D_GNU_SOURCE
+libcheckinternal_la_LIBADD =
+endif