Commit Graph

325 Commits (1849ccfbba57038f1fa57fd0621b80e77a198a4c)

Author SHA1 Message Date
Nils Maier 337d8ac929 Allow using libgmp with AppleTLS/WinTLS 2013-12-09 08:28:56 +01:00
Nils Maier 3096601ffe Fix static builds on darwin 2013-12-05 17:47:54 +01:00
Tatsuhiro Tsujikawa cdbd4f0095 Adjust libtool and linker flags
Since we use libtool, -static-libgcc and -static-libstdc++ are
stripped by libtool and not used. We just use -all-static libtool flag
for this purpose.

To create windows dll, it turns out that we need -no-undefined flag.
2013-10-24 00:13:05 +09:00
Tatsuhiro Tsujikawa 0d0a8a1c35 Bump up version number to 1.18.1 2013-10-20 22:03:10 +09:00
Nils Maier 00dd83b461 Implement WinTLS 2013-09-30 13:53:21 +02:00
Nils Maier 99f170b888 Provide internal ARC4 implementation
Now you can build bittorrent support without without external
libraries, meaning you can skip libnettle, libgmp, libgcrypt, GnuTLS and
OpenSSL on OSX (for now).
2013-09-24 19:11:26 +02:00
Nils Maier e854463b2d Internal implementation of DHKeyExchange
Reusing a bignum (well, unsigned very-long) implementation I had lying
around for years and just cleaned up a bit and brought to C++11 land.

It might not be the most performant implementation, but it shoud be fast
enough for our purposes and will go a long way of removing gcrypt,
nettle, gmp, openssl dependencies when using AppleTLS and WinTLS
(upcoming).
2013-09-24 19:11:00 +02:00
Nils Maier 7cb69c4d9e Add --disable-ssl configure option 2013-09-20 23:06:50 +02:00
Nils Maier 38bdea4e06 Add internal md5 and sha1 message digests 2013-09-20 23:06:50 +02:00
Nils Maier a1deb0e9f1 Only use AppleMessageDigest when using AppleTLS 2013-09-20 23:06:50 +02:00
Nils Maier a4e29303ef WinTLS: Implement messsage digest using the Cryptography Provider 2013-09-20 23:06:49 +02:00
Tatsuhiro Tsujikawa e3a41a51da Fix link error with Android NDK r9
Since Android ndk r9, __set_errno is deprecated. It is now defined as
inline function in errno.h. The syscall assembly calls __set_errno,
but since libc.so does not export it, the link fails. To workaround
this, replace all occurrences of __set_errno with a2_set_errno and
define it as normal C function.
2013-09-18 23:10:25 +09:00
Tatsuhiro Tsujikawa 4bd4aa2dc3 mingw: Deactivate __USE_MINGW_ANSI_STDIO
Deactivate __USE_MINGW_ANSI_STDIO because it causes lots of errors for
PRId64.
2013-09-10 01:25:28 +09:00
Tatsuhiro Tsujikawa 9a164bb4b1 Bump up version number to 1.18.0 2013-09-08 16:41:56 +09:00
Nils Maier 3b0ad59ee5 Use AM subdir-objects
Doing so in AM_INIT_AUTOMAKE seems to be the most compatible way of
doing so.

Closes GH-120
2013-08-25 16:17:05 +02:00
Nils Maier c3b42da8d9 AM_SILENT_RULES([yes]) with backwards-compatiblity
Supported since automake-1.11. There is no point in having the very
verbose compile stuff running about, which cannot even silenced properly
with `make -s` by default. Otherwise, `make V=1` or
`--disable-silent-rules` are your friends
2013-08-24 19:44:12 +02:00
Nils Maier a3f86f313e Fix automake-1.14 am_aux_dir
AC_USE_SYSTEM_EXTENSIONS will cause AC_PROG_CC, which is overridden by
automake-1.14, which will then init (part) of automake, in particular
am_aux_dir expansion, which in turn relies on ac_aux-dir, which is not
initialized at this point, and thus: certain doom (or fun, depending on
your POV and mood :p)

Hence call AC_USE_SYSTEM_EXTENSIONS only after AM_INIT_AUTOMAKE. This,
of course, caused a lot of related macro shuffling.

