summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 19 insertions, 1 deletions
diff --git a/configure b/configure
index c29c113da3..61f0ea0bea 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
#############################################################################
##
## Copyright (C) 2015 The Qt Company Ltd.
-## Copyright (C) 2013 Intel Corporation.
+## Copyright (C) 2015 Intel Corporation.
## Contact: http://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
@@ -661,6 +661,7 @@ CFG_SYSTEM_PROXIES=no
CFG_ANDROID_STYLE_ASSETS=yes
CFG_GSTREAMER=auto
CFG_GSTREAMER_VERSION=""
+CFG_ATOMIC64=auto
# Target architecture
CFG_ARCH=
@@ -4328,6 +4329,15 @@ if [ "$CFG_CXX11" != "no" ]; then
fi
fi
+# Detect whether 64-bit std::atomic works -- some 32-bit platforms require extra library support
+if compileTest common/atomic64 "64-bit std::atomic"; then
+ CFG_ATOMIC64=yes
+elif compileTest common/atomic64 "64-bit std::atomic in -latomic" -latomic; then
+ CFG_ATOMIC64=libatomic
+else
+ CFG_ATOMIC64=no
+fi
+
# detect sse2 support
if [ "${CFG_SSE2}" = "auto" ]; then
if compileTest common/sse2 "sse2"; then
@@ -6016,6 +6026,10 @@ fi
[ "$CFG_CXX11" = "yes" ] && QT_CONFIG="$QT_CONFIG c++11"
+if [ "$CFG_ATOMIC64" = "libatomic" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG atomic64-libatomic"
+fi
+
if [ "$CFG_SILENT" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG silent"
fi
@@ -6567,6 +6581,10 @@ else
echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
+if [ "$CFG_ATOMIC64" = "no" ]; then
+ echo "#define QT_NO_STD_ATOMIC64" >> "$outpath/src/corelib/global/qconfig.h.new"
+fi
+
#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"