summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-16 13:37:54 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-21 13:21:22 (GMT)
commit08ff267fe37dcccb7f63a8158b260e2e3b1e0965 (patch)
treea3d6a0651f710a43fa08a225236c4f555d1911c2
parent9317e521f0b0f689c87b95b927102dbf55edb89f (diff)
downloadQt-08ff267fe37dcccb7f63a8158b260e2e3b1e0965.zip
Qt-08ff267fe37dcccb7f63a8158b260e2e3b1e0965.tar.gz
Qt-08ff267fe37dcccb7f63a8158b260e2e3b1e0965.tar.bz2
Use the configure script to enable/disable QtConcurrent and QtXmlPatterns
Using qglobal.h and checking the compiler version with the preprocessor has the side-effect that moc won't generate proper code since it doesn't know about the compiler version. Enable both modules under Sun CC 5.9 and IBM xlC 7.0.
-rwxr-xr-xconfigure44
-rw-r--r--src/corelib/global/qglobal.h23
2 files changed, 36 insertions, 31 deletions
diff --git a/configure b/configure
index 87fe281..e05e1d5 100755
--- a/configure
+++ b/configure
@@ -6057,6 +6057,7 @@ fi
#
canBuildQtXmlPatterns="yes"
canBuildWebKit="$HAVE_STL"
+canBuildQtConcurrent="yes"
# WebKit requires stdint.h
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
@@ -6088,9 +6089,9 @@ case "$XPLATFORM" in
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
4*|3.4*)
;;
- 3.3*)
- canBuildWebKit="no"
- ;;
+ 3.3*)
+ canBuildWebKit="no"
+ ;;
*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
@@ -6098,17 +6099,22 @@ case "$XPLATFORM" in
esac
;;
solaris-cc*)
- # Check the compiler version
- case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
- *)
- canBuildWebKit="no"
- canBuildQtXmlPatterns="no"
- ;;
- esac
- ;;
+ # Check the compiler version
+ case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
+ 5.[012345678])
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ canBuildQtConcurrent="no"
+ ;;
+ 5.9)
+ canBuildWebKit="no"
+ ;;
+ esac
+ ;;
hpux-acc*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
+ canBuildQtConcurrent="no"
;;
hpuxi-acc*)
canBuildWebKit="no"
@@ -6137,17 +6143,28 @@ EOF
fi
case "$xlcver" in
- *)
+ [123456].*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
+ canBuildQtConcurrent="no"
+ ;;
+ *)
+ canBuildWebKit="no"
;;
esac
- ;;
+ ;;
irix-cc*)
canBuildWebKit="no"
+ canBuildQtConcurrent="no"
;;
esac
+CFG_CONCURRENT="yes"
+if [ "$canBuildQtConcurrent" = "no" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
+ CFG_CONCURRENT="no"
+fi
+
if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
exit 1
@@ -7056,6 +7073,7 @@ echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
[ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
+echo "QtConcurrent code.... $CFG_CONCURRENT"
echo "QtScriptTools module $CFG_SCRIPTTOOLS"
echo "QtXmlPatterns module $CFG_XMLPATTERNS"
echo "Phonon module ....... $CFG_PHONON"
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 866247a..7b16dff 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -2408,28 +2408,15 @@ QT_LICENSED_MODULE(DBus)
# define QT_NO_QFUTURE
#endif
-/*
- Turn off certain features for compilers that have problems parsing
- the code.
-*/
-#if (defined(Q_CC_HPACC) && defined(QT_ARCH_PARISC)) \
- || defined(Q_CC_MIPS) \
- || defined(Q_CC_XLC)
-// HP aCC A.03.*, MIPSpro, and xlC cannot handle
-// the template function declarations for the QtConcurrent functions
-# define QT_NO_QFUTURE
-# define QT_NO_CONCURRENT
-#endif
-
-// MSVC 6.0, MSVC .NET 2002, and old versions of Sun CC can`t handle the map(), etc templates,
+// MSVC 6.0 and MSVC .NET 2002, can`t handle the map(), etc templates,
// but the QFuture class compiles.
-#if (defined(Q_CC_MSVC) && _MSC_VER <= 1300) || (defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x590)
+#if (defined(Q_CC_MSVC) && _MSC_VER <= 1300)
# define QT_NO_CONCURRENT
#endif
-// Mingw uses a gcc 3 version which has problems with some of the
-// map/filter overloads. So does IRIX and Solaris.
-#if (defined(Q_OS_IRIX) || defined(Q_CC_MINGW) || defined (Q_OS_SOLARIS)) && (__GNUC__ < 4)
+// gcc 3 version has problems with some of the
+// map/filter overloads.
+#if defined(Q_CC_GNU) && (__GNUC__ < 4)
# define QT_NO_CONCURRENT_MAP
# define QT_NO_CONCURRENT_FILTER
#endif