configure.ac: check clock_gettime for glib < 2.17

glib < 2.17 doesn't support clock_gettime directly, it is available
via librt.

Change-Id: Ice853d85ffe859b1d4df48b91b050c24d85c861b
changes/07/7907/3
Alexander Couzens 5 years ago committed by Harald Welte
parent f69aa9cb6a
commit a2f696fa5c
  1. 4
      configure.ac
  2. 2
      src/Makefile.am

@ -68,6 +68,10 @@ AC_SUBST(LIBRARY_DLSYM)
AC_CHECK_LIB(execinfo, backtrace, BACKTRACE_LIB=-lexecinfo, BACKTRACE_LIB=)
AC_SUBST(BACKTRACE_LIB)
# check for old glibc < 2.17 to get clock_gettime
AC_SEARCH_LIBS([clock_gettime], [rt posix4], [LIBRARY_RT="$LIBS";LIBS=""])
AC_SUBST(LIBRARY_RT)
AC_ARG_ENABLE(doxygen,
[AS_HELP_STRING(
[--disable-doxygen],

@ -12,7 +12,7 @@ endif
lib_LTLIBRARIES = libosmocore.la
libosmocore_la_LIBADD = $(BACKTRACE_LIB) $(TALLOC_LIBS)
libosmocore_la_LIBADD = $(BACKTRACE_LIB) $(TALLOC_LIBS) $(LIBRARY_RT)
libosmocore_la_SOURCES = timer.c timer_gettimeofday.c timer_clockgettime.c \
select.c signal.c msgb.c bits.c \
bitvec.c bitcomp.c counter.c fsm.c \

Loading…
Cancel
Save