AC_PROG_CC
AC_PROG_CXX
+AC_CHECK_PROG([HAVE_CXX],[$CXX],[yes],[no])
AC_C_INLINE
if test "x$GCC" = "xyes" ; then
AC_MSG_CHECKING([µTP])
build_utp="no"
-if test "x$CXX" = "x" ; then
- have_utp="no"
-else
+if test "x$HAVE_CXX" = "xyes" ; then
have_utp="yes"
+else
+ have_utp="no"
fi
AC_ARG_ENABLE([utp],
AS_HELP_STRING([--enable-utp],[build µTP support]),
third-party/Makefile
third-party/miniupnp/Makefile
third-party/libnatpmp/Makefile
- third-party/libutp/Makefile
third-party/dht/Makefile
macosx/Makefile
gtk/Makefile
web/stylesheets/Makefile
po/Makefile.in])
+dnl Maybe build libutp...
+AM_CONDITIONAL([CONDITIONAL],[test "x$build_utp" = "xyes"])
+AM_COND_IF([CONDITIONAL],
+ [AC_CONFIG_FILES([third-party/libutp/Makefile])])
+
AC_OUTPUT
echo "
#include <event2/util.h>
-#include <libutp/utp.h>
-
#include "transmission.h"
#include "fdlimit.h" /* tr_fdSocketClose() */
#include "net.h"
#include <event2/buffer.h>
#include <event2/bufferevent.h>
-#include <libutp/utp.h>
-
#include "transmission.h"
#include "session.h"
#include "bandwidth.h"
#include "peer-common.h" /* MAX_BLOCK_SIZE */
#include "peer-io.h"
#include "trevent.h" /* tr_runInEventThread() */
+#include "tr-utp.h"
#include "utils.h"
#include <stdlib.h> /* qsort */
#include <event2/event.h>
-#include <libutp/utp.h>
#include "transmission.h"
#include "announcer.h"
#include "session.h"
#include "stats.h" /* tr_statsAddUploaded, tr_statsAddDownloaded */
#include "torrent.h"
+#include "tr-utp.h"
#include "utils.h"
#include "webseed.h"
#include <event2/event.h>
-#include <libutp/utp.h>
-
#include "transmission.h"
#include "net.h"
#include "session.h"
#ifndef _TR_UTP_H_
#define _TR_UTP_H_
+/* this is included *after* transmission.h s.t. we get bool defined */
+#include <libutp/utp.h>
+
int tr_utpPacket(const unsigned char *buf, size_t buflen,
const struct sockaddr *from, socklen_t fromlen,
tr_session *ss);
INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH}
INCLUDEPATH += $${TRANSMISSION_TOP}
LIBS += $${TRANSMISSION_TOP}/libtransmission/libtransmission.a
-exists( $${TRANSMISSION_TOP}/third-party/libutp/libutp.a ) {
+exists( $${TRANSMISSION_TOP}/third-party/libutp/Makefile ) {
LIBS += $${TRANSMISSION_TOP}/third-party/libutp/libutp.a
}
LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a
typedef const char * cstr;
typedef char * str;
-#ifndef __cplusplus
-typedef uint8 bool;
-#endif
-
#endif //__UTYPES_H__