--- a/qtmobility/configure Mon Jun 21 22:38:54 2010 +0100
+++ b/qtmobility/configure Thu Jul 22 16:42:52 2010 +0100
@@ -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 @@
# 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_INCLUDE=
QT_MOBILITY_LIB=
QT_MOBILITY_BIN=
+QT_MOBILITY_PLUGINS=
BUILD_UNITTESTS=
BUILD_EXAMPLES=
BUILD_DOCS=yes
@@ -96,9 +96,12 @@
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 @@
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 @@
QT_MOBILITY_BIN="$2"
shift
;;
+ -plugindir)
+ QT_MOBILITY_PLUGINS="$2"
+ shift
+ ;;
-tests)
BUILD_UNITTESTS="yes"
;;
@@ -232,13 +241,23 @@
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 @@
rm 1.pro
}
-findframeworks
findUniversal()
{
@@ -257,19 +275,26 @@
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 @@
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
+else
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 @@
#process library path
if [ -z "$QT_MOBILITY_LIB" ]; then
QT_MOBILITY_LIB="$QT_MOBILITY_PREFIX/$LIB_PATH"
-elif [ -d "$QT_MOBILITY_LIB" ]; then
+else
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
+else
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 @@
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,13 +461,12 @@
compileTest "CoreWLAN (MacOS 10.6)" corewlan
compileTest "Maemo ICD" maemo-icd
compileTest "Maemo ICD WLAN" maemo-icd-network-wlan
-
-# Now module selection
-# using 'expr match ....' should help a bit
-#if [ -n "$MOBILITY_MODULES_UNPARSED" ]; then
- # In theory we should do some sanity checking here.
-# MOBILITY_MODULES="$MOBILITY_MODULES_UNPARSED"
-#fi
+compileTest "Maemo5 contacts dependencies" maemo5-contacts
+if [ "$LINUX_TARGET" = maemo6 ]; then
+ compileTest sensord sensord
+else
+ echo "sensord_enabled = no" >> "$CONFIG_IN"
+fi
# It's a lot easier to make qmake do the dependency checking...
echo "mobility_modules = $MOBILITY_MODULES" >> "$CONFIG_IN"
@@ -455,42 +485,44 @@
for module in $MOBILITY_MODULES; do
case "$module" in
bearer)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/bearer
+ $relpath/bin/syncheaders $shadowpath/include/QtBearer $relpath/src/bearer
;;
publishsubscribe)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/publishsubscribe
+ $relpath/bin/syncheaders $shadowpath/include/QtPublishSubscribe $relpath/src/publishsubscribe
;;
location)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/location
+ $relpath/bin/syncheaders $shadowpath/include/QtLocation $relpath/src/location
;;
serviceframework)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/serviceframework
+ $relpath/bin/syncheaders $shadowpath/include/QtServiceFramework $relpath/src/serviceframework
;;
systeminfo)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/systeminfo
+ $relpath/bin/syncheaders $shadowpath/include/QtSystemInfo $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/QtContacts $relpath/src/contacts
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/details
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/requests
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/filters
;;
multimedia)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/multimedia
+ $relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia
+ $relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia/audio
+ $relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia/video
;;
messaging)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/messaging
+ $relpath/bin/syncheaders $shadowpath/include/QtMessaging $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/QtVersit $relpath/src/versit
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/details
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/requests
+ $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/filters
;;
sensors)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/sensors
+ $relpath/bin/syncheaders $shadowpath/include/QtSensors $relpath/src/sensors
;;
*)
echo "Cannot generate headers for $module"
@@ -505,7 +537,7 @@
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