Checking whether librt is needed for clock_gettime().
eSyr
PATCH 1/1 Checking whether librt is needed for clock_gettime().
Commit ef79e28 introduced usage of clock_gettime() function, which, unfortunately, breaks build on some systems, namely Debian Wheezy, due to the fact it should be linked with librt. This commit adds configure check whether additional library is needed in order to use aforementioned function.
* configure.ac: using AC_SEARCH_LIBS() for checking whether librt is needed for clock_gettime().
--- configure.ac | 2 ++ 1 file changed, 2 insertions(+)
configure.ac +2 -0
@@ -106,6 +106,8 @@ AC_CHECK_FUNCS([ \ strtoull \ ]) +AC_SEARCH_LIBS([clock_gettime], [rt]) + PKG_CHECK_MODULES([NCURSES], [ncursesw ncurses], [LIBS="$LIBS $ncurses_LIBS"], [ AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], [ AC_MSG_ERROR([ncurses is required but was not found])
Signature · 1 line
1.7.10.4
Joe Konno
Acked-by on v1 1/1Quoted 17 lines · On Tue, 2 Aug 2016 06:29:53 +0300 eSyr <evgsyr(a)gmail.com> wrote:
Commit ef79e28 introduced usage of
clock_gettime()function, which, unfortunately, breaks build on some systems, namely Debian Wheezy, due to the fact it should be linked with librt. This commit adds configure check whether additional library is needed in order to use aforementioned function.* configure.ac: using
AC_SEARCH_LIBS()for checking whether librt is needed forclock_gettime().--- configure.ac | 2 ++ 1 file changed, 2 insertions(+)configure.ac +0
-0
configure.ac AC_CHECK_FUNCS([ \ · line 113
Quoted 8 lines
configure.ac +2
-0@@ -106,6 +106,8 @@ AC_CHECK_FUNCS([ \ strtoull \ ]) +AC_SEARCH_LIBS([clock_gettime], [rt]) + PKG_CHECK_MODULES([NCURSES], [ncursesw ncurses], [LIBS="$LIBS $ncurses_LIBS"], [ AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], [ AC_MSG_ERROR([ncurses is required but was not found])
You have my Acked-by. Pushed, and thanks for your contribution!
commit 25558463a185e8c606bd0a341e18d0996ade5f4e
Author: eSyr <evgsyr(a)gmail.com> AuthorDate: Tue Aug 2 06:29:53 2016 +0300 Commit: Joe Konno <joe.konno(a)intel.com> CommitDate: Wed Aug 3 08:26:38 2016 -0700
Checking whether librt is needed for clock_gettime().
Commit ef79e28 introduced usage of clock_gettime() function, which, unfortunately, breaks build on some systems, namely Debian Wheezy, due to the fact it should be linked with librt. This commit adds configure check whether additional library is needed in order to use aforementioned function.
* configure.ac: using AC_SEARCH_LIBS() for checking whether librt is needed for clock_gettime().