mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
configure.ac: Use AC_TRY_COMPILE instead of AC_TRY_RUN to check for _POSIX_TIMER, _POSIX_MONOTONIC_CLOCK, etc. Makes ...
Original commit message from CVS: * 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).
This commit is contained in:
parent
60582e32d4
commit
2ab5970c4e
3 changed files with 32 additions and 15 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:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 662f544d56a6d6ef20b8ea5f56e975f9e139bc78
|
||||
Subproject commit 571dce3335f9be76978009b3842c050dbb900e6f
|
38
configure.ac
38
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])
|
||||
|
|
Loading…
Reference in a new issue