ICU-10271 tweak to configure test for C++11 #include <atomic>.
X-SVN-Rev: 33992
This commit is contained in:
parent
41b7ee189d
commit
a04e4eb615
3
icu4c/source/configure
vendored
3
icu4c/source/configure
vendored
@ -5630,6 +5630,8 @@ fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if #include <atomic> works" >&5
|
||||
$as_echo_n "checking if #include <atomic> works... " >&6; }
|
||||
OLD_CXXFLAGS="${CXXFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS} -std=c++11"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <atomic>
|
||||
@ -5655,6 +5657,7 @@ then
|
||||
else
|
||||
U_HAVE_ATOMIC=0
|
||||
fi
|
||||
CXXFLAGS="${OLD_CXXFLAGS}"
|
||||
# Make this available via CPPFLAGS
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
|
||||
|
||||
|
@ -476,6 +476,8 @@ AC_SUBST(U_HAVE_STD_STRING)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([[if #include <atomic> works]])
|
||||
OLD_CXXFLAGS="${CXXFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS} -std=c++11"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <atomic>]], [[]])], [ac_cv_header_atomic=yes], [ac_cv_header_atomic=no])
|
||||
AC_MSG_RESULT($ac_cv_header_atomic)
|
||||
if test $ac_cv_header_atomic = yes
|
||||
@ -484,6 +486,7 @@ then
|
||||
else
|
||||
U_HAVE_ATOMIC=0
|
||||
fi
|
||||
CXXFLAGS="${OLD_CXXFLAGS}"
|
||||
# Make this available via CPPFLAGS
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
|
||||
AC_SUBST(U_HAVE_ATOMIC)
|
||||
|
Loading…
Reference in New Issue
Block a user