1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-07 23:14:41 +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:
Jordan Lee 2011-02-25 01:44:32 +00:00
parent 957b14a7f6
commit 3136946851

View file

@ -219,18 +219,31 @@ dnl ----------------------------------------------------------------------------
dnl dnl
dnl utp 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], AC_ARG_ENABLE([utp],
AS_HELP_STRING([--enable-utp],[build µTP support]), AS_HELP_STRING([--enable-utp],[build µTP support]),
[build_utp=${enableval}], [want_utp=${enableval}],
[build_utp=no]) [want_utp=${have_utp}])
if test "x$build_utp" = "xyes" ; then if test "x$want_utp" = "xyes" ; then
if test "x$have_utp" = "xyes"; then
LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/" 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 -lrt"
AC_DEFINE([WITH_UTP],[1]) AC_DEFINE([WITH_UTP],[1])
build_utp="yes"
else
AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found")
fi
fi fi
AC_SUBST(LIBUTP_CFLAGS) AC_SUBST(LIBUTP_CFLAGS)
AC_SUBST(LIBUTP_LIBS) AC_SUBST(LIBUTP_LIBS)
AM_CONDITIONAL([BUILD_UTP],[test "x$build_utp" = "xyes"]) AM_CONDITIONAL([BUILD_UTP],[test "x$build_utp" = "xyes"])
AC_MSG_RESULT([$build_utp])
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------