summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-05-04 15:46:48 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-05-07 07:59:39 (GMT)
commit175eedd991d321d0902ea0065f9b288c62958a5d (patch)
tree5a4f2ba418910a0edf9b129d4d84680a8dee115f
parentfff6751d0ae61837f08874bce5ad04c4b9536894 (diff)
downloadQt-175eedd991d321d0902ea0065f9b288c62958a5d.zip
Qt-175eedd991d321d0902ea0065f9b288c62958a5d.tar.gz
Qt-175eedd991d321d0902ea0065f9b288c62958a5d.tar.bz2
Add configure time checks for symbian environment
Adding test for various compile time components like rcomp and the compiler actually working should make it failing much more transparant. Reviewed-by: Thiago
-rw-r--r--config.tests/symbian/simple/main.cpp6
-rw-r--r--config.tests/symbian/simple/simple.pro4
-rwxr-xr-xconfigure41
3 files changed, 48 insertions, 3 deletions
diff --git a/config.tests/symbian/simple/main.cpp b/config.tests/symbian/simple/main.cpp
new file mode 100644
index 0000000..41371da
--- /dev/null
+++ b/config.tests/symbian/simple/main.cpp
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main(int, char **) {
+ printf("test\n");
+ return 0;
+}
diff --git a/config.tests/symbian/simple/simple.pro b/config.tests/symbian/simple/simple.pro
new file mode 100644
index 0000000..fa086c9
--- /dev/null
+++ b/config.tests/symbian/simple/simple.pro
@@ -0,0 +1,4 @@
+TEMPLATE = app
+QT =
+SOURCES += main.cpp
+
diff --git a/configure b/configure
index 6194eb5..a0ccf9a 100755
--- a/configure
+++ b/configure
@@ -780,7 +780,7 @@ L_FLAGS=
RPATH_FLAGS=
l_FLAGS=
QCONFIG_FLAGS=
-XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
+XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce"
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@@ -4057,7 +4057,7 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
EOF
fi
-if echo "$XPLATFORM" | grep symbian > /dev/null ; then
+case "$XPLATFORM" in *symbian*)
cat << EOF
Qt for Symbian only:
@@ -4069,7 +4069,8 @@ Qt for Symbian only:
-no-usedeffiles .... Disable the usage of DEF files.
* -usedeffiles ....... Enable the usage of DEF files.
EOF
-fi
+;;
+esac
[ "x$ERROR" = "xyes" ] && exit 1
exit 0
@@ -4697,6 +4698,40 @@ if [ "$CFG_ZLIB" = "auto" ]; then
fi
fi
+case "$XPLATFORM" in *symbian*)
+ if test -z "$EPOCROOT"; then
+ echo "Please export EPOCROOT. It should point to the sdk install dir"
+ exit 1
+ fi
+ if test ! -d "$EPOCROOT/epoc32"; then
+ echo "Could not find the 'epoc32' dir in your EPOCROOT."
+ exit 1
+ fi
+
+ # the main commands needed to compile;
+ (cd config.tests/symbian
+ mkdir -p rcomp
+ cd rcomp
+ rm -f rcomp_test.rsg
+ touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss
+ rcomp -u -m045,046,047 -s./rcomp_test.rpp -o./rcomp_test.rsc -h./rcomp_test.rsg -i./rcomp_test.rss 2>&1 > /dev/null
+ if test ! -f rcomp_test.rsg; then
+ echo "Finding a working rcomp in your PATH failed."
+ echo "Fatal error. Make sure you have the epoc tools working and in your PATH";
+ exit 1;
+ fi
+ )
+
+ # compile a simple main that uses printf
+ if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
+ then
+ echo "Testing your compiler failed. Could not compile a simple application."
+ echo "Fatal error; Rerun configure with -verbose to get more details."
+ exit 1;
+ fi
+ ;;
+esac
+
if [ "$CFG_S60" = "auto" ]; then
if echo "$XPLATFORM" | grep symbian > /dev/null; then
CFG_S60=yes