Tested against automake-1.10 (OSX Lion/XCode version) and automake-1.14
(homebrew version)
2013-08-24 19:43:28 +02:00
Nils Maier 2dd14236a3 Require external gettext for --enable-nls
And stop using the internal flavor with ./intl
2013-08-24 10:51:21 +02:00
Nils Maier b888088dc3 Make the configure check for C++11 compiler mandatory
Remove stray "dnl", so that mandatory actually works with (my)
autoreconf.
2013-08-21 23:19:01 +02:00
Nils Maier 322bd45cfb Check for sphinx-build during configure 2013-08-18 05:27:17 +02:00
Nils Maier a982dee961 Switch CA_BUNDLE to AC_DEFINE 2013-08-16 22:32:16 +02:00
Nils Maier 303f987ee9 Add --with-disk-cache configure option
Enables packagers more fine grained control over the default value
without having to mess with config files.

See GH-115
2013-08-16 22:31:56 +02:00
Nils Maier 90c39522a2 Libuv: Compatiblity fix with master 2013-08-16 22:29:14 +02:00
Tatsuhiro Tsujikawa 28d5c7408f Check that C++ compiler supports override keyword
If the compiler supports override, define CXX11_OVERRIDE as override,
otherwise define it as empty. Use CXX11_OVERRIDE instead of override.
2013-07-06 15:54:03 +09:00
Tatsuhiro Tsujikawa d1a17e5ef3 Use AX_CXX_COMPILE_STDCXX_11 macro to detect C++0x/C++11 support in compiler 2013-06-22 21:43:31 +09:00
Tatsuhiro Tsujikawa 07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa 61a830c905 Bump up version 1.17.1 2013-05-18 19:01:40 +09:00
Tatsuhiro Tsujikawa 13e064e4e1 Add code to detect rst2html.py or rst2html 2013-05-17 21:38:51 +09:00
Tatsuhiro Tsujikawa 5bc5665c6a Support off64_t for Android build
Android NDK R8e does not provide ftruncate64, but bionic has the
assembler code to access kernel function. We borrowed those
ftruncate64.S files from android source code repository.  It turns out
that x86 asm.h in NDK R8e is also broken, so latest asm.h was also
borrowed.
2013-05-06 19:12:17 +09:00
Tatsuhiro Tsujikawa 774e1b8a10 Check zlib availability usin AC_CHECK_LIB
This is workaround for zlib 1.2.3 which does not come with pkg-config
file.
2013-05-05 17:31:41 +09:00
Tatsuhiro Tsujikawa 1b920e4011 Add --enable-libaria2 configure option
By default, libaria2 feature is disabled. Use --enable-libaria2
to enable it. libaria2 static build is also disabled by default.
Use --enable-static to enable it.
2013-05-05 00:37:11 +09:00
Tatsuhiro Tsujikawa 2bf2dba544 Merge branch 'libaria2' 2013-05-05 00:13:17 +09:00
Tatsuhiro Tsujikawa b886ade311 Merge branch 'mallocs' of https://github.com/nmaier/aria2 into nmaier-mallocs 2013-05-01 11:32:04 +09:00
Nils Maier cc8b006a8e mallocs: Remove bogus pkg-config _LDFLAGS lines 2013-04-30 21:55:13 +02:00
Tatsuhiro Tsujikawa db2e22132d Merge branch 'libuv-eventpoll' of https://github.com/nmaier/aria2 into nmaier-libuv-eventpoll 2013-04-30 14:53:42 +09:00
Nils Maier d2c1fbd792 Add configure support for linking tcmalloc_minimal and/or jemalloc
Both tcmalloc_minimal and jemalloc outperform the native malloc
implemention on Windows (MSVCRT) in terms of committed memory
consumption (~-30%) and performance (e.g. far less page faults, ~-60%),
depending, of course, on the actual workload.
The longer the download queue, the bigger the impact ;)

On *nix the picture is a little different... tcmalloc usually still
outperforms the native malloc implementation, but not that significantly
than on Windows. jemalloc however is only marginally better than recent
native Linux implementations, while it is already used by some BSD as the
native allocator.

tcmalloc is part of gperftools and very mature and tested by now. It
doesn't work on OSX in the default configuration, however.
http://code.google.com/p/gperftools/

