diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-05-28 12:40:13 +1000 |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-05-28 12:40:13 +1000 |
commit | 40d2a1550603b8c3a9a9e1ed7e9c5324a16d9d02 (patch) | |
tree | abc629dc62d704d59d91d72381c835a4b2185d2e /configure | |
parent | 0ea1388daa28a42b598d4457f7d61a4095bd642b (diff) | |
parent | a2dbc00bc5904a886776dcde87244ef77d39a64b (diff) |
Merge branch '1.0' of git@scm.dev.nokia.troll.no:qtmobility/qtmobility into 1.0
Conflicts:
config.tests/lbt/lbt.pro
configure
configure.bat
dist/changes-1.0.0
doc/src/installation.qdoc
examples/player/player.cpp
plugins/declarative/declarative.pro
plugins/multimedia/symbian/mmf/mmf.pro
plugins/multimedia/symbian/openmaxal/mediarecorder/mediarecorder.pro
src/multimedia/multimedia.pro
src/multimedia/qvideooutputcontrol.cpp
src/multimedia/video/qimagevideobuffer.cpp
tests/auto/qaudiooutput/wavheader.h
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 129 |
1 files changed, 83 insertions, 46 deletions
@@ -1,7 +1,7 @@ #!/bin/sh ############################################################################# ## -## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## Contact: Nokia Corporation (qt-info@nokia.com) ## @@ -58,17 +58,16 @@ isAbsPath() { # maemo we do not want to follow symbolic links that are # introduced by scratchbox absPath() { - if [ "$2" = "maemo5" -o "$2" = "maemo6" ]; then if [ `isAbsPath $1` = '1' ]; then echo $1; else - echo "Relative prefix paths are not supported for Maemo" + echo >&2 "Relative prefix/bin/lib/header/plugin paths are not supported for Maemo" exit 1; fi else - RESULT=`(cd "$1"; /bin/pwd)` - echo $RESULT + PATH=`$relpath/bin/pathhelper $1` + echo $PATH fi } @@ -86,6 +85,7 @@ QT_MOBILITY_PREFIX=$shadowpath/install QT_MOBILITY_INCLUDE= QT_MOBILITY_LIB= QT_MOBILITY_BIN= +QT_MOBILITY_PLUGINS= BUILD_UNITTESTS= BUILD_EXAMPLES= BUILD_DOCS=yes @@ -96,9 +96,12 @@ LINUX_TARGET= QMAKE_CACHE="$shadowpath/.qmake.cache" LIB_PATH="lib" BIN_PATH="bin" +PLUGIN_PATH="plugins" MAC_SDK= MOBILITY_MODULES="bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors" MOBILITY_MODULES_UNPARSED= +QMKSPEC= +OS="other" usage() { @@ -117,6 +120,8 @@ usage() echo " (default PREFIX/lib)" echo "-bindir <dir> ..... Executables will be installed to <dir>" echo " (default PREFIX/bin)" + echo "-plugindir <dir> .. Plug-ins will be installed to <dir>" + echo " (default PREFIX/plugins)" echo "-debug ............ Build with debugging symbols" echo "-release .......... Build without debugging symbols" echo "-silent ........... Reduces build output" @@ -169,6 +174,10 @@ while [ "$#" -gt 0 ]; do QT_MOBILITY_BIN="$2" shift ;; + -plugindir) + QT_MOBILITY_PLUGINS="$2" + shift + ;; -tests) BUILD_UNITTESTS="yes" ;; @@ -232,13 +241,23 @@ while [ "$#" -gt 0 ]; do shift done +checkostype() +{ + match="darwin" + if [ "$OSTYPE" = "${match}"* ]; then + OS="darwin" + QMKSPEC="-spec macx-g++" + echo "QMAKESPEC = "$QMKSPEC >> "$CONFIG_IN" + fi +} + findframeworks() { # figure out if Qt was built with frameworks # if so, install in the correct place. # and fix rpath echo "contains(QT_CONFIG,qt_framework):message(1)" > 1.pro - SOMETHING=`qmake 1.pro 2>&1` + SOMETHING=`qmake -spec macx-g++ 1.pro 2>&1` if [ "$SOMETHING" = "Project MESSAGE: 1" ]; then LIB_PATH="Library/Frameworks" BIN_PATH="Applications" @@ -246,7 +265,6 @@ findframeworks() rm 1.pro } -findframeworks findUniversal() { @@ -257,19 +275,26 @@ findUniversal() echo "contains(QT_CONFIG,ppc): system(echo CONFIG+=ppc >> mac.inc)" >> 2.pro echo "contains(QT_CONFIG,ppc64): system(echo CONFIG+=ppc64 >> mac.inc)" >> 2.pro echo "contains(QT_CONFIG,x86_64): system(echo CONFIG+=x86_64 >> mac.inc)" >> 2.pro - SOMETIME=`qmake 2.pro 2>&1` + SOMETIME=`qmake -spec macx-g++ 2.pro 2>&1` rm 2.pro if [ -e "mac.inc" ]; then echo "exists(mac.inc): include(mac.inc)" >> "$CONFIG_IN" fi } +checkostype + +if [ "$OS" = "darwin" ] ; then + findframeworks +fi if [ -n "$BUILD_SILENT" ]; then echo "CONFIG += silent" > "$CONFIG_IN" fi -findUniversal +if [ "$OS" = "darwin" ] ; then + findUniversal +fi if [ -z "$RELEASEMODE" ]; then RELEASEMODE="debug" @@ -286,24 +311,20 @@ if [ -n "$LINUX_TARGET" ]; then fi #process PREFIX -if [ -d "$QT_MOBILITY_PREFIX" ]; then - QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET` -else - mkdir -p "$QT_MOBILITY_PREFIX" - QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET` - rm -rf "$QT_MOBILITY_PREFIX" +QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET` +if [ "$?" -eq "1" ]; then + exit 1 fi echo "QT_MOBILITY_PREFIX = $QT_MOBILITY_PREFIX" >> "$CONFIG_IN" #process include path if [ -z "$QT_MOBILITY_INCLUDE" ]; then QT_MOBILITY_INCLUDE="$QT_MOBILITY_PREFIX/include" -elif [ -d "$QT_MOBILITY_INCLUDE" ]; then - QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET` else - mkdir -p "$QT_MOBILITY_INCLUDE" QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET` - rm -rf "$QT_MOBILITY_INCLUDE" + if [ "$?" -eq "1" ]; then + exit 1 + fi fi echo "QT_MOBILITY_INCLUDE = $QT_MOBILITY_INCLUDE" >> "$CONFIG_IN" @@ -311,27 +332,37 @@ echo "QT_MOBILITY_INCLUDE = $QT_MOBILITY_INCLUDE" >> "$CONFIG_IN" #process library path if [ -z "$QT_MOBILITY_LIB" ]; then QT_MOBILITY_LIB="$QT_MOBILITY_PREFIX/$LIB_PATH" -elif [ -d "$QT_MOBILITY_LIB" ]; then - QT_MOBILITY_LIB=`absPath $QT_MOBILITY_LIB $LINUX_TARGET` else - mkdir -p "$QT_MOBILITY_LIB" QT_MOBILITY_LIB=`absPath $QT_MOBILITY_LIB $LINUX_TARGET` - rm -rf "$QT_MOBILITY_LIB" + if [ "$?" -eq "1" ]; then + exit 1 + fi fi echo "QT_MOBILITY_LIB = $QT_MOBILITY_LIB" >> "$CONFIG_IN" -#process binary path +#process bin path if [ -z "$QT_MOBILITY_BIN" ]; then QT_MOBILITY_BIN="$QT_MOBILITY_PREFIX/$BIN_PATH" -elif [ -d "$QT_MOBILITY_BIN" ]; then - QT_MOBILITY_BIN=`absPath $QT_MOBILITY_BIN $LINUX_TARGET` else - mkdir -p "$QT_MOBILITY_BIN" QT_MOBILITY_BIN=`absPath $QT_MOBILITY_BIN $LINUX_TARGET` - rm -rf "$QT_MOBILITY_BIN" + if [ "$?" -eq "1" ]; then + exit 1 + fi fi echo "QT_MOBILITY_BIN = $QT_MOBILITY_BIN" >> "$CONFIG_IN" +#process plugin path +if [ -z "$QT_MOBILITY_PLUGINS" ]; then + QT_MOBILITY_PLUGINS="$QT_MOBILITY_PREFIX/$PLUGIN_PATH" +else + QT_MOBILITY_PLUGINS=`absPath $QT_MOBILITY_PLUGINS $LINUX_TARGET` + if [ "$?" -eq "1" ]; then + exit 1 + fi +fi +echo "QT_MOBILITY_PLUGINS = $QT_MOBILITY_PLUGINS" >> "$CONFIG_IN" + + echo "QT_MOBILITY_SOURCE_TREE = $relpath" >> "$QMAKE_CACHE" echo "QT_MOBILITY_BUILD_TREE = $shadowpath" >> "$QMAKE_CACHE" @@ -408,7 +439,7 @@ compileTest() cd config.tests/$2 fi - qmake "$relpath/config.tests/$2/$2.pro" 2>> "$CONFIG_LOG" >> "$CONFIG_LOG" + qmake $QMKSPEC "$relpath/config.tests/$2/$2.pro" 2>> "$CONFIG_LOG" >> "$CONFIG_LOG" printf " ." "$MAKE" clean >> "$CONFIG_LOG" printf "." @@ -430,6 +461,12 @@ compileTest NetworkManager networkmanager compileTest "CoreWLAN (MacOS 10.6)" corewlan compileTest "Maemo ICD" maemo-icd compileTest "Maemo ICD WLAN" maemo-icd-network-wlan +compileTest "Maemo5 contacts dependencies" maemo5-contacts +if [ "$LINUX_TARGET" = maemo6 ]; then + compileTest sensord sensord +else + echo "sensord_enabled = no" >> "$CONFIG_IN" +fi # Now module selection # using 'expr match ....' should help a bit @@ -455,25 +492,25 @@ mkdir $shadowpath/include for module in $MOBILITY_MODULES; do case "$module" in bearer) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/bearer + $relpath/bin/syncheaders $shadowpath/include/QtmBearer $relpath/src/bearer ;; publishsubscribe) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/publishsubscribe + $relpath/bin/syncheaders $shadowpath/include/QtmPubSub $relpath/src/publishsubscribe ;; location) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/location + $relpath/bin/syncheaders $shadowpath/include/QtmLocation $relpath/src/location ;; serviceframework) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/serviceframework + $relpath/bin/syncheaders $shadowpath/include/QtmServiceFramework $relpath/src/serviceframework ;; systeminfo) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/systeminfo + $relpath/bin/syncheaders $shadowpath/include/QtmSystemInfo $relpath/src/systeminfo ;; contacts) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts/details - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts/requests - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts/filters + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/details + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/requests + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/filters ;; multimedia) echo "contains(QT_CONFIG,multimedia):message(1)" > 1.pro @@ -491,18 +528,18 @@ for module in $MOBILITY_MODULES; do rm 1.pro ;; messaging) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/messaging + $relpath/bin/syncheaders $shadowpath/include/QtmMessaging $relpath/src/messaging ;; versit) #versit implies contacts - $relpath/bin/syncheaders $shadowpath/include $relpath/src/versit - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts/details - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts/requests - $relpath/bin/syncheaders $shadowpath/include $relpath/src/contacts/filters + $relpath/bin/syncheaders $shadowpath/include/QtmVersit $relpath/src/versit + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/details + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/requests + $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/filters ;; sensors) - $relpath/bin/syncheaders $shadowpath/include $relpath/src/sensors + $relpath/bin/syncheaders $shadowpath/include/QtmSensors $relpath/src/sensors ;; *) echo "Cannot generate headers for $module" @@ -517,7 +554,7 @@ if [ "$shadowpath" != "$relpath" ]; then fi echo "Running qmake..." -if qmake -recursive "$relpath/qtmobility.pro"; then +if qmake -makefile $QMKSPEC -recursive "$relpath/qtmobility.pro"; then echo "" echo "configure has finished. You may run make or gmake to build the project now." else |