Skip to content

Commit 68697ad

Browse files
configure: check for clock_gettime and the providing library
clock_gettime is provided by -lrt so we must check for it. Fixes build issues like observed in Buildroot; http://autobuild.buildroot.org/results/9df/9df2c09963b97524621f8323b279b8a1672d4b6c/build-end.log Signed-off-by: "Yann E. MORIN" <[email protected]>
1 parent bf58805 commit 68697ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

configure.ac

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ AC_PROG_CC
1616
# Checks for libraries.
1717
AC_CHECK_LIB([jpeg], [jpeg_start_compress])
1818
AC_CHECK_LIB([v4l2], [v4l2_open])
19+
AC_SEARCH_LIBS([clock_gettime],[rt],,
20+
[AC_MSG_ERROR([no library contains clock_gettime])])
1921

2022
# Checks for header files.
2123
AC_CHECK_HEADERS([fcntl.h malloc.h stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
@@ -26,5 +28,6 @@ AC_TYPE_SIZE_T
2628
# Checks for library functions.
2729
AC_FUNC_MALLOC
2830
AC_CHECK_FUNCS([getpagesize select strerror])
31+
AC_CHECK_FUNCS([clock_gettime])
2932

3033
AC_OUTPUT

0 commit comments

Comments
 (0)