From: Jordan Lee Date: Wed, 2 Mar 2011 07:31:14 +0000 (+0000) Subject: (trunk) #4041 "FTBFS with enabled uTP on Debian" -- revised patch from taem which... X-Git-Tag: 2.30b1~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9537b636ce50ab15753cfa0f64987f68147c2278;p=transmission (trunk) #4041 "FTBFS with enabled uTP on Debian" -- revised patch from taem which unbreaks autoconf build on darwin as reported by leena --- diff --git a/configure.ac b/configure.ac index 34206e383..31635c76a 100644 --- a/configure.ac +++ b/configure.ac @@ -195,16 +195,6 @@ AC_TRY_LINK([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);], ]) -dnl libevent likes to link against librt if possible -dnl for clock_gettime() and clock_settime() -dnl TODO(libevent2): this can probably be removed after -dnl we switch to libevent2, since it will have PKG_CONFIG -AC_CHECK_LIB([rt], - [clock_gettime], - [libevent_extra_libs="-lrt"], - [libevent_extra_libs=""]) - - dnl ---------------------------------------------------------------------------- dnl dnl dht @@ -219,6 +209,11 @@ dnl ---------------------------------------------------------------------------- dnl dnl utp +AC_CHECK_LIB([rt], + [clock_gettime], + [libutp_extra_libs="-lrt"], + [libutp_extra_libs=""]) + AC_MSG_CHECKING([µTP]) build_utp="no" if test "x$CXX" = "x" ; then @@ -233,7 +228,10 @@ AC_ARG_ENABLE([utp], if test "x$want_utp" = "xyes" ; then if test "x$have_utp" = "xyes"; then LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/" - LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a -lrt" + LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a" + if test "x$libutp_extra_libs" != "x" ; then + LIBUTP_LIBS="$LIBUTP_LIBS $libutp_extra_libs" + fi AC_DEFINE([WITH_UTP],[1]) build_utp="yes" else