aria2/configure.ac

561 lines
16 KiB
Plaintext
Raw Normal View History

2006-02-17 13:35:04 +00:00
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
AC_PREREQ([2.67])
2012-02-05 08:13:03 +00:00
AC_INIT([aria2],[1.14.2],[t-tujikawa@users.sourceforge.net],[aria2],[http://aria2.sourceforge.net/])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
2006-02-17 13:35:04 +00:00
AM_INIT_AUTOMAKE()
AM_PATH_CPPUNIT(1.10.2)
AC_CONFIG_SRCDIR([src/a2io.h])
2006-02-17 13:35:04 +00:00
AC_CONFIG_HEADERS([config.h])
case "$target" in
*mingw*|*cygwin*)
win_build=yes
LIBS="-lws2_32 -lcrypto -lwsock32 -lgdi32 -lwinmm $LIBS"
;;
esac
AC_DEFINE_UNQUOTED([TARGET], ["$target"], [Define target-type])
# Checks for arguments.
ARIA2_ARG_WITH([gnutls])
ARIA2_ARG_WITH([libnettle])
ARIA2_ARG_WITH([libgmp])
ARIA2_ARG_WITH([libgcrypt])
ARIA2_ARG_WITH([openssl])
ARIA2_ARG_WITH([sqlite3])
ARIA2_ARG_WITH([libxml2])
ARIA2_ARG_WITH([libexpat])
ARIA2_ARG_WITH([libcares])
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
ARIA2_ARG_ENABLE([bittorrent])
ARIA2_ARG_ENABLE([metalink])
ARIA2_ARG_ENABLE([epoll])
AC_ARG_WITH([ca-bundle],
AS_HELP_STRING([--with-ca-bundle=FILE],[Use FILE as default CA bundle.]),
[ca_bundle=$withval], [ca_bundle=""])
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
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
AC_CHECK_TOOL([AR], [ar], [:])
if test "x$AR" = "x:"; then
AC_MSG_FAILURE([ar is not found in the system.])
fi
AC_SUBST([AR])
AC_PATH_PROG([A2X], [a2x])
AC_SUBST([A2X])
AM_CONDITIONAL([HAVE_A2X], [ test "x$A2X" != "x" ])
AC_PATH_PROG([ASCIIDOC], [asciidoc])
AC_SUBST([ASCIIDOC])
AM_CONDITIONAL([HAVE_ASCIIDOC], [ test "x$ASCIIDOC" != "x" ])
# Setting language choice
AC_LANG([C++])
# Enable system extensions
AC_USE_SYSTEM_EXTENSIONS
# Check pkg-config is available
PKG_PROG_PKG_CONFIG([0.20])
2006-02-17 13:35:04 +00:00
# Checks for libraries.
2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> To add Metalink support(http/ftp only): * src/AbstractCommand.h (tryReserved): New function. * src/AbstractCommand.cc (execute): Call tryReserved(). (tryReserved): New function. * src/Request.h (Requests): New type definition. * src/SegmentMan.h (reserved): New variable. * src/Util.h (fileChecksum): New function. (toUpper): New function. (toLower): New function. * src/Util.cc (messageDigest.h): Included. (trim): Trim \r\n\t. (fileChecksum): New function. (toUpper): New function. (toLower): New function. * src/main.cc (normalDownload): New function. (main): Added 2 command-line options: metalink-file, metalink-connection. Their usage has not been written yet. * src/MetalinkProcessor.h: New class. * src/Xml2MetalinkProcessor.h: New class. * src/Xml2MetalinkProcessor.cc: New class. * src/MetalinkEntry.h: New class. * src/MetalinkEntry.cc: New class. * src/MetalinkResource.h: New class. * src/MetalinkResource.cc: New class. To add md5 message digest checking: * src/messageDigest.h: Rewritten. * src/MultiDiskWriter.cc: Updated according to the changes in messageDigest.h. * src/ShaVisitor.cc: Updated according to the changes in messageDigest.h. * src/Util.cc: Updated according to the changes in messageDigest.h. * src/AbstractDiskWriter.cc: Updated according to the changes in messageDigest.h. To fix a bug that causes segfault when the payload length in peer message is less than 0: * src/PeerConnection.cc: (receiveMessage): Fixed the bug. * src/PeerMessageUtil.cc (checkLength): Throw an exception if length is less than or equals to 0. To add new interfaces to Base64 encoding/decoding: * src/Base64.h (part_encode): Changed the method signature. (encode): New function(overload). (decode): New function(overload). * src/Base64.cc (part_encode): Rewritten. (encode): Rewritten. (encode): New function(overload). To prevent a peer to download same piece if there is an error in checksum: * src/PieceMessage.cc (receivedAction): Call peerInteraction->abortPiece().
2006-07-03 14:19:23 +00:00
if test "x$with_libxml2" = "xyes"; then
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.])
LIBS="$XML_LIBS $LIBS"
CPPFLAGS="$XML_CPPFLAGS $CPPFLAGS"
elif test "x$with_libxml2_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([libxml2])
fi
2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> To add Metalink support(http/ftp only): * src/AbstractCommand.h (tryReserved): New function. * src/AbstractCommand.cc (execute): Call tryReserved(). (tryReserved): New function. * src/Request.h (Requests): New type definition. * src/SegmentMan.h (reserved): New variable. * src/Util.h (fileChecksum): New function. (toUpper): New function. (toLower): New function. * src/Util.cc (messageDigest.h): Included. (trim): Trim \r\n\t. (fileChecksum): New function. (toUpper): New function. (toLower): New function. * src/main.cc (normalDownload): New function. (main): Added 2 command-line options: metalink-file, metalink-connection. Their usage has not been written yet. * src/MetalinkProcessor.h: New class. * src/Xml2MetalinkProcessor.h: New class. * src/Xml2MetalinkProcessor.cc: New class. * src/MetalinkEntry.h: New class. * src/MetalinkEntry.cc: New class. * src/MetalinkResource.h: New class. * src/MetalinkResource.cc: New class. To add md5 message digest checking: * src/messageDigest.h: Rewritten. * src/MultiDiskWriter.cc: Updated according to the changes in messageDigest.h. * src/ShaVisitor.cc: Updated according to the changes in messageDigest.h. * src/Util.cc: Updated according to the changes in messageDigest.h. * src/AbstractDiskWriter.cc: Updated according to the changes in messageDigest.h. To fix a bug that causes segfault when the payload length in peer message is less than 0: * src/PeerConnection.cc: (receiveMessage): Fixed the bug. * src/PeerMessageUtil.cc (checkLength): Throw an exception if length is less than or equals to 0. To add new interfaces to Base64 encoding/decoding: * src/Base64.h (part_encode): Changed the method signature. (encode): New function(overload). (decode): New function(overload). * src/Base64.cc (part_encode): Rewritten. (encode): Rewritten. (encode): New function(overload). To prevent a peer to download same piece if there is an error in checksum: * src/PieceMessage.cc (receivedAction): Call peerInteraction->abortPiece().
2006-07-03 14:19:23 +00:00
fi
if test "x$with_libexpat" = "xyes" && test "x$have_libxml2" != "xyes"; then
AM_PATH_LIBEXPAT
if test "x$have_libexpat" = "xyes"; then
LIBS="$LIBEXPAT_LIBS $LIBS"
CPPFLAGS="$LIBEXPAT_CPPFLAGS $CPPFLAGS"
elif test "x$with_libexpat_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([libexpat])
fi
fi
if test "x$with_sqlite3" = "xyes"; then
AM_PATH_SQLITE3
if test "x$have_sqlite3" = "xyes"; then
LIBS="$SQLITE3_LIBS $LIBS"
CPPFLAGS="$SQLITE3_CFLAGS $CPPFLAGS"
elif test "x$with_sqlite3_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([sqlite3])
fi
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
2011-05-20 11:45:09 +00:00
# gnutls >= 2.8 doesn't have libgnutls-config anymore. We require
# 2.2.0 because we use gnutls_priority_set_direct()
PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.0],
[have_libgnutls=yes], [have_libgnutls=no])
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"; then
AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define to 1 if you have libgnutls.])
LIBS="$LIBGNUTLS_LIBS $LIBS"
CPPFLAGS="$LIBGNUTLS_CFLAGS $CPPFLAGS"
elif test "x$with_gnutls_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([gnutls])
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
fi
if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then
AM_PATH_OPENSSL
if test "x$have_openssl" = "xyes"; then
LIBS="$OPENSSL_LIBS $LIBS"
CPPFLAGS="$OPENSSL_CFLAGS $CPPFLAGS"
elif test "x$with_openssl_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([openssl])
fi
fi
2006-02-17 13:35:04 +00:00
if test "x$have_openssl" != "xyes"; then
if test "x$with_libnettle" = "xyes"; then
AC_SEARCH_LIBS([nettle_sha1_init], [nettle],
[have_libnettle=yes], [have_libnettle=no])
if test "x$have_libnettle" = "xyes"; then
AC_DEFINE([HAVE_LIBNETTLE], [1], [Define to 1 if you have libnettle.])
fi
fi
if test "x$with_libgmp" = "xyes" &&
test "x$have_libnettle" = "xyes" &&
test "x$enable_bittorrent" = "xyes"; then
AC_SEARCH_LIBS([__gmpz_init], [gmp], [have_libgmp=yes], [have_libgmp=no])
if test "x$have_libgmp" = "xyes"; then
AC_DEFINE([HAVE_LIBGMP], [1], [Define to 1 if you have libgmp.])
fi
fi
if test "x$with_libgcrypt" = "xyes" &&
test "x$have_libnettle" != "xyes"; then
AM_PATH_LIBGCRYPT([1.2.4], [have_libgcrypt=yes])
if test "x$have_libgcrypt" = "xyes"; then
AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
LIBS="$LIBGCRYPT_LIBS $LIBS"
CPPFLAGS="$LIBGCRYPT_CFLAGS $CPPFLAGS"
fi
fi
fi
if test "x$with_libcares" = "xyes"; then
AM_PATH_LIBCARES
if test "x$have_libcares" = "xyes"; then
LIBS="$LIBCARES_LIBS $LIBS"
CPPFLAGS="$LIBCARES_CFLAGS $CPPFLAGS"
elif test "x$with_libcares_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([libcares])
fi
fi
# Check availability of libz
if test "x$with_libz" = "xyes"; then
AM_PATH_LIBZ
2011-02-18 13:34:38 +00:00
if test "x$have_zlib" = "xyes"; then
LIBS="$ZLIB_LIBS $LIBS"
CPPFLAGS="$ZLIB_CFLAGS $CPPFLAGS"
elif test "x$with_libz_requested" = "xyes"; then
ARIA2_DEP_NOT_MET([libz])
fi
fi
# 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.])
AM_CONDITIONAL([ENABLE_SSL], true)
AC_SUBST([ca_bundle])
else
AM_CONDITIONAL([ENABLE_SSL], 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
AM_CONDITIONAL([HAVE_LIBGNUTLS], [ test "x$have_libgnutls" = "xyes" ])
AM_CONDITIONAL([HAVE_LIBNETTLE], [ test "x$have_libnettle" = "xyes" ])
AM_CONDITIONAL([HAVE_LIBGMP], [ test "x$have_libgmp" = "xyes" ])
AM_CONDITIONAL([HAVE_LIBGCRYPT], [ test "x$have_libgcrypt" = "xyes" ])
2011-02-18 13:43:50 +00:00
AM_CONDITIONAL([HAVE_OPENSSL], [ test "x$have_openssl" = "xyes" ])
if test "x$have_libnettle" = "xyes" || test "x$have_libgcrypt" = "xyes" ||
test "x$have_openssl" = "xyes"; then
AC_DEFINE([ENABLE_MESSAGE_DIGEST], [1],
[Define to 1 if message digest support is enabled.])
AM_CONDITIONAL([ENABLE_MESSAGE_DIGEST], true)
enable_message_digest=yes
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
if test "x$have_libnettle" = "xyes" && test "x$have_libgmp" = "xyes" ||
test "x$have_libgcrypt" = "xyes" || test "x$have_openssl" = "xyes"; then
enable_bignum=yes
fi
if test "x$enable_bittorrent" = "xyes" &&
test "x$enable_message_digest" = "xyes" &&
test "x$enable_bignum" = "xyes"; then
AC_DEFINE([ENABLE_BITTORRENT], [1],
[Define to 1 if BitTorrent support is enabled.])
AM_CONDITIONAL([ENABLE_BITTORRENT], true)
else
if test "x$enable_bittorrent_requested" = "xyes"; then
ARIA2_FET_NOT_SUPPORTED([bittorrent])
fi
enable_bittorrent=no
AM_CONDITIONAL([ENABLE_BITTORRENT], false)
fi
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)
else
if test "x$enable_metalink_requested" = "xyes"; then
ARIA2_FET_NOT_SUPPORTED([metalink])
fi
enable_metalink=no
AM_CONDITIONAL([ENABLE_METALINK], false)
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
AM_CONDITIONAL([HAVE_SOME_XMLLIB],
[test "x$have_libxml2" = "xyes" || test "x$have_libexpat" = "xyes"])
if test "x$have_libxml2" = "xyes" || test "x$have_libexpat" = "xyes"; then
enable_xml_rpc=yes
fi
if test "x$enable_xml_rpc" = "xyes"; then
AC_DEFINE([ENABLE_XML_RPC], [1],
[Define to 1 if XML-RPC support is enabled.])
fi
AM_CONDITIONAL([ENABLE_XML_RPC], [test "x$enable_xml_rpc" = "xyes"])
AM_CONDITIONAL([HAVE_LIBXML2], [test "x$have_libxml2" = "xyes"])
AM_CONDITIONAL([HAVE_LIBEXPAT], [test "x$have_libexpat" = "xyes"])
if test "x$have_libcares" = "xyes"; then
AC_DEFINE([ENABLE_ASYNC_DNS], [1],
[Define to 1 if asynchronous DNS support is enabled.])
AM_CONDITIONAL([ENABLE_ASYNC_DNS], true)
2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> To add asynchronous DNS support(libares): * src/AbstractCommand.h (setNameResolverCheck): New function. (disableNameResolverCheck): New function (resolveHostname): New function. * src/AbstractCommand.cc (setNameResolverCheck): New function. (disableNameResolverCheck): New function (resolveHostname): New function. * src/FtpInitiateConnectionCommand.h (nameResolver): New function. * src/FtpInitiateConnectionCommand.cc (Util.h): Included. (FtpInitiateConnectionCommand): Call disableReadCheckSocket, disableWriteCheckSocket. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck. (executeInternal): Added async DNS support. * src/HttpInitiateConnectionCommand.h (nameResolver): New function. * src/HttpInitiateConnectionCommand.cc (DlRetryEx.h): Included. (HttpInitiateConnectionCommand): Call disableReadCheckSocket, disableWriteCheckSocket. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck. (executeInternal): Added async DNS support. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded by extern "C" declaration. * src/NameResolver.cc: New class. * src/Util.h: (isNumberAndDotsNotation): New function * src/Util.cc (isNumberAndDotsNotation): New function. * src/DownloadEngine.h (NameResolver.h): Included. (NameResolverEntry): New class. (NameResolverEntries): New type definition. (addNameResolverCheck): New function. (deleteNameResolverCheck): New function. * src/DownloadEngine.cc (run): Initialize cp with 0. (SetDescriptor::operator()): Added for NameResolverEntry. (AccumulateActiveUuid::operator()): Added for NameResolverEntry. (waitData): Check nameResolver entries. (updateFdSet): Update fds in nameResolver entries. (addNameResolverCheck): New function. (deleteNameResolverCheck): new function. * src/PeerInteractionCommand.cc (executeInternal): Fixed wrong socket handling. * src/main.cc (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0. * src/Util.cc (fileChecksum): Removed the call to ctx.digestReset().
2006-08-11 12:29:55 +00:00
else
AM_CONDITIONAL([ENABLE_ASYNC_DNS], false)
2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> To add asynchronous DNS support(libares): * src/AbstractCommand.h (setNameResolverCheck): New function. (disableNameResolverCheck): New function (resolveHostname): New function. * src/AbstractCommand.cc (setNameResolverCheck): New function. (disableNameResolverCheck): New function (resolveHostname): New function. * src/FtpInitiateConnectionCommand.h (nameResolver): New function. * src/FtpInitiateConnectionCommand.cc (Util.h): Included. (FtpInitiateConnectionCommand): Call disableReadCheckSocket, disableWriteCheckSocket. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck. (executeInternal): Added async DNS support. * src/HttpInitiateConnectionCommand.h (nameResolver): New function. * src/HttpInitiateConnectionCommand.cc (DlRetryEx.h): Included. (HttpInitiateConnectionCommand): Call disableReadCheckSocket, disableWriteCheckSocket. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck. (executeInternal): Added async DNS support. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded by extern "C" declaration. * src/NameResolver.cc: New class. * src/Util.h: (isNumberAndDotsNotation): New function * src/Util.cc (isNumberAndDotsNotation): New function. * src/DownloadEngine.h (NameResolver.h): Included. (NameResolverEntry): New class. (NameResolverEntries): New type definition. (addNameResolverCheck): New function. (deleteNameResolverCheck): New function. * src/DownloadEngine.cc (run): Initialize cp with 0. (SetDescriptor::operator()): Added for NameResolverEntry. (AccumulateActiveUuid::operator()): Added for NameResolverEntry. (waitData): Check nameResolver entries. (updateFdSet): Update fds in nameResolver entries. (addNameResolverCheck): New function. (deleteNameResolverCheck): new function. * src/PeerInteractionCommand.cc (executeInternal): Fixed wrong socket handling. * src/main.cc (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0. * src/Util.cc (fileChecksum): Removed the call to ctx.digestReset().
2006-08-11 12:29:55 +00:00
fi
# Set conditional for libz
2011-02-18 13:34:38 +00:00
AM_CONDITIONAL([HAVE_ZLIB], [test "x$have_zlib" = "xyes"])
# Set conditional for sqlite3
AM_CONDITIONAL([HAVE_SQLITE3], [test "x$have_sqlite3" = "xyes"])
AC_SEARCH_LIBS([clock_gettime], [rt])
case "$target" in
*solaris*)
AC_SEARCH_LIBS([getaddrinfo], [nsl socket])
AC_SEARCH_LIBS([inet_aton], [nsl socket])
;;
esac
2006-02-17 13:35:04 +00:00
# Checks for header files.
2006-03-21 16:07:22 +00:00
AC_FUNC_ALLOCA
AC_HEADER_STDC
case "$target" in
*mingw*)
AC_CHECK_HEADERS([windows.h \
winsock2.h \
ws2tcpip.h \
mmsystem.h], [], [],
[[#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
]])
;;
esac
AC_CHECK_HEADERS([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 \
poll.h \
port.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 \
utime.h \
wchar.h \
ifaddrs.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
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
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
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_TYPE_PID_T
2006-03-21 16:07:22 +00:00
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t, struct timespec])
AC_C_BIGENDIAN
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
2011-03-17 02:28:37 +00:00
AM_GNU_GETTEXT_VERSION([0.18])
2006-02-17 13:35:04 +00:00
AC_FUNC_ERROR_AT_LINE
AC_PROG_GCC_TRADITIONAL
2006-03-21 16:07:22 +00:00
AC_FUNC_MEMCMP
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
AC_FUNC_STAT
AC_FUNC_STRFTIME
2006-02-17 13:35:04 +00:00
AC_FUNC_VPRINTF
AC_FUNC_FORK
AC_FUNC_STRTOD
AC_CHECK_FUNCS([__argz_count \
__argz_next \
__argz_stringify \
atexit \
ftruncate \
getcwd \
gethostbyaddr \
gethostbyname \
getifaddrs \
getpagesize \
memchr \
memmove \
mempcpy \
memset \
mkdir \
munmap \
nl_langinfo \
posix_memalign \
pow \
putenv \
rmdir \
select \
setlocale \
sleep \
socket \
stpcpy \
strcasecmp \
strchr \
strcspn \
strdup \
strerror \
strncasecmp \
strstr \
strtol \
strtoul \
strtoull \
tzset \
unsetenv \
usleep \
utime \
utimes])
if test "x$enable_epoll" = "xyes"; then
AC_CHECK_FUNCS([epoll_create], [have_epoll=yes])
if test "x$have_epoll" = "xyes"; then
AC_DEFINE([HAVE_EPOLL], [1], [Define to 1 if epoll is available.])
fi
fi
AM_CONDITIONAL([HAVE_EPOLL], [test "x$have_epoll" = "xyes"])
AC_CHECK_FUNCS([posix_fallocate],[have_posix_fallocate=yes])
ARIA2_CHECK_FALLOCATE
if test "x$have_posix_fallocate" = "xyes" ||
test "x$have_fallocate" = "xyes" ||
test "x$win_build" = "xyes"; then
AC_DEFINE([HAVE_SOME_FALLOCATE], [1],
[Define to 1 if *_fallocate is available.])
fi
AM_CONDITIONAL([HAVE_SOME_FALLOCATE],
[test "x$have_posix_fallocate" = "xyes" || test "x$have_fallocate" = "xyes" \
|| test "x$win_build" = "xyes"])
AC_CHECK_FUNCS([asctime_r],
[AM_CONDITIONAL([HAVE_ASCTIME_R], true)],
[AM_CONDITIONAL([HAVE_ASCTIME_R], false)])
AC_CHECK_FUNCS([basename],
[AM_CONDITIONAL([HAVE_BASENAME], true)],
[AM_CONDITIONAL([HAVE_BASENAME], false)])
2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> Make a2netcompat.h include a2io.h to fix compilation error: * src/a2netcompat.h * src/SocketCore.cc: Removed include of a2io.h * src/Util.cc: Removed include of a2io.h Gather time related functions to a2time.h: * src/a2time.h: New file. * src/DefaultPeerStorage.cc * src/SimpleLogger.cc * src/Util.{h, cc} * src/SimpleRandomizer.h * src/TimeA2.{h,cc} * src/DownloadCommand.cc * src/main.cc Removed #ifdef __MINGW32__ since gai_strerror is included in a2netcompat.h: * src/NameResolver.cc Fixed compilation error without openssl: * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h Added default block to suppress compiler warnings: * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator()) 2007-07-26 Ross Smith II <aria2spam at smithii dot com> MinGW build enhancements. The following files are added: * src/gai_strerror.{c,h} * src/gettimeofday.{c,h} Changes to support the above new files: * configure.ac * src/Makefile.am * src/a2netcompat.h * src/TimeA2.cc * src/DefaultPeerStorage.cc * src/NameResolver.cc: removed mingw_strerror() function. * src/SocketCore.cc: removed mingw_strerror() function. Miscellaneous MinGW build fixes. * src/a2io.h: Use _lseeki64() instead of lseek() * src/common.h * src/DefaultFileAllocator.cc * src/GlowFileAllocator.cc * src/main.cc: Moved #include "prefs.h" to quiet compile error. * src/NameResolver.cc (callback): Changed int32_t to int. (resolve): Changed int32_t to int. * src/Platform.cc * src/Platform.h * test/MultiDiskWriterTest.cc * test/PeerMessageUtilTest.cc * src/localtime_r.c: Add DeleteCriticalSection() and at exit(). Other enhancements and fixes. * src/HttpRequestCommand.cc (executeInternal) Use non-blocking socket for HTTPS (MinGW only). * src/SocketCore.cc: (error): New function to abstract errno/WSAGetLastError(). (errorMsg): New function to abstract errno/WSAGetLastError(). (initiateSecureConnection): Added more detailed error reporting. * src/SocketCore.h: Added private variable blocking, to allow proper handling of OpenSSL psuedo-errors. * src/message.h (EX_SSL_INIT_FAILURE) (EX_SSL_IO_ERROR) (EX_SSL_PROTOCOL_ERROR) (EX_SSL_UNKNOWN_ERROR) (EX_SSL_CONNECT_ERROR) (EX_SOCKET_BLOCKING) (EX_SOCKET_NONBLOCKING) (EX_SOCKET_UNKNOWN_ERROR) * src/Util.cc (setGlobalSignalHandler): Renamed signal to sig as signal is a reserved name. (httpGMT): Fixed typo.
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)])
AC_CHECK_FUNCS([getaddrinfo],
[AM_CONDITIONAL([HAVE_GETADDRINFO], true)],
[AM_CONDITIONAL([HAVE_GETADDRINFO], false)])
2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> Make a2netcompat.h include a2io.h to fix compilation error: * src/a2netcompat.h * src/SocketCore.cc: Removed include of a2io.h * src/Util.cc: Removed include of a2io.h Gather time related functions to a2time.h: * src/a2time.h: New file. * src/DefaultPeerStorage.cc * src/SimpleLogger.cc * src/Util.{h, cc} * src/SimpleRandomizer.h * src/TimeA2.{h,cc} * src/DownloadCommand.cc * src/main.cc Removed #ifdef __MINGW32__ since gai_strerror is included in a2netcompat.h: * src/NameResolver.cc Fixed compilation error without openssl: * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h Added default block to suppress compiler warnings: * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator()) 2007-07-26 Ross Smith II <aria2spam at smithii dot com> MinGW build enhancements. The following files are added: * src/gai_strerror.{c,h} * src/gettimeofday.{c,h} Changes to support the above new files: * configure.ac * src/Makefile.am * src/a2netcompat.h * src/TimeA2.cc * src/DefaultPeerStorage.cc * src/NameResolver.cc: removed mingw_strerror() function. * src/SocketCore.cc: removed mingw_strerror() function. Miscellaneous MinGW build fixes. * src/a2io.h: Use _lseeki64() instead of lseek() * src/common.h * src/DefaultFileAllocator.cc * src/GlowFileAllocator.cc * src/main.cc: Moved #include "prefs.h" to quiet compile error. * src/NameResolver.cc (callback): Changed int32_t to int. (resolve): Changed int32_t to int. * src/Platform.cc * src/Platform.h * test/MultiDiskWriterTest.cc * test/PeerMessageUtilTest.cc * src/localtime_r.c: Add DeleteCriticalSection() and at exit(). Other enhancements and fixes. * src/HttpRequestCommand.cc (executeInternal) Use non-blocking socket for HTTPS (MinGW only). * src/SocketCore.cc: (error): New function to abstract errno/WSAGetLastError(). (errorMsg): New function to abstract errno/WSAGetLastError(). (initiateSecureConnection): Added more detailed error reporting. * src/SocketCore.h: Added private variable blocking, to allow proper handling of OpenSSL psuedo-errors. * src/message.h (EX_SSL_INIT_FAILURE) (EX_SSL_IO_ERROR) (EX_SSL_PROTOCOL_ERROR) (EX_SSL_UNKNOWN_ERROR) (EX_SSL_CONNECT_ERROR) (EX_SOCKET_BLOCKING) (EX_SOCKET_NONBLOCKING) (EX_SOCKET_UNKNOWN_ERROR) * src/Util.cc (setGlobalSignalHandler): Renamed signal to sig as signal is a reserved name. (httpGMT): Fixed typo.
2007-07-31 16:45:16 +00:00
AC_CHECK_FUNCS([gettimeofday],
[AM_CONDITIONAL([HAVE_GETTIMEOFDAY], true)],
[AM_CONDITIONAL([HAVE_GETTIMEOFDAY], false)])
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)])
AC_CHECK_FUNCS([timegm],
[AM_CONDITIONAL([HAVE_TIMEGM], true)],
[AM_CONDITIONAL([HAVE_TIMEGM], false)])
AC_CHECK_FUNCS([daemon], [have_daemon=yes])
AM_CONDITIONAL([HAVE_DAEMON], [test "x$have_daemon" = "xyes"])
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes])
if test "x$have_clock_gettime" != "xyes"; then
AC_CHECK_FUNCS([mach_absolute_time], [have_mach_absolute_time=yes])
fi
AM_CONDITIONAL([HAVE_MACH_ABSOLUTE_TIME],
[test "x$have_mach_absolute_time" = "xyes"])
AC_CHECK_FUNCS([poll], [have_poll=yes])
AM_CONDITIONAL([HAVE_POLL], [test "x$have_poll" = "xyes"])
case "$target" in
*mingw*)
AM_CONDITIONAL([MINGW_BUILD], true)
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)
if test "x$have_clock_gettime" != "xyes"; then
AM_CONDITIONAL([HAVE_TIMEGETTIME], true)
fi
;;
*)
AM_CONDITIONAL([MINGW_BUILD], false)
AM_CONDITIONAL([HAVE_TIMEGETTIME], false)
;;
esac
AC_CHECK_FUNCS([port_associate], [have_port_associate=yes])
AM_CONDITIONAL([HAVE_PORT_ASSOCIATE], [test "x$have_port_associate" = "xyes"])
AC_CHECK_FUNCS([kqueue], [have_kqueue=yes])
AM_CONDITIONAL([HAVE_KQUEUE], [test "x$have_kqueue" = "xyes"])
if test "x$have_kqueue" = "xyes"; then
AC_MSG_CHECKING([whether struct kevent.udata is intptr_t])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
]],
[[
struct kevent event;
event.udata = reinterpret_cast<intptr_t>(&event);
]])],
[kevent_udata_intptr_t=yes], [kevent_udata_intptr_t=no])
AC_MSG_RESULT([$kevent_udata_intptr_t])
if test "x$kevent_udata_intptr_t" = "xyes"; then
AC_DEFINE([KEVENT_UDATA_INTPTR_T], [1], [Define to 1 if struct kevent.udata is intptr_t])
fi
fi
AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
[AC_DEFINE([HAVE_SOCKADDR_IN_SIN_LEN],[1],
[Define to 1 if struct sockaddr_in has sin_len member.])],
[],
[[#include <netinet/in.h>]])
# Check struct option.name is assignable from const char*. struct
# option.name in opensolaris is of type char*. In Linux, it is const
# char*
AC_MSG_CHECKING([whether struct option.name is assignable from const char*])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h>
#include <getopt.h>
]],
[[
const char* s = "const char";
option op;
op.name = s;
]])],
[have_option_const_name=yes], [have_option_const_name=no])
AC_MSG_RESULT([$have_option_const_name])
if test "x$have_option_const_name" = "xyes"; then
AC_DEFINE([HAVE_OPTION_CONST_NAME], [1], [Define 1 if struct option.name is const char*])
fi
2006-03-21 16:07:22 +00:00
AC_CONFIG_FILES([Makefile
src/Makefile
test/Makefile
po/Makefile.in
2006-10-01 14:11:29 +00:00
intl/Makefile
lib/Makefile
doc/Makefile
doc/ru/Makefile])
2006-02-17 13:35:04 +00:00
AC_OUTPUT
echo " "
echo "Build: $build"
echo "Target: $target"
echo "Install prefix: $prefix"
echo "CXXFLAGS: $CXXFLAGS"
echo "CFLAGS: $CFLAGS"
echo "CPPFLAGS: $CPPFLAGS"
echo "LDFLAGS: $LDFLAGS"
echo "LIBS: $LIBS"
echo "DEFS: $DEFS"
echo "SQLite3: $have_sqlite3"
echo "GnuTLS: $have_libgnutls"
echo "OpenSSL: $have_openssl"
echo "CA Bundle: $ca_bundle"
echo "LibXML2: $have_libxml2"
echo "LibExpat: $have_libexpat"
echo "LibCares: $have_libcares"
2011-02-18 13:34:38 +00:00
echo "Zlib: $have_zlib"
echo "Epoll: $have_epoll"
echo "Bittorrent: $enable_bittorrent"
echo "Metalink: $enable_metalink"
2011-03-17 02:28:37 +00:00
echo "XML-RPC: $enable_xml_rpc"