jemalloc is the default allocator at least on FreeBSD and NetBSD and
used in Firefox.
http://www.canonware.com/jemalloc/index.html
2013-04-28 21:35:22 +02:00
Tatsuhiro Tsujikawa bbb978948d Add preliminary libtool files for libaria2 2013-04-25 11:38:26 +09:00
Tatsuhiro Tsujikawa e548a1a225 Add missing check for sigaction 2013-04-25 11:38:02 +09:00
Nils Maier 0cccc2d27a Libuv: Proper configure detection 2013-04-17 15:53:24 +02:00
Tatsuhiro Tsujikawa 71713709e5 Bump up version number to 1.17.0 2013-04-16 21:30:28 +09:00
Tatsuhiro Tsujikawa 994eb551f1 Append --static to pkg-config arguments when ARIA2_STATIC=yes 2013-04-13 00:47:38 +09:00
Nils Maier 9acd3df3cb LibUV: Implement LibuvEventPoll
LibUV event will use the best available polling method on a system, kind
of like aria2 does already with the different *EventPoll
implementations.
However, libuv may support different/newer polling mechanisms; for
example on Windows it will use IO Completion Ports which are superior to
select() ;)
2013-04-10 08:47:20 +02:00
Tatsuhiro Tsujikawa e6d75020ea Fix openssl build 2013-04-06 16:04:58 +09:00
Nils Maier 0bcbd947b4 AppleTLS: Implement AppleTLS and Apple Message Digest 2013-04-05 23:10:47 +02:00
Tatsuhiro Tsujikawa 7994894172 Don't add Windows native DLLs for Cygwin build 2013-04-05 00:58:26 +09:00
Tatsuhiro Tsujikawa b9fb15f884 Use GetAdaptersAddresses for Mingw 2013-03-31 18:02:46 +09:00
Tatsuhiro Tsujikawa d2a171b2cb Bump up version number to 1.16.5 2013-03-24 17:45:45 +09:00
Tatsuhiro Tsujikawa 0309d67aab Echo CC, CXX and CPP at the end of configure 2013-03-18 23:41:03 +09:00
Tatsuhiro Tsujikawa bf10925fc3 Bump up version number to 1.16.4 2013-03-06 00:51:33 +09:00
Nils Maier 4d6bf959a6 Make configure argument meaning more consistent and obvious.
Most other software uses --disable/--without for features it does build
or at least check by default.

Change aria2 configure options so that:
 * --enable-*: do not build by default, unless --enable specified
 * --disable-*: check and build by default, unless --disable specified
 * --with-*: do not use by default, unless --with specified
 * --without-*: check and use by default, unless without specified
2013-03-03 15:01:21 +01:00
Tatsuhiro Tsujikawa 7c66d1952a Merge branch 'mingw-signal' of https://github.com/nmaier/aria2 into nmaier-mingw-signal 2013-03-03 13:28:51 +09:00
Nils Maier f2f8b14047 Support for gzipped -i and --save-session
Saved sessions may very large, as in hundreds and even thousands of
megabyte when dealing with large queues.
Add support to save and reload sessions to gzipped files, when libz is
available.

The session serializer will output gzipped contents when the file ends
with .gz, while the input file reader (UriListParser) will accept
whatever is thrown at it.
2013-03-02 15:48:26 +01:00
Nils Maier 8aa1db682b Check for sys/signal.h and/or signal.h
mingw-w64 does not actually have sys/signal.h, while OSX currently has a
broken signal.h
Better check the presence of both and use sys/signal.h if present, else
signal.h
2013-03-02 15:09:54 +01:00
Tatsuhiro Tsujikawa e8491b989b Add Portuguese manual
This translation is based on aria2 version 1.15.2 manual.
Contributed by Gilberto dos Santos Alves
2013-02-19 23:22:22 +09:00
Tatsuhiro Tsujikawa d1c88fbabf Bump up version number to 1.16.3 2013-02-03 19:29:03 +09:00
Tatsuhiro Tsujikawa a503481701 Bump up version number to 1.16.2 2013-01-29 21:39:41 +09:00
Tatsuhiro Tsujikawa 8ba0d58ee1 Vectorized write for SocketBuffer to avoid small packet 2013-01-11 16:50:04 +09:00
Tatsuhiro Tsujikawa 3e656fd6d1 Bump up version number to 1.16.1 2012-12-07 01:02:36 +09:00
Tatsuhiro Tsujikawa 7e59e2dbb5 mingw32: Open file using _wsopen and added --enable-mmap support
I tried CreateFile but the subsequent ReadFile fails with Access
Denied if sparse file is read on NTFS. I mostly reverted previous
changes and use _wsopen with read/write share enabled instead of
CreateFile.

