macro `AM_PATH_CPPUNIT' not found in library
You installed CPPUnit in a non-system place that's not searched by default, so oddly enough when running aclocal within the libtorrent build, it didn't know to look there. You can tell aclocal where to look with -I and I'm sure you can find a way to do that with autogen.sh in the middle.
You need to do an apt-get install libcppunit-dev