+2008-01-24 Tim-Philipp Müller <tim at centricular dot net>
+
+ * configure.ac:
+ Use AC_TRY_COMPILE instead of AC_TRY_RUN to check for
+ _POSIX_TIMER, _POSIX_MONOTONIC_CLOCK, etc. Makes configure
+ not fail when trying to crosscompile on OpenEmbedded (#511750).
+
2008-01-20 Sebastian Dröge <slomo@circular-chaos.org>
* docs/manuals.mak:
])
])
-AC_CACHE_CHECK(for posix timers, gst_cv_posix_timers,AC_TRY_RUN([
+AC_CACHE_CHECK(for posix timers, gst_cv_posix_timers,
+ AC_TRY_COMPILE([
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
- int main() {
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS >= 0 && defined(CLOCK_REALTIME)
- return 0;
-#else
- return 1;
+ ], [
+#if !defined(_POSIX_TIMERS) || _POSIX_TIMERS < 0 || !defined(CLOCK_REALTIME)
+#error Either _POSIX_TIMERS or CLOCK_REALTIME not defined
#endif
- }],gst_cv_posix_timers=yes,gst_cv_posix_timers=no))
+ return 0;
+ ], [
+ gst_cv_posix_timers=yes
+ ], [
+ gst_cv_posix_timers=no
+ ])
+)
if test "$gst_cv_posix_timers" = "yes"; then
AC_DEFINE(HAVE_POSIX_TIMERS,1,[Have posix timers])
AC_SUBST(GST_HAVE_POSIX_TIMERS_DEFINE)
AM_CONDITIONAL(GST_HAVE_POSIX_TIMERS, test "$gst_cv_posix_timers" = "yes")
-AC_CACHE_CHECK(for monotonic clock, gst_cv_monotonic_clock,AC_TRY_RUN([
+AC_CACHE_CHECK(for monotonic clock, gst_cv_monotonic_clock,
+ AC_TRY_COMPILE([
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
- int main() {
-#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)
- return 0;
-#else
- return 1;
+ ], [
+#if !defined(_POSIX_MONOTONIC_CLOCK) || _POSIX_MONOTONIC_CLOCK < 0 || !defined(CLOCK_MONOTONIC)
+#error Either _POSIX_MONOTONIC_CLOCK or CLOCK_MONOTONIC not defined
#endif
- }],gst_cv_monotonic_clock=yes,gst_cv_monotonic_clock=no))
+ return 0;
+ ], [
+ gst_cv_monotonic_clock=yes
+ ], [
+ gst_cv_monotonic_clock=no
+ ])
+)
if test "$gst_cv_monotonic_clock" = "yes"; then
AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock])