diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 271 |
1 files changed, 0 insertions, 271 deletions
diff --git a/configure.ac b/configure.ac index e285164f5..ebbc5f6cf 100644 --- a/configure.ac +++ b/configure.ac @@ -640,22 +640,6 @@ int main(int, char **) AC_MSG_ERROR([Your compiler is b0rked (GCC bug 39242? Try -O2 or -fno-inline-functions)])]) dnl }}} -dnl {{{ check for namespace aliasing -AC_MSG_CHECKING([whether your compiler has referencing issues]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -namespace n -{ - int x = 0; - int & r_x = x; -} - -using n::r_x; -])], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - AC_MSG_ERROR([Your compiler is b0rked (GCC bug 31899?)])]) -dnl }}} - dnl {{{ check whether we do explicit instantiation of fully specialised templates AC_MSG_CHECKING([whether we should explicitly instantiate fully specialised templates]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -670,261 +654,6 @@ template class S<int>; ]) dnl }}} -dnl {{{ check for static_assert -AC_MSG_CHECKING([for compiler support for static_assert]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -int main(int, char **) -{ - static_assert(true, "works"); -} -])], - [AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([whether static_assert works]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -int main(int, char **) -{ - static_assert(false, "works"); -} - ])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([your compiler static_assert implementation is broken (try GCC 4.4+)]) - ], - [AC_MSG_RESULT([yes])])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([your compiler does not do static_assert (try GCC 4.4+)]) - ]) -dnl }}} - -dnl {{{ check for hashes -AC_MSG_CHECKING([for hashed associative containers]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <unordered_map> -int main(int, char **) -{ - std::unordered_map<int, int> m; - m.insert(std::make_pair(1, 2)); -} -])], - [AC_MSG_RESULT([std::unordered_map])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler does not support unordered containers])]) -dnl }}} - -dnl {{{ check for threads -AC_MSG_CHECKING([for threads]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <thread> -int main(int, char **) -{ - std::thread t; -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler does not support threads])]) -dnl }}} - -dnl {{{ shared pointers -AC_MSG_CHECKING([for std::shared_ptr<>]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <memory> -int main(int, char **) -{ - std::shared_ptr<int> x(new int(10)); - x = std::make_shared<int>(20); - return *x; -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler does not support shared pointers])]) -dnl }}} - -dnl {{{ type traits -AC_MSG_CHECKING([for std::remove_pointer<>]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <type_traits> -int main(int, char **) -{ - std::remove_pointer<int *>::type x(10); - return x; -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler does not support type traits])]) -dnl }}} - -dnl {{{ binders -AC_MSG_CHECKING([for std::bind<>]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <functional> -#include <functional> -#include <algorithm> -#include <list> -struct S -{ - void x(const int) const - { - } -}; -int main(int, char **) -{ - using namespace std::placeholders; - std::list<int> l; - S s; - std::for_each(l.begin(), l.end(), - std::bind(std::mem_fn(&S::x), &s, _1)); -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler does not support functional])]) -dnl }}} - -dnl {{{ std::next -AC_MSG_CHECKING([for std::next]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <algorithm> -#include <iterator> -#include <list> -int main(int, char **) -{ - std::list<int> x; - next(x.begin()); -} -])], - [AC_MSG_RESULT([yes]) - PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_STD_NEXT=1" - PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_STD_NEXT=1" - ], - [AC_MSG_RESULT([no]) - ]) -dnl }}} - -dnl {{{ std::random -random_is_tr1= -AC_MSG_CHECKING([for c++0x-compliant <random>]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <random> -#include <ctime> -int main(int, char **) -{ - std::mt19937 rand(std::time(0)); - std::uniform_int_distribution<int> dist(0, 9); - return dist(rand); -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_CHECKING([for tr1-compliant <random>]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <random> -#include <ctime> -int main(int, char **) -{ - std::mt19937 rand(std::time(0)); - std::uniform_int<int> dist(0, 9); - return dist(rand); -} - ])], - [AC_MSG_RESULT([yes]) - random_is_tr1=yes], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler does not support <random>])]) - ]) - -if test x$random_is_tr1 = xyes ; then - PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_RANDOM_IS_TR1=1" -fi -dnl }}} - -dnl {{{ c++0x default and deleted functions -AC_MSG_CHECKING([for c++0x default and deleted functions]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -struct S -{ - S() = default; - S & operator= (const S &) = delete; -}; -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([your compiler does not support c++0x default and deleted functions]) - ]) -dnl }}} - -dnl {{{ c++0x variadic templates -AC_MSG_CHECKING([for c++0x variadic templates]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -template <typename... T_> -void f(const T_ & ... a) -{ -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([your compiler does not support c++0x variadic templates]) - ]) -dnl }}} - -dnl {{{ c++0x auto -AC_MSG_CHECKING([for c++0x auto]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <string> -std::string f(int); -int main(int, char **) -{ - auto x = f(1); -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([your compiler does not support c++0x auto]) - ]) -dnl }}} - -dnl {{{ c++0x rvalue references -AC_MSG_CHECKING([for c++0x rvalue references]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -int f(int && a) -{ - return a; -} -])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([your compiler does not support c++0x rvalue references]) - ]) -dnl }}} - -dnl {{{ c++0x enum classes -AC_MSG_CHECKING([for c++0x enum class support]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -enum class C : long { c }; -])], - [AC_MSG_RESULT([yes]) - PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_ENUM_CLASS=1" - PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_ENUM_CLASS=1" - ], - [AC_MSG_RESULT([no]) - ]) -dnl }}} - -dnl {{{ c++0x noexcept -AC_MSG_CHECKING([for c++0x noexcept]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -struct C { ~C() noexcept(false); }; -C::~C() noexcept(false) {} -])], - [AC_MSG_RESULT([yes]) - PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_NOEXCEPT=1" - PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_NOEXCEPT=1" - ], - [AC_MSG_RESULT([no]) - ]) -dnl }}} - CXXFLAGS="$save_CXXFLAGS" dnl {{{ visibility support |