This change also includes --enable-mmap support for MinGW32
build. Memory mapped file may be useful for 64-bits OS and lots of
RAM. Currently, FlushViewOfFile is not called during the download, so
it is slightly vulnerable against sudden power loss. I found lots of
read when resuming download due to page fault. So for now it is useful
for the initial download. I recommend not to use
--file-allocation=prealloc with --enable-mmap for MinGW32, because it
triggers page faults even in the initial download. Anyway, the option
is experimental.
2012-12-01 19:38:30 +09:00
Tatsuhiro Tsujikawa e1c03e30dd Don't use AC_FUNC_MMAP
Don't use AC_FUNC_MMAP becaue it fails on some platforms (e.g.,
OpenWRT) which have mmap and it works in the way we use in aria2.
Instead use mmap in AC_CHECK_FUNCS list.
2012-11-25 22:50:25 +09:00
Tatsuhiro Tsujikawa f4f6ecda37 Bump up version number to 1.16.0 2012-10-31 16:47:26 +09:00
Tatsuhiro Tsujikawa 674581a8d6 Add -lstdc++ -lsupc++ in configure.ac not in android-config
Also make sure that those flags do not appear in libwslay LIBS.
2012-07-30 21:17:49 +09:00
Tatsuhiro Tsujikawa 4046f27ea9 Use system-wide certificates for SSL
Use system-wide certificates for SSL.  For GnuTLS it requires the
latest version, 3.0.20. OpenSSL had it for longer.  This means that if
SSL library is properly configured to locate system-wide certificates
store, the user don't have to use --ca-certificate option. Also
packagers don't have to use --with-ca-bundle configure option.

Patch from Cristian Morales Vega
2012-07-05 23:22:34 +09:00
Tatsuhiro Tsujikawa 62b988c8fc Added check for sys/types.h 2012-07-03 21:50:32 +09:00
Tatsuhiro Tsujikawa 19b07d05f1 Bump up version number to 1.15.2 2012-06-30 21:44:59 +09:00
Tatsuhiro Tsujikawa e26d3bbe04 Added ARIA2_STATIC precious variable to configure option.
To build statically linked aria2 binary, give ARIA2_STATIC=yes to
configure, like this:

$ ./configure ARIA2_STATIC=yes
2012-06-27 00:06:27 +09:00
Tatsuhiro Tsujikawa 36051cca5e Handle sockaddr_in.sin_len and sockaddr_in6.sin6_len
Check sockaddr_in.sin_len and sockaddr_in6.sin6_len are available and
assign values to them properly.  This change fixes unit test error and
most error related to getnameinfo() on netbsd.
2012-05-16 22:43:25 +09:00
Tatsuhiro Tsujikawa ca60020fa4 Removed dependency on inet_aton
Implemented inetPton as a replacement of inet_aton. inetPton is
implemented using net::getBinAddr.

