FIX #618: test if -lrt is required for linking
This checks for clock_gettime availability in the clib and in librt and adds -lrt to LUMIERA_LIBS when the function is available in librt. The check is only done for autotools based builds, scons may need something else. Other functions from the realtime need to be added on demand.
This commit is contained in:
parent
030320352d
commit
5792d330b3
1 changed files with 12 additions and 0 deletions
12
configure.ac
12
configure.ac
|
|
@ -103,6 +103,18 @@ LUMIERA_LIBS="$NOBUGMT_LIBS"
|
|||
AC_SUBST(LUMIERA_CFLAGS)
|
||||
AC_SUBST(LUMIERA_LIBS)
|
||||
|
||||
#functions from realtime library
|
||||
AC_LANG_PUSH([C])
|
||||
|
||||
AC_CHECK_FUNCS(clock_gettime,
|
||||
AC_MSG_NOTICE([clock_gettime is in the clib]),
|
||||
AC_CHECK_LIB(rt, clock_gettime,
|
||||
[LUMIERA_LIBS="$LUMIERA_LIBS -lrt"],
|
||||
AC_MSG_ERROR([No library providing clock_gettime found])
|
||||
)
|
||||
)
|
||||
|
||||
AC_LANG_POP([C])
|
||||
|
||||
#boost
|
||||
# C++ headers and libraries
|
||||
|
|
|
|||
Loading…
Reference in a new issue