From 497ad9c27385c02f4f038b6e787ada9c7b6f8373 Mon Sep 17 00:00:00 2001 From: hasufell Date: Wed, 9 Oct 2013 18:24:28 +0200 Subject: [PATCH] fix underlinking --- configure.ac | 20 ++++++++++++++++++++ src/Makefile.am | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9f402bd..4b923a9 100644 --- a/configure.ac +++ b/configure.ac @@ -893,6 +893,26 @@ fi echo "G729 AnnexB in RFC3389 is disabled." fi AM_CONDITIONAL(LIBBCG729,test x$g729bCN != xfalse) +dnl Check for clock_gettime, in libc for FreeBSD, in rt for linux, +dnl in rt for Solaris 7, in posix4 for Solaris 2.5.1 +LIB_CLOCK_GETTIME= +clk_saved_libs=$LIBS +AC_SEARCH_LIBS([clock_gettime], [rt posix4], + [test "$ac_cv_search_clock_gettime" = "none required" || + LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) +AC_SUBST([LIB_CLOCK_GETTIME]) + +AC_MSG_CHECKING([for working clock_gettime]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[clock_gettime(CLOCK_REALTIME, 0);]])], [gnupg_cv_clock_gettime=yes], [gnupg_cv_clock_gettime=no]) +AC_MSG_RESULT($gnupg_cv_clock_gettime) + +if test x"$gnupg_cv_clock_gettime" = xyes; then + AC_DEFINE([HAVE_CLOCK_GETTIME], 1, + [Define to 1 if you have the `clock_gettime' function.]) +fi +LIBS=$clk_saved_libs + dnl ################################################## dnl # Check for doxygen diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am 2015-03-22 14:54:22.241017401 +0500 +++ b/src/Makefile.am 2015-03-22 14:53:58.336018407 +0500 @@ -327,7 +327,7 @@ awk 'BEGIN { print("MSFilterDesc * ms_voip_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL\n};\n") } ' $(abs_builddir)/voipdescs.txt >> $(abs_builddir)/$@ -libmediastreamer_base_la_LIBADD = $(ORTP_LIBS) +libmediastreamer_base_la_LIBADD = $(ORTP_LIBS) @LIB_CLOCK_GETTIME@ libmediastreamer_base_la_LDFLAGS = -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION) libmediastreamer_voip_la_LDFLAGS = -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)