mirror of
https://github.com/transmission/transmission
synced 2025-02-07 15:04:13 +00:00
(trunk) #2338 "Add uTP support" -- have the autoconf system default to build uTP support iff a C++ compiler can be found by AC_PROG_CXX
This commit is contained in:
parent
957b14a7f6
commit
3136946851
1 changed files with 20 additions and 7 deletions
25
configure.ac
25
configure.ac
|
@ -219,18 +219,31 @@ dnl ----------------------------------------------------------------------------
|
|||
dnl
|
||||
dnl utp
|
||||
|
||||
AC_MSG_CHECKING([µTP])
|
||||
build_utp="no"
|
||||
if test "x$CXX" = "x" ; then
|
||||
have_utp="no"
|
||||
else
|
||||
have_utp="yes"
|
||||
fi
|
||||
AC_ARG_ENABLE([utp],
|
||||
AS_HELP_STRING([--enable-utp],[build µTP support]),
|
||||
[build_utp=${enableval}],
|
||||
[build_utp=no])
|
||||
if test "x$build_utp" = "xyes" ; then
|
||||
LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
|
||||
LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a -lrt"
|
||||
AC_DEFINE([WITH_UTP],[1])
|
||||
[want_utp=${enableval}],
|
||||
[want_utp=${have_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"
|
||||
AC_DEFINE([WITH_UTP],[1])
|
||||
build_utp="yes"
|
||||
else
|
||||
AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found")
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LIBUTP_CFLAGS)
|
||||
AC_SUBST(LIBUTP_LIBS)
|
||||
AM_CONDITIONAL([BUILD_UTP],[test "x$build_utp" = "xyes"])
|
||||
AC_MSG_RESULT([$build_utp])
|
||||
|
||||
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue