AC_MSG_CHECKING(whether std::thread actually works)
AC_TRY_RUN(
[#include <thread>
- 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 ]
)
{ $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. */
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <thread>
- 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"
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