[MPlayer-cvslog] r38326 - trunk/configure
al
subversion at mplayerhq.hu
Sun Nov 7 01:46:52 EET 2021
Author: al
Date: Sun Nov 7 01:46:52 2021
New Revision: 38326
Log:
configure: clock_gettime: Try without -lrt too
Not all systems need librt for clock_gettime and some don't have
librt like e.g OpenBSD.
Inspired by a patch from Brad Smith >brad comstyle com<
Modified:
trunk/configure
Modified: trunk/configure
==============================================================================
--- trunk/configure Mon Oct 25 16:15:36 2021 (r38325)
+++ trunk/configure Sun Nov 7 01:46:52 2021 (r38326)
@@ -4563,8 +4563,14 @@ echores "$gettimeofday"
echocheck "clock_gettime()"
clock_gettime=no
def_clock_gettime='#undef HAVE_CLOCK_GETTIME'
-statement_check_broken stddef.h time.h 'struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp)' -lrt &&
- { clock_gettime=yes ; def_clock_gettime='#define HAVE_CLOCK_GETTIME 1' ; extra_ldflags="$extra_ldflags -lrt" ; }
+for ld_tmp in "" "-lrt" ; do
+ if statement_check_broken stddef.h time.h 'struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp)' $ld_tmp ; then
+ clock_gettime=yes
+ def_clock_gettime='#define HAVE_CLOCK_GETTIME 1'
+ extra_ldflags="$extra_ldflags $ld_tmp"
+ break
+ fi
+done
echores "$clock_gettime"
More information about the MPlayer-cvslog
mailing list