mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 23:52:30 +00:00
Cleaned up configure.ac and fixed it to properly handles CXXFLAGS.
Ignore SIGPIPE. Fixed(?) bug in hash queue code when a queued torrent got deleted. Also reorganized core::Manager to catch all torrent::local_error's. Fixed display bug in display::FileList which hid the last element. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@441 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+2
-73
@@ -18,8 +18,8 @@ AC_DEFUN([TORRENT_CHECK_CURL], [
|
||||
my_cv_curl_vers="$ver"
|
||||
AC_MSG_RESULT([$my_cv_curl_vers])
|
||||
|
||||
CURL_CFLAGS=`curl-config --cflags`
|
||||
CURL_LIBS=`curl-config --libs`
|
||||
CURL_CFLAGS="`curl-config --cflags`"
|
||||
CURL_LIBS="`curl-config --libs`"
|
||||
else
|
||||
AC_MSG_RESULT(FAILED)
|
||||
AC_MSG_ERROR([$ver is too old. Need version $check or higher.])
|
||||
@@ -60,74 +60,3 @@ AC_DEFUN([TORRENT_CHECK_OPENSSL], [
|
||||
AC_MSG_ERROR(Could not find openssl's crypto library, try --with-openssl=PATH))
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_MINCORE_SIGNEDNESS], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING(signedness of mincore parameter)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
void f() { mincore((void*)0, 0, (unsigned char*)0); }
|
||||
]],
|
||||
[
|
||||
AC_DEFINE(USE_MINCORE_UNSIGNED, 1, use unsigned char* in mincore)
|
||||
AC_MSG_RESULT(unsigned)
|
||||
],
|
||||
[
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
void f() { mincore((void*)0, 0, (char*)0); }
|
||||
]],
|
||||
[
|
||||
AC_DEFINE(USE_MINCORE_UNSIGNED, 0, use char* in mincore)
|
||||
AC_MSG_RESULT(signed)
|
||||
],
|
||||
[
|
||||
AC_MSG_ERROR([mincore signedness test failed])
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_OTFD], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING(for proper overloaded template function disambiguation)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[template <typename T> void f(T&) {}
|
||||
template <typename T> void f(T*) {}
|
||||
int main() { int *i = 0; f(*i); f(i); }
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([your compiler does not properly handle overloaded template function disambiguation])
|
||||
])
|
||||
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
|
||||
AC_MSG_CHECKING(for execinfo.h)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <execinfo.h>
|
||||
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
AC_DEFUN([TORRENT_CHECK_CXXFLAGS], [
|
||||
|
||||
AC_MSG_CHECKING([for user-defined CXXFLAGS])
|
||||
|
||||
if test !$CXXFLAGS; then
|
||||
CXXFLAGS="-O3 -Wall"
|
||||
AC_MSG_RESULT([default "$CXXFLAGS"])
|
||||
else
|
||||
AC_MSG_RESULT([user-defined "$CXXFLAGS"])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_ENABLE_DEBUG], [
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug enable debug information [default=yes]],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
|
||||
else
|
||||
CXXFLAGS="$CXXFLAGS -DNDEBUG"
|
||||
fi
|
||||
],[
|
||||
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_ENABLE_WERROR], [
|
||||
|
||||
AC_ARG_ENABLE(werror,
|
||||
[ --enable-werror enable the -Werror flag [default=no]],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
CXXFLAGS="$CXXFLAGS -Werror"
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_OTFD], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING(for proper overloaded template function disambiguation)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[template <typename T> void f(T&) {}
|
||||
template <typename T> void f(T*) {}
|
||||
int main() { int *i = 0; f(*i); f(i); }
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([your compiler does not properly handle overloaded template function disambiguation])
|
||||
])
|
||||
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TORRENT_MINCORE_SIGNEDNESS], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING(signedness of mincore parameter)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
void f() { mincore((void*)0, 0, (unsigned char*)0); }
|
||||
]],
|
||||
[
|
||||
AC_DEFINE(USE_MINCORE_UNSIGNED, 1, use unsigned char* in mincore)
|
||||
AC_MSG_RESULT(unsigned)
|
||||
],
|
||||
[
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
void f() { mincore((void*)0, 0, (char*)0); }
|
||||
]],
|
||||
[
|
||||
AC_DEFINE(USE_MINCORE_UNSIGNED, 0, use char* in mincore)
|
||||
AC_MSG_RESULT(signed)
|
||||
],
|
||||
[
|
||||
AC_MSG_ERROR([mincore signedness test failed])
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
|
||||
AC_MSG_CHECKING(for execinfo.h)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <execinfo.h>
|
||||
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
Reference in New Issue
Block a user