mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
#5805: Allow building against system libutp (patch by jbeich)
This commit is contained in:
parent
8c550a2734
commit
d254312cb1
1 changed files with 19 additions and 6 deletions
25
configure.ac
25
configure.ac
|
@ -211,17 +211,30 @@ AC_CHECK_LIB([rt],
|
||||||
|
|
||||||
AC_MSG_CHECKING([µTP])
|
AC_MSG_CHECKING([µTP])
|
||||||
build_utp="no"
|
build_utp="no"
|
||||||
if test "x$CXX" != "x" ; then
|
|
||||||
have_utp="yes"
|
ac_save_LIBS="$LIBS"
|
||||||
else
|
LIBS="-lutp"
|
||||||
have_utp="no"
|
AC_LINK_IFELSE(
|
||||||
fi
|
[AC_LANG_PROGRAM([#include <libutp/utp.h>],
|
||||||
|
[struct UTPFunctionTable func;])],
|
||||||
|
[have_utp="yes"],
|
||||||
|
[have_utp="no"]
|
||||||
|
)
|
||||||
|
LIBS=$ac_save_LIBS
|
||||||
|
|
||||||
AC_ARG_ENABLE([utp],
|
AC_ARG_ENABLE([utp],
|
||||||
AS_HELP_STRING([--enable-utp],[build µTP support]),
|
AS_HELP_STRING([--enable-utp],[build µTP support]),
|
||||||
[want_utp=${enableval}],
|
[want_utp=${enableval}],
|
||||||
[want_utp=${have_utp}])
|
[want_utp=${have_utp}])
|
||||||
if test "x$want_utp" = "xyes" ; then
|
if test "x$want_utp" = "xyes"; then
|
||||||
if test "x$have_utp" = "xyes"; then
|
if test "x$have_utp" = "xyes"; then
|
||||||
|
dnl Would be lovely if it had pkgconfig
|
||||||
|
LIBUTP_CFLAGS=""
|
||||||
|
LIBUTP_LIBS="-lutp $libutp_extra_libs"
|
||||||
|
LIBUTP_LIBS_QT="-lutp $libutp_extra_libs"
|
||||||
|
AC_DEFINE([WITH_UTP],[1])
|
||||||
|
build_utp="system"
|
||||||
|
elif test "x$CXX" != "x"; then
|
||||||
LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
|
LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
|
||||||
LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a"
|
LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a"
|
||||||
LIBUTP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libutp/libutp.a"
|
LIBUTP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libutp/libutp.a"
|
||||||
|
|
Loading…
Reference in a new issue