From 407d6225406991d869e32de1896d07ffc90ad234 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 25 Oct 2010 16:52:01 +0000 Subject: [PATCH] Actually make it work. git-svn-id: https://svn.dealii.org/trunk@22476 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 4 ++-- deal.II/configure | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 20dc46cd99..b2be5d6182 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -1060,8 +1060,8 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(whether std::thread actually works) AC_TRY_RUN( [#include - void f(int); ], - [ std::thread t(f,1); t.join();], + void f(int) {} + int main() { std::thread t(f,1); t.join(); } ], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] ) diff --git a/deal.II/configure b/deal.II/configure index 34246213ea..42cb525d2f 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -4379,9 +4379,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking whether std::thread actually works" >&5 $as_echo_n "checking whether std::thread actually works... " >&6; } if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; }; all_cxx1x_available=no - + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4390,7 +4394,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - void f(int); + void f(int) {} + int main() { std::thread t(f,1); t.join(); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -4414,15 +4419,17 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - std::thread t(f,1); t.join(); + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; }; all_cxx1x_available=no + fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -- 2.39.5