This change fixes bug#3525424.
2012-05-14 01:17:50 +09:00
Tatsuhiro Tsujikawa 3640374f66 Bump up version number to 1.15.1 2012-05-12 19:30:51 +09:00
Tatsuhiro Tsujikawa 57519611ff Added --with-bashcompletiondir configure option.
By default, bash_completion file named aria2c is installed to the
directory $prefix/share/doc/aria2/bash_completion.  To change the
install directory of the file, use --with-bashcompletiondir option.
2012-05-12 19:19:57 +09:00
Tatsuhiro Tsujikawa 4a5f2b6f9f Use Sphinx for aria2 manual page documentation.
The source files for manual pages are placed under doc/manual-src.
The built manual pages are placed under doc/manual.
When installed, manual pages are placed under $(docdir)/manual/.
2012-04-22 21:21:26 +09:00
Tatsuhiro Tsujikawa fcbdecfd1e Conditional compile for WebSocket.
WebSocket support depends on Message Digest support.
2012-04-08 00:50:25 +09:00
Tatsuhiro Tsujikawa 9996d4ef4b Removed -lcrypto from mingw LIBS 2012-04-07 23:55:53 +09:00
Tatsuhiro Tsujikawa e5932879db Print pkg-config error if the module is not available 2012-04-07 21:43:03 +09:00
Tatsuhiro Tsujikawa 7e5814f0f9 Check with pkg-config only: c-ares, openssl, sqlite3 and zlib.
Removed --with-*-prefix configure option for c-ares, openssl, sqlite3,
zlib and expat. Use CPPFLAGS and/or PKG_CONFIG_PATH instead.
2012-04-07 21:30:32 +09:00
Tatsuhiro Tsujikawa 840ca5adb6 Check availability of pwd.h 2012-04-07 15:49:22 +09:00
Tatsuhiro Tsujikawa 332bda83b4 Enable TCP_NODELAY for WebSocket connection. 2012-03-21 02:08:18 +09:00
Tatsuhiro Tsujikawa bdd37fe3de Bump up version number to 1.15.0 2012-03-21 01:37:16 +09:00
Tatsuhiro Tsujikawa 6eb5283bca Added AC_CONFIG_MACRO_DIR 2012-03-21 00:49:52 +09:00
Tatsuhiro Tsujikawa 41c77ab852 Fixed autoreconf warning 2012-03-21 00:43:18 +09:00
Tatsuhiro Tsujikawa ac26124b59 Fixed `make distcheck` error 2012-03-20 22:43:06 +09:00
Tatsuhiro Tsujikawa f4e2c7f060 Added JSON-RPC over WebSocket.
Wslay library must be placed under deps/wslay.
2012-03-20 21:42:09 +09:00
Tatsuhiro Tsujikawa b8121faf93 Bump up version number to 1.14.2 2012-02-05 17:13:03 +09:00
Tatsuhiro Tsujikawa 57b2336e58 Bump up version number to 1.14.1 2012-01-08 17:52:25 +09:00
Tatsuhiro Tsujikawa 49f94e537c Bump up version number to 1.14.0 2011-12-18 17:17:02 +09:00
Tatsuhiro Tsujikawa 440f29aca3 Rewritten Metalink XML parser.
Now we don't strip white spaces while parsing Metalink V3 document.
Expat implementation does not included in this change.
2011-11-10 22:38:01 +09:00
Tatsuhiro Tsujikawa 5ce9af94ce Check libgcrypt version is greater or equal to required version.
This will fixes Debian bug#642989.
2011-09-28 23:40:34 +09:00
Tatsuhiro Tsujikawa 3c73b6e767 Eliminated inet_ntoa and inet_ntop. Use getnameinfo() instead. 2011-08-20 21:53:48 +09:00
Tatsuhiro Tsujikawa af46293ef9 Use utimes instead of utime if utimes is available. 2011-08-19 22:35:15 +09:00
Tatsuhiro Tsujikawa d309c425a3 Bump up version number to 1.13.0 2011-08-19 21:05:58 +09:00
Tatsuhiro Tsujikawa e76dc28f7f Added libnettle and libgmp support.
libnettle and libgmp is used by default. Old implementation uses
libgcrypt as default. If more and more Linux distributions offer
libnettle linked GnuTLS, then this change decrease library dependency
against libgcrypt and libgpg-error.  The current library detection for
libnettle and libgmp is very simple, just use AC_SEARCH_LIBS.
util::generateRandomData() was written using SimpleRandomizer, thus no
external library dependency from this function.
2011-08-11 02:29:14 +09:00
Tatsuhiro Tsujikawa a10cda2f17 Use global::cout to output string to stdout.
In MinGW32 build, global::cout is WinConsoleFile. When outputing to
console, it uses WriteConsoleW, so Unicode characters are written.
Fixed memory leak in WChar<->MultiByte conversion functions.  The
portion of code which uses std::cout is rewritten to use global::cout.
2011-08-09 23:33:55 +09:00
Tatsuhiro Tsujikawa 6f2b0a269d Bump up version number to 1.12.1 2011-07-23 19:25:42 +09:00
Tatsuhiro Tsujikawa 068fb5798d Bump up version number to 1.12.0 2011-06-21 22:42:31 +09:00
Tatsuhiro Tsujikawa b95f0928f7 Added Russian translation of man page contributed by ITriskTI. 2011-06-21 21:38:34 +09:00
Tatsuhiro Tsujikawa e958f5dab3 Implemented fast file allocation in MinGW32 build.
We use SetFilePointerEx and SetEndOfFile to allocate extents.  This
only works with NTFS. To enable this feature, --file-allocation=falloc
must be given.
2011-06-07 01:09:38 +09:00
Tatsuhiro Tsujikawa fbba1010ee Require gnutls >= 2.2.0 2011-05-20 20:45:09 +09:00
Tatsuhiro Tsujikawa 3ee4f372b7 Bump up version number to 1.11.2 2011-05-15 23:55:04 +09:00
Tatsuhiro Tsujikawa 3d87e4e43a Bump up version number to 1.11.1 2011-03-21 11:41:08 +09:00
Tatsuhiro Tsujikawa 09c120da9b Updated gettext to 0.18 2011-03-17 11:28:37 +09:00