mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
(trunk) #4041 "FTBFS with enabled uTP on Debian" -- revised patch from taem which unbreaks autoconf build on darwin as reported by leena
This commit is contained in:
parent
6e84fb89fa
commit
9537b636ce
1 changed files with 9 additions and 11 deletions
20
configure.ac
20
configure.ac
|
@ -195,16 +195,6 @@ AC_TRY_LINK([#include <stdarg.h>], [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
|
||||
|
|
Loading…
Reference in a new issue