2006-02-17 13:35:04 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
#
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_PREREQ(2.61)
|
2008-09-05 13:18:39 +00:00
|
|
|
AC_INIT(aria2c, 0.16.0b, t-tujikawa@users.sourceforge.net)
|
2007-07-23 13:04:48 +00:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_SYSTEM
|
2006-02-17 13:35:04 +00:00
|
|
|
AM_INIT_AUTOMAKE()
|
|
|
|
AM_PATH_CPPUNIT(1.10.2)
|
|
|
|
AC_CONFIG_SRCDIR([src/Socket.h])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2006-02-18 07:47:08 +00:00
|
|
|
|
2007-07-23 13:04:48 +00:00
|
|
|
case "$target" in
|
2008-06-29 15:35:04 +00:00
|
|
|
*mingw*|*cygwin*)
|
|
|
|
WINSOCK_LIBS="-lws2_32 -lpthread"
|
|
|
|
AC_SUBST(WINSOCK_LIBS)
|
|
|
|
;;
|
2007-07-23 13:04:48 +00:00
|
|
|
esac
|
|
|
|
|
2007-11-14 10:10:38 +00:00
|
|
|
AC_DEFINE_UNQUOTED([TARGET], ["$target"], [Define target-type])
|
|
|
|
|
2006-03-05 06:32:01 +00:00
|
|
|
# Set localedir
|
|
|
|
localedir=${datadir}/locale
|
|
|
|
AC_SUBST(localedir)
|
|
|
|
|
2006-02-18 07:47:08 +00:00
|
|
|
# Checks for arguments.
|
2008-06-29 14:35:32 +00:00
|
|
|
ARIA2_ARG_WITH([gnutls])
|
|
|
|
ARIA2_ARG_WITH([openssl])
|
2008-08-17 10:44:12 +00:00
|
|
|
ARIA2_ARG_WITH([sqlite3])
|
2008-06-29 14:35:32 +00:00
|
|
|
ARIA2_ARG_WITH([libxml2])
|
|
|
|
ARIA2_ARG_WITH([libexpat])
|
|
|
|
ARIA2_ARG_WITH([libares])
|
|
|
|
ARIA2_ARG_WITH([libcares])
|
2008-06-29 14:29:36 +00:00
|
|
|
ARIA2_ARG_WITH([libz])
|
2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* configure.in: Added gnutls support. Added several CPP macros.
* m4/openssl.m4: Added.
* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
readData(), peekData(). Added gnutls support.
* src/HttpDownloadCommand.cc: Removed SleepCommand.h
* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
TrackerInitCommand periodicaly(TorrentMan::minInterval).
* src/TorrentMan.cc: Remove downloadedSize == 0 check from
save().
Instead, added a check for whether setup method has executed
successfully.
* src/TorrentMan.h: Added member vaiable setupComplete. Updated
DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to
300.
* src/Makefile.am: Updated.
* src/messageDigest.h: Added. This is a macro calculating SHA1
digest
using whether OpenSSL or gcrypt, depending on the result of
configure
script.
* src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by
using
messageDigest.h.
* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
* src/PeerListenCommand.cc: Added log about port binded
successfully.
Fixed memory leak.
* src/main.cc: Added gnutls support. Replaced LIB_SSL with
ENABLE_BITTORRENT where they are not related to OpenSSL but
BitTorrent.
Removed instantiation of TrackerInitCommand. Instead,
TrackerWatcherCommand is instantiated and pushed to the command
queue.
* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL
with
ENABLE_SSL.
* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
* src/RequestSlotMan.cc:
(deleteCompletedRequestSlot)
If a piece is already acquired by another command, delete the
request
slots for the piece.
* src/TrackerUpdateCommand.cc:
(execute)
Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to
warn.
Added a check whether peer list is null.
Fixed the bug that causes sending completed event to the tracker
several times.
* src/TrackerInitCommand.cc:
(execute)
Fixed the bug that causes sending completed event to the tracker
several times.
* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on
OpenSSL
by using messageDigest.h.
2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* PeerConnection.cc: Replaced log message "keep-alive" with
"keep alive".
* PeerInteractionCommand.{h,cc}: Close connection if peer is
choking
localhost long time.
* TorrentMan.cc: When adding new peer with duplicate = true, if
the
number of peer list is equal to or grater than MAX_PEER_LIST,
delete
at most 100 failure entry from the list. If with duplicate =
false,
MAX_PEER_LIST is not checked.
* PeerListenCommand.cc: Fixed the argument order of log message.
2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
Added warn().
* SimpleLogger.h: Moved enum LEVEL to Logger.h.
Implemented warn().
Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated
code.
2006-03-27 14:47:26 +00:00
|
|
|
|
2008-06-29 14:35:32 +00:00
|
|
|
ARIA2_ARG_ENABLE([bittorrent])
|
|
|
|
ARIA2_ARG_ENABLE([metalink])
|
|
|
|
ARIA2_ARG_ENABLE([epoll])
|
2006-02-18 07:47:08 +00:00
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CC
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_PROG_INSTALL
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_PROG_MKDIR_P
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_YACC
|
2006-02-17 13:35:04 +00:00
|
|
|
|
2007-11-25 04:41:31 +00:00
|
|
|
# Setting language choice
|
|
|
|
AC_LANG([C++])
|
|
|
|
|
2007-12-14 00:46:32 +00:00
|
|
|
# Check for GNU library
|
|
|
|
AC_GNU_SOURCE
|
|
|
|
|
2008-02-02 04:38:24 +00:00
|
|
|
# Enable system extensions
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
# Checks for libraries.
|
2006-07-03 14:19:23 +00:00
|
|
|
if test "x$with_libxml2" = "xyes"; then
|
2008-06-29 15:35:04 +00:00
|
|
|
AM_PATH_XML2([2.6.24], [have_libxml2=yes])
|
|
|
|
if test "x$have_libxml2" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have libxml2.])
|
|
|
|
fi
|
2006-07-03 14:19:23 +00:00
|
|
|
fi
|
|
|
|
|
2007-12-14 00:46:32 +00:00
|
|
|
if test "x$with_libexpat" = "xyes" && test "x$have_libxml2" != "xyes"; then
|
|
|
|
AM_PATH_LIBEXPAT
|
|
|
|
fi
|
|
|
|
|
2008-08-17 10:44:12 +00:00
|
|
|
if test "x$with_sqlite3" = "xyes"; then
|
|
|
|
AM_PATH_SQLITE3
|
|
|
|
fi
|
|
|
|
|
2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* configure.in: Added gnutls support. Added several CPP macros.
* m4/openssl.m4: Added.
* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
readData(), peekData(). Added gnutls support.
* src/HttpDownloadCommand.cc: Removed SleepCommand.h
* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
TrackerInitCommand periodicaly(TorrentMan::minInterval).
* src/TorrentMan.cc: Remove downloadedSize == 0 check from
save().
Instead, added a check for whether setup method has executed
successfully.
* src/TorrentMan.h: Added member vaiable setupComplete. Updated
DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to
300.
* src/Makefile.am: Updated.
* src/messageDigest.h: Added. This is a macro calculating SHA1
digest
using whether OpenSSL or gcrypt, depending on the result of
configure
script.
* src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by
using
messageDigest.h.
* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
* src/PeerListenCommand.cc: Added log about port binded
successfully.
Fixed memory leak.
* src/main.cc: Added gnutls support. Replaced LIB_SSL with
ENABLE_BITTORRENT where they are not related to OpenSSL but
BitTorrent.
Removed instantiation of TrackerInitCommand. Instead,
TrackerWatcherCommand is instantiated and pushed to the command
queue.
* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL
with
ENABLE_SSL.
* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
* src/RequestSlotMan.cc:
(deleteCompletedRequestSlot)
If a piece is already acquired by another command, delete the
request
slots for the piece.
* src/TrackerUpdateCommand.cc:
(execute)
Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to
warn.
Added a check whether peer list is null.
Fixed the bug that causes sending completed event to the tracker
several times.
* src/TrackerInitCommand.cc:
(execute)
Fixed the bug that causes sending completed event to the tracker
several times.
* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on
OpenSSL
by using messageDigest.h.
2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* PeerConnection.cc: Replaced log message "keep-alive" with
"keep alive".
* PeerInteractionCommand.{h,cc}: Close connection if peer is
choking
localhost long time.
* TorrentMan.cc: When adding new peer with duplicate = true, if
the
number of peer list is equal to or grater than MAX_PEER_LIST,
delete
at most 100 failure entry from the list. If with duplicate =
false,
MAX_PEER_LIST is not checked.
* PeerListenCommand.cc: Fixed the argument order of log message.
2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
Added warn().
* SimpleLogger.h: Moved enum LEVEL to Logger.h.
Implemented warn().
Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated
code.
2006-03-27 14:47:26 +00:00
|
|
|
if test "x$with_gnutls" = "xyes"; then
|
|
|
|
AM_PATH_LIBGNUTLS([1.2.9], [have_libgnutls=yes])
|
|
|
|
if test "x$have_libgnutls" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define to 1 if you have libgnutls.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$have_libgnutls" = "xyes"; then
|
|
|
|
AM_PATH_LIBGCRYPT([1.2.2], [have_libgcrypt=yes])
|
|
|
|
if test "x$have_libgcrypt" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then
|
|
|
|
AM_PATH_OPENSSL
|
2006-02-18 07:47:08 +00:00
|
|
|
fi
|
2006-02-17 13:35:04 +00:00
|
|
|
|
2006-08-21 13:18:51 +00:00
|
|
|
if test "x$with_libcares" = "xyes"; then
|
|
|
|
AM_PATH_LIBCARES
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$have_libcares" = "x"; then
|
|
|
|
if test "x$with_libares" = "xyes"; then
|
|
|
|
AM_PATH_LIBARES
|
|
|
|
fi
|
2006-08-11 12:29:55 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-29 15:35:04 +00:00
|
|
|
# Check availability of libz
|
2008-06-29 14:29:36 +00:00
|
|
|
if test "x$with_libz" = "xyes"; then
|
2008-06-29 15:35:04 +00:00
|
|
|
AM_PATH_LIBZ
|
2008-06-29 14:29:36 +00:00
|
|
|
fi
|
|
|
|
|
2006-07-04 10:57:56 +00:00
|
|
|
# Define variables based on the result of the checks for libraries.
|
2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* configure.in: Added gnutls support. Added several CPP macros.
* m4/openssl.m4: Added.
* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
readData(), peekData(). Added gnutls support.
* src/HttpDownloadCommand.cc: Removed SleepCommand.h
* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
TrackerInitCommand periodicaly(TorrentMan::minInterval).
* src/TorrentMan.cc: Remove downloadedSize == 0 check from
save().
Instead, added a check for whether setup method has executed
successfully.
* src/TorrentMan.h: Added member vaiable setupComplete. Updated
DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to
300.
* src/Makefile.am: Updated.
* src/messageDigest.h: Added. This is a macro calculating SHA1
digest
using whether OpenSSL or gcrypt, depending on the result of
configure
script.
* src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by
using
messageDigest.h.
* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
* src/PeerListenCommand.cc: Added log about port binded
successfully.
Fixed memory leak.
* src/main.cc: Added gnutls support. Replaced LIB_SSL with
ENABLE_BITTORRENT where they are not related to OpenSSL but
BitTorrent.
Removed instantiation of TrackerInitCommand. Instead,
TrackerWatcherCommand is instantiated and pushed to the command
queue.
* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL
with
ENABLE_SSL.
* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
* src/RequestSlotMan.cc:
(deleteCompletedRequestSlot)
If a piece is already acquired by another command, delete the
request
slots for the piece.
* src/TrackerUpdateCommand.cc:
(execute)
Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to
warn.
Added a check whether peer list is null.
Fixed the bug that causes sending completed event to the tracker
several times.
* src/TrackerInitCommand.cc:
(execute)
Fixed the bug that causes sending completed event to the tracker
several times.
* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on
OpenSSL
by using messageDigest.h.
2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* PeerConnection.cc: Replaced log message "keep-alive" with
"keep alive".
* PeerInteractionCommand.{h,cc}: Close connection if peer is
choking
localhost long time.
* TorrentMan.cc: When adding new peer with duplicate = true, if
the
number of peer list is equal to or grater than MAX_PEER_LIST,
delete
at most 100 failure entry from the list. If with duplicate =
false,
MAX_PEER_LIST is not checked.
* PeerListenCommand.cc: Fixed the argument order of log message.
2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
Added warn().
* SimpleLogger.h: Moved enum LEVEL to Logger.h.
Implemented warn().
Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated
code.
2006-03-27 14:47:26 +00:00
|
|
|
if test "x$have_libgnutls" = "xyes" || test "x$have_openssl" = "xyes"; then
|
|
|
|
AC_DEFINE([ENABLE_SSL], [1], [Define to 1 if ssl support is enabled.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$have_libgcrypt" = "xyes" || test "x$have_openssl" = "xyes"; then
|
2008-06-29 15:35:04 +00:00
|
|
|
AC_DEFINE([ENABLE_MESSAGE_DIGEST], [1],
|
|
|
|
[Define to 1 if message digest support is enabled.])
|
2007-07-04 16:04:57 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_MESSAGE_DIGEST], true)
|
2006-07-04 10:57:56 +00:00
|
|
|
enable_message_digest=yes
|
2007-07-04 16:04:57 +00:00
|
|
|
else
|
|
|
|
AM_CONDITIONAL([ENABLE_MESSAGE_DIGEST], false)
|
2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* configure.in: Added gnutls support. Added several CPP macros.
* m4/openssl.m4: Added.
* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
readData(), peekData(). Added gnutls support.
* src/HttpDownloadCommand.cc: Removed SleepCommand.h
* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
TrackerInitCommand periodicaly(TorrentMan::minInterval).
* src/TorrentMan.cc: Remove downloadedSize == 0 check from
save().
Instead, added a check for whether setup method has executed
successfully.
* src/TorrentMan.h: Added member vaiable setupComplete. Updated
DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to
300.
* src/Makefile.am: Updated.
* src/messageDigest.h: Added. This is a macro calculating SHA1
digest
using whether OpenSSL or gcrypt, depending on the result of
configure
script.
* src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by
using
messageDigest.h.
* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
* src/PeerListenCommand.cc: Added log about port binded
successfully.
Fixed memory leak.
* src/main.cc: Added gnutls support. Replaced LIB_SSL with
ENABLE_BITTORRENT where they are not related to OpenSSL but
BitTorrent.
Removed instantiation of TrackerInitCommand. Instead,
TrackerWatcherCommand is instantiated and pushed to the command
queue.
* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL
with
ENABLE_SSL.
* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
* src/RequestSlotMan.cc:
(deleteCompletedRequestSlot)
If a piece is already acquired by another command, delete the
request
slots for the piece.
* src/TrackerUpdateCommand.cc:
(execute)
Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to
warn.
Added a check whether peer list is null.
Fixed the bug that causes sending completed event to the tracker
several times.
* src/TrackerInitCommand.cc:
(execute)
Fixed the bug that causes sending completed event to the tracker
several times.
* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on
OpenSSL
by using messageDigest.h.
2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* PeerConnection.cc: Replaced log message "keep-alive" with
"keep alive".
* PeerInteractionCommand.{h,cc}: Close connection if peer is
choking
localhost long time.
* TorrentMan.cc: When adding new peer with duplicate = true, if
the
number of peer list is equal to or grater than MAX_PEER_LIST,
delete
at most 100 failure entry from the list. If with duplicate =
false,
MAX_PEER_LIST is not checked.
* PeerListenCommand.cc: Fixed the argument order of log message.
2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
Added warn().
* SimpleLogger.h: Moved enum LEVEL to Logger.h.
Implemented warn().
Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated
code.
2006-03-27 14:47:26 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-29 15:35:04 +00:00
|
|
|
if test "x$enable_bittorrent" = "xyes" &&
|
|
|
|
test "x$enable_message_digest" = "xyes"; then
|
|
|
|
AC_DEFINE([ENABLE_BITTORRENT], [1],
|
|
|
|
[Define to 1 if BitTorrent support is enabled.])
|
|
|
|
AM_CONDITIONAL([ENABLE_BITTORRENT], true)
|
2006-07-04 10:57:56 +00:00
|
|
|
else
|
2008-06-29 15:35:04 +00:00
|
|
|
enable_bittorrent=no
|
|
|
|
AM_CONDITIONAL([ENABLE_BITTORRENT], false)
|
2006-07-04 10:57:56 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-29 15:35:04 +00:00
|
|
|
if (test "x$have_libxml2" = "xyes" || test "x$have_libexpat" = "xyes") &&
|
|
|
|
test "x$enable_metalink" = "xyes"; then
|
|
|
|
AC_DEFINE([ENABLE_METALINK], [1],
|
|
|
|
[Define to 1 if Metalink support is enabled.])
|
|
|
|
AM_CONDITIONAL([ENABLE_METALINK], true)
|
2006-07-04 10:57:56 +00:00
|
|
|
else
|
2008-06-29 15:35:04 +00:00
|
|
|
enable_metalink=no
|
|
|
|
AM_CONDITIONAL([ENABLE_METALINK], false)
|
2006-07-04 10:57:56 +00:00
|
|
|
fi
|
2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* configure.in: Added gnutls support. Added several CPP macros.
* m4/openssl.m4: Added.
* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
readData(), peekData(). Added gnutls support.
* src/HttpDownloadCommand.cc: Removed SleepCommand.h
* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
TrackerInitCommand periodicaly(TorrentMan::minInterval).
* src/TorrentMan.cc: Remove downloadedSize == 0 check from
save().
Instead, added a check for whether setup method has executed
successfully.
* src/TorrentMan.h: Added member vaiable setupComplete. Updated
DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to
300.
* src/Makefile.am: Updated.
* src/messageDigest.h: Added. This is a macro calculating SHA1
digest
using whether OpenSSL or gcrypt, depending on the result of
configure
script.
* src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by
using
messageDigest.h.
* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
* src/PeerListenCommand.cc: Added log about port binded
successfully.
Fixed memory leak.
* src/main.cc: Added gnutls support. Replaced LIB_SSL with
ENABLE_BITTORRENT where they are not related to OpenSSL but
BitTorrent.
Removed instantiation of TrackerInitCommand. Instead,
TrackerWatcherCommand is instantiated and pushed to the command
queue.
* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL
with
ENABLE_SSL.
* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
* src/RequestSlotMan.cc:
(deleteCompletedRequestSlot)
If a piece is already acquired by another command, delete the
request
slots for the piece.
* src/TrackerUpdateCommand.cc:
(execute)
Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to
warn.
Added a check whether peer list is null.
Fixed the bug that causes sending completed event to the tracker
several times.
* src/TrackerInitCommand.cc:
(execute)
Fixed the bug that causes sending completed event to the tracker
several times.
* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on
OpenSSL
by using messageDigest.h.
2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* PeerConnection.cc: Replaced log message "keep-alive" with
"keep alive".
* PeerInteractionCommand.{h,cc}: Close connection if peer is
choking
localhost long time.
* TorrentMan.cc: When adding new peer with duplicate = true, if
the
number of peer list is equal to or grater than MAX_PEER_LIST,
delete
at most 100 failure entry from the list. If with duplicate =
false,
MAX_PEER_LIST is not checked.
* PeerListenCommand.cc: Fixed the argument order of log message.
2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
Added warn().
* SimpleLogger.h: Moved enum LEVEL to Logger.h.
Implemented warn().
Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated
code.
2006-03-27 14:47:26 +00:00
|
|
|
|
2008-06-29 15:35:04 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_LIBXML2],
|
|
|
|
[test "x$enable_metalink" = "xyes" && test "x$have_libxml2" = "xyes"])
|
|
|
|
AM_CONDITIONAL([ENABLE_LIBEXPAT],
|
|
|
|
[test "x$enable_metalink" = "xyes" && test "x$have_libexpat" = "xyes"])
|
2007-12-14 00:46:32 +00:00
|
|
|
|
2006-08-21 13:18:51 +00:00
|
|
|
if test "x$have_libcares" = "xyes" || test "x$have_libares" = "xyes"; then
|
2008-06-29 15:35:04 +00:00
|
|
|
AC_DEFINE([ENABLE_ASYNC_DNS], [1],
|
|
|
|
[Define to 1 if asynchronous DNS support is enabled.])
|
|
|
|
AM_CONDITIONAL([ENABLE_ASYNC_DNS], true)
|
2006-08-11 12:29:55 +00:00
|
|
|
else
|
2008-06-29 15:35:04 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_ASYNC_DNS], false)
|
2006-08-11 12:29:55 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-29 15:35:04 +00:00
|
|
|
# Set conditional for libz
|
2008-06-29 14:29:36 +00:00
|
|
|
AM_CONDITIONAL([HAVE_LIBZ], [test "x$have_libz" = "xyes"])
|
|
|
|
|
2008-08-17 10:44:12 +00:00
|
|
|
# Set conditional for sqlite3
|
|
|
|
AM_CONDITIONAL([HAVE_SQLITE3], [test "x$have_sqlite3" = "xyes"])
|
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
# Checks for header files.
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_FUNC_ALLOCA
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_HEADER_STDC
|
2008-06-29 15:35:04 +00:00
|
|
|
AC_CHECK_HEADERS([winsock2.h \
|
|
|
|
ws2tcpip.h \
|
|
|
|
argz.h \
|
|
|
|
arpa/inet.h \
|
|
|
|
fcntl.h \
|
|
|
|
float.h \
|
|
|
|
inttypes.h \
|
|
|
|
io.h \
|
|
|
|
langinfo.h \
|
|
|
|
libintl.h \
|
|
|
|
limits.h \
|
|
|
|
locale.h \
|
|
|
|
malloc.h \
|
|
|
|
netdb.h \
|
|
|
|
netinet/in.h \
|
|
|
|
stddef.h \
|
|
|
|
stdint.h \
|
|
|
|
stdio_ext.h \
|
|
|
|
stdlib.h \
|
|
|
|
string.h \
|
|
|
|
strings.h \
|
|
|
|
sys/ioctl.h \
|
|
|
|
sys/param.h \
|
|
|
|
sys/socket.h \
|
|
|
|
sys/time.h \
|
|
|
|
termios.h \
|
|
|
|
unistd.h \
|
|
|
|
wchar.h])
|
2006-02-17 13:35:04 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_CONST
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_C_INLINE
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_TYPE_INT16_T
|
|
|
|
AC_TYPE_INT32_T
|
|
|
|
AC_TYPE_INT64_T
|
|
|
|
AC_TYPE_INT8_T
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_OFF_T
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_TYPE_SIZE_T
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_TYPE_SSIZE_T
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_HEADER_TIME
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_STRUCT_TM
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
AC_TYPE_UINT8_T
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_C_VOLATILE
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_CHECK_TYPES([ptrdiff_t])
|
2008-08-07 15:33:29 +00:00
|
|
|
AC_C_BIGENDIAN
|
2008-03-01 04:42:53 +00:00
|
|
|
AC_SYS_LARGEFILE
|
2006-02-17 13:35:04 +00:00
|
|
|
|
|
|
|
# Checks for library functions.
|
2006-03-21 16:07:22 +00:00
|
|
|
AM_GNU_GETTEXT
|
2008-02-02 04:38:24 +00:00
|
|
|
AM_GNU_GETTEXT_VERSION([0.17])
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_FUNC_ERROR_AT_LINE
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_PROG_GCC_TRADITIONAL
|
2006-03-21 16:07:22 +00:00
|
|
|
|
2007-07-31 16:45:16 +00:00
|
|
|
case "$target" in
|
|
|
|
*mingw*)
|
|
|
|
;;
|
|
|
|
*)
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_FUNC_MALLOC
|
2007-07-31 16:45:16 +00:00
|
|
|
AC_FUNC_REALLOC
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_FUNC_MEMCMP
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_FUNC_MKTIME
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_FUNC_MMAP
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_TYPE_SIGNAL
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_FUNC_STAT
|
2008-04-27 10:47:43 +00:00
|
|
|
AC_FUNC_STRFTIME
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_FUNC_VPRINTF
|
2008-06-29 15:35:04 +00:00
|
|
|
AC_CHECK_FUNCS([__argz_count \
|
|
|
|
__argz_next \
|
|
|
|
__argz_stringify \
|
|
|
|
atexit \
|
|
|
|
daemon \
|
|
|
|
ftruncate \
|
|
|
|
getcwd \
|
|
|
|
gethostbyaddr \
|
|
|
|
gethostbyname \
|
|
|
|
getpagesize \
|
|
|
|
inet_ntoa \
|
|
|
|
memchr \
|
|
|
|
memmove \
|
|
|
|
mempcpy \
|
|
|
|
memset \
|
|
|
|
mkdir \
|
|
|
|
munmap \
|
|
|
|
nl_langinfo \
|
|
|
|
posix_memalign \
|
|
|
|
putenv \
|
|
|
|
rmdir \
|
|
|
|
select \
|
|
|
|
setlocale \
|
|
|
|
sleep \
|
|
|
|
socket \
|
|
|
|
stpcpy \
|
|
|
|
strcasecmp \
|
|
|
|
strchr \
|
|
|
|
strcspn \
|
|
|
|
strdup \
|
|
|
|
strerror \
|
|
|
|
strncasecmp \
|
|
|
|
strstr \
|
|
|
|
strtol \
|
|
|
|
strtoul \
|
|
|
|
strtoull \
|
|
|
|
tzset \
|
|
|
|
unsetenv \
|
|
|
|
usleep])
|
2007-07-23 13:04:48 +00:00
|
|
|
|
2008-06-20 12:04:49 +00:00
|
|
|
if test "x$enable_epoll" = "xyes"; then
|
2008-06-29 15:35:04 +00:00
|
|
|
AC_CHECK_FUNCS([epoll_create])
|
2008-06-20 12:04:49 +00:00
|
|
|
fi
|
2008-05-31 10:31:07 +00:00
|
|
|
|
2008-06-16 11:19:45 +00:00
|
|
|
AC_CHECK_FUNCS([asctime_r],
|
|
|
|
[AM_CONDITIONAL([HAVE_ASCTIME_R], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_ASCTIME_R], false)])
|
2007-07-23 13:04:48 +00:00
|
|
|
AC_CHECK_FUNCS([basename],
|
|
|
|
[AM_CONDITIONAL([HAVE_BASENAME], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_BASENAME], false)])
|
2007-07-31 16:45:16 +00:00
|
|
|
AC_CHECK_FUNCS([gai_strerror],
|
|
|
|
[AM_CONDITIONAL([HAVE_GAI_STRERROR], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_GAI_STRERROR], false)])
|
2007-07-23 13:04:48 +00:00
|
|
|
AC_CHECK_FUNCS([getaddrinfo],
|
|
|
|
[AM_CONDITIONAL([HAVE_GETADDRINFO], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_GETADDRINFO], false)])
|
2007-07-31 16:45:16 +00:00
|
|
|
AC_CHECK_FUNCS([gettimeofday],
|
|
|
|
[AM_CONDITIONAL([HAVE_GETTIMEOFDAY], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_GETTIMEOFDAY], false)])
|
2007-07-23 13:04:48 +00:00
|
|
|
AC_CHECK_FUNCS([inet_aton],
|
|
|
|
[AM_CONDITIONAL([HAVE_INET_ATON], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_INET_ATON], false)])
|
|
|
|
AC_CHECK_FUNCS([localtime_r],
|
|
|
|
[AM_CONDITIONAL([HAVE_LOCALTIME_R], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_LOCALTIME_R], false)])
|
|
|
|
AC_CHECK_FUNCS([strptime],
|
|
|
|
[AM_CONDITIONAL([HAVE_STRPTIME], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_STRPTIME], false)])
|
2007-08-14 14:51:08 +00:00
|
|
|
AC_CHECK_FUNCS([timegm],
|
|
|
|
[AM_CONDITIONAL([HAVE_TIMEGM], true)],
|
|
|
|
[AM_CONDITIONAL([HAVE_TIMEGM], false)])
|
2007-07-23 13:04:48 +00:00
|
|
|
|
|
|
|
case "$target" in
|
2008-06-29 15:35:04 +00:00
|
|
|
*mingw*)
|
|
|
|
dnl defined in ws2tcpip.h, but only if _WIN32_WINNT >= 0x0501
|
|
|
|
AM_CONDITIONAL([HAVE_GETADDRINFO], true)
|
|
|
|
dnl defined in ws2tcpip.h, but missing in C:\mingw\lib\libws2_32.a
|
|
|
|
AM_CONDITIONAL([HAVE_GAI_STRERROR], false)
|
|
|
|
;;
|
2007-07-23 13:04:48 +00:00
|
|
|
esac
|
|
|
|
|
2006-03-21 16:07:22 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
src/Makefile
|
|
|
|
test/Makefile
|
|
|
|
po/Makefile.in
|
|
|
|
m4/Makefile
|
2006-10-01 14:11:29 +00:00
|
|
|
intl/Makefile
|
2008-03-01 04:42:53 +00:00
|
|
|
lib/Makefile
|
2006-10-01 14:11:29 +00:00
|
|
|
doc/Makefile])
|
2006-02-17 13:35:04 +00:00
|
|
|
AC_OUTPUT
|
2007-08-14 14:51:08 +00:00
|
|
|
|
|
|
|
echo " "
|
|
|
|
echo "Build: $build"
|
|
|
|
echo "Target: $target"
|
|
|
|
echo "Install prefix: $prefix"
|
|
|
|
echo "CFLAGS: $CFLAGS"
|
|
|
|
echo "CPPFLAGS: $CPPFLAGS"
|
|
|
|
echo "LDFLAGS: $LDFLAGS"
|
|
|
|
echo "LIBS: $LIBS"
|
2008-08-17 10:44:12 +00:00
|
|
|
echo "SQLite3: $have_sqlite3"
|
2007-08-14 14:51:08 +00:00
|
|
|
echo "GnuTLS: $have_libgnutls"
|
|
|
|
echo "OpenSSL: $have_openssl"
|
|
|
|
echo "LibXML2: $have_libxml2"
|
2007-12-14 00:46:32 +00:00
|
|
|
echo "LibExpat: $have_libexpat"
|
2007-08-14 14:51:08 +00:00
|
|
|
echo "LibAres: $have_libares"
|
|
|
|
echo "LibCares: $have_libcares"
|
2008-06-29 14:29:36 +00:00
|
|
|
echo "Libz: $have_libz"
|
2007-08-14 14:51:08 +00:00
|
|
|
echo "Bittorrent: $enable_bittorrent"
|
|
|
|
echo "Metalink: $enable_metalink"
|