mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 22:22:31 +00:00
Fixed compiler issues with gcc-4.6 c++0x.
This commit is contained in:
@@ -381,6 +381,30 @@ AC_DEFUN([TORRENT_CHECK_TR1], [
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_CHECK_CXX11], [
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING(for C++11 support)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <functional>
|
||||
#include <unordered_map>
|
||||
class Foo;
|
||||
typedef std::unordered_map<Foo*, int> Bar;
|
||||
|
||||
union test { Bar b1; };
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CXX11, 1, Define to 1 if your C++ compiler has support for C++11.)
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
]
|
||||
)
|
||||
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_WITH_FASTCGI], [
|
||||
AC_ARG_WITH(fastcgi,
|
||||
[ --with-fastcgi=PATH Enable FastCGI RPC support. (DO NOT USE)],
|
||||
|
||||
@@ -295,3 +295,18 @@ AC_DEFUN([TORRENT_ENABLE_TR1], [
|
||||
TORRENT_CHECK_TR1()
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_ENABLE_CXX11], [
|
||||
AC_ARG_ENABLE(std_c++11,
|
||||
[ --disable-std_c++11 disable check for support for C++11 [[default=enable]]],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
TORRENT_CHECK_CXX11()
|
||||
else
|
||||
AC_MSG_CHECKING(for C++11 support)
|
||||
AC_MSG_RESULT(disabled)
|
||||
fi
|
||||
],[
|
||||
TORRENT_CHECK_CXX11()
|
||||
])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user