diff options
-rw-r--r-- | ChangeLog | 7 | ||||
m--------- | common | 0 | ||||
-rw-r--r-- | configure.ac | 38 |
3 files changed, 31 insertions, 14 deletions
@@ -1,3 +1,10 @@ +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: diff --git a/common b/common -Subproject 662f544d56a6d6ef20b8ea5f56e975f9e139bc7 +Subproject 571dce3335f9be76978009b3842c050dbb900e6 diff --git a/configure.ac b/configure.ac index 5d59d0dba..94a820e44 100644 --- a/configure.ac +++ b/configure.ac @@ -372,18 +372,23 @@ AC_CHECK_FUNCS(clock_gettime, [], [ ]) ]) -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]) @@ -394,18 +399,23 @@ fi 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]) |