summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorAlex <qt-info@nokia.com>2010-05-20 16:14:46 +1000
committerAlex <qt-info@nokia.com>2010-05-20 16:14:46 +1000
commitc8f319f6a32767ccf918561b148771d1c5e3950a (patch)
tree25f66dbd655b4f0f4e45a7deb2e0bf178ff08aa2 /configure
parent447996961a1c76dc7280dce7a58c62847761198f (diff)
parent86a97506acb143845803324ea50b583431bf70af (diff)
Merge branch 'master' of ../qtmobility
Conflicts: configure configure.bat doc/html/annotated.html doc/html/audiorecorder-audiorecorder-cpp.html doc/html/cameracapture-cameracapture-cpp.html doc/html/cameracapture-cameracapture-h.html doc/html/cameracapture-settings-cpp.html doc/html/classes.html doc/html/functions.html doc/html/index.html doc/html/multimedia.html doc/html/player-player-cpp.html doc/html/qaudiocapturesource-members.html doc/html/qaudiocapturesource.html doc/html/qaudioencodersettings.html doc/html/qaudioendpointselector-members.html doc/html/qaudioendpointselector.html doc/html/qcamera-members.html doc/html/qcamera.html doc/html/qcameracontrol-members.html doc/html/qcameracontrol.html doc/html/qcameraexposurecontrol-members.html doc/html/qcameraexposurecontrol.html doc/html/qcamerafocuscontrol-members.html doc/html/qcamerafocuscontrol.html doc/html/qgraphicsvideoitem.html doc/html/qimagecapturecontrol-members.html doc/html/qimagecapturecontrol.html doc/html/qmediacontainercontrol-members.html doc/html/qmediacontainercontrol.html doc/html/qmediacontent.html doc/html/qmediacontrol.html doc/html/qmediaimageviewer-members.html doc/html/qmediaobject-members.html doc/html/qmediaobject.html doc/html/qmediaplayer-members.html doc/html/qmediaplayer.html doc/html/qmediarecorder-members.html doc/html/qmediarecorder.html doc/html/qmediaresource-members.html doc/html/qmediaresource.html doc/html/qmediaservicesupportedformatsinterface-members.html doc/html/qmediaservicesupportedformatsinterface.html doc/html/qradiotuner-members.html doc/html/qradiotuner.html doc/html/qradiotunercontrol-members.html doc/html/qradiotunercontrol.html doc/html/qstillimagecapture-members.html doc/html/qt-mobility-project-library.dcf doc/html/qt-mobility-project-library.index doc/html/qtmedia.html doc/html/qtmobility.qhp doc/html/qvideoencodersettings.html doc/html/radio-radio-h.html doc/html/slideshow-slideshow-cpp.html doc/html/writemessage-messagesender-cpp.html doc/src/qtmobility.qdocconf features/mobility.prf.template src/global/qmobilityglobal.h tests/auto/support/support.pri
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure192
1 files changed, 157 insertions, 35 deletions
diff --git a/configure b/configure
index 80b3708fd5..9707271761 100755
--- a/configure
+++ b/configure
@@ -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)
##
@@ -40,6 +40,38 @@
##
#############################################################################
+# return status of 1 if absolute path as first argument
+# also prints the return status
+isAbsPath() {
+ slash=$(echo $1 | cut -c 1)
+ if [ "$slash" != "/" ]; then
+ echo 0
+ return 0
+ fi
+ echo 1
+ return 1
+}
+
+# Returns the absolute path for $1 for target $2
+# as an example $2 might have value "maemo5".
+# This is required because when building in scratchbox for
+# 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"
+ exit 1;
+ fi
+ else
+ RESULT=`(cd "$1"; /bin/pwd)`
+ echo $RESULT
+ fi
+}
+
+
# the current directory (shadow build dir)
shadowpath=`/bin/pwd`
# the name of this script
@@ -53,24 +85,30 @@ QT_MOBILITY_PREFIX=$shadowpath/install
QT_MOBILITY_INCLUDE=
QT_MOBILITY_LIB=
QT_MOBILITY_BIN=
+QT_MOBILITY_PLUGINS=
BUILD_UNITTESTS=
BUILD_EXAMPLES=
BUILD_DOCS=yes
+BUILD_TOOLS=yes
RELEASEMODE=
BUILD_SILENT=
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 telephony"
+MOBILITY_MODULES="bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors telephony"
MOBILITY_MODULES_UNPARSED=
+QMKSPEC=
+OS="other"
usage()
{
echo "Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]"
echo " [-bindir <dir>] [-tests] [-examples] [-no-docs]"
- echo " [-debug] [-release] [-silent] [-modules <list>]"
+ echo " [-no-tools] [-debug] [-release] [-silent]"
+ echo " [-modules <list>]"
echo
echo "Options:"
echo
@@ -82,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"
@@ -90,9 +130,11 @@ usage()
echo " and should not be used for release builds."
echo "-examples ......... Build example applications"
echo "-no-docs .......... Do not build documentation (build by default)"
+ echo "-no-tools ......... Do not build tools (build by default)"
echo "-modules <list> ... Restrict list of modules to build (default all supported)"
echo " Choose from: bearer contacts location publishsubscribe"
- echo " messaging multimedia systeminfo serviceframework telephony versit"
+ echo " messaging multimedia systeminfo serviceframework telephony"
+ echo " sensors versit"
echo " Modules should be separated by a space and surrounded"
echo " by double quotation. If a"
echo " selected module depends on other modules dependencies"
@@ -132,6 +174,10 @@ while [ "$#" -gt 0 ]; do
QT_MOBILITY_BIN="$2"
shift
;;
+ -plugindir)
+ QT_MOBILITY_PLUGINS="$2"
+ shift
+ ;;
-tests)
BUILD_UNITTESTS="yes"
;;
@@ -141,6 +187,9 @@ while [ "$#" -gt 0 ]; do
-no-docs)
BUILD_DOCS=
;;
+ -no-tools)
+ BUILD_TOOLS=
+ ;;
-debug)
RELEASEMODE=debug
;;
@@ -166,7 +215,7 @@ while [ "$#" -gt 0 ]; do
MOBILITY_MODULES=
for m in $MOBILITY_MODULES_UNPARSED; do
case "$m" in
- bearer|contacts|location|messaging|multimedia|publishsubscribe|serviceframework|systeminfo|telephony|versit)
+ bearer|contacts|location|messaging|multimedia|publishsubscribe|serviceframework|systeminfo|sensors|telephony|versit)
MOBILITY_MODULES="$MOBILITY_MODULES $m";
;;
*)
@@ -192,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"
@@ -206,12 +265,37 @@ findframeworks()
rm 1.pro
}
-findframeworks
+
+findUniversal()
+{
+ if [ -e "mac.inc" ]; then
+ rm mac.inc
+ fi
+ echo "contains(QT_CONFIG,x86): system(echo CONFIG+=x86 >> mac.inc)" > 2.pro
+ 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 -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
+if [ "$OS" = "darwin" ] ; then
+ findUniversal
+fi
+
if [ -z "$RELEASEMODE" ]; then
RELEASEMODE="debug"
fi
@@ -228,12 +312,11 @@ fi
#process PREFIX
if [ -d "$QT_MOBILITY_PREFIX" ]; then
- QT_MOBILITY_PREFIX=`(cd "$QT_MOBILITY_PREFIX"; /bin/pwd)`
+ QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET`
else
mkdir -p "$QT_MOBILITY_PREFIX"
- absPath=`(cd "$QT_MOBILITY_PREFIX"; /bin/pwd)`
+ QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET`
rm -rf "$QT_MOBILITY_PREFIX"
- QT_MOBILITY_PREFIX="$absPath"
fi
echo "QT_MOBILITY_PREFIX = $QT_MOBILITY_PREFIX" >> "$CONFIG_IN"
@@ -241,12 +324,11 @@ echo "QT_MOBILITY_PREFIX = $QT_MOBILITY_PREFIX" >> "$CONFIG_IN"
if [ -z "$QT_MOBILITY_INCLUDE" ]; then
QT_MOBILITY_INCLUDE="$QT_MOBILITY_PREFIX/include"
elif [ -d "$QT_MOBILITY_INCLUDE" ]; then
- QT_MOBILITY_INCLUDE=`(cd "$QT_MOBILITY_INCLUDE"; /bin/pwd)`
+ QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET`
else
mkdir -p "$QT_MOBILITY_INCLUDE"
- absPath=`(cd "$QT_MOBILITY_INCLUDE"; /bin/pwd)`
+ QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET`
rm -rf "$QT_MOBILITY_INCLUDE"
- QT_MOBILITY_INCLUDE="$absPath"
fi
echo "QT_MOBILITY_INCLUDE = $QT_MOBILITY_INCLUDE" >> "$CONFIG_IN"
@@ -255,28 +337,39 @@ echo "QT_MOBILITY_INCLUDE = $QT_MOBILITY_INCLUDE" >> "$CONFIG_IN"
if [ -z "$QT_MOBILITY_LIB" ]; then
QT_MOBILITY_LIB="$QT_MOBILITY_PREFIX/$LIB_PATH"
elif [ -d "$QT_MOBILITY_LIB" ]; then
- QT_MOBILITY_LIB=`(cd "$QT_MOBILITY_LIB"; /bin/pwd)`
+ QT_MOBILITY_LIB=`absPath $QT_MOBILITY_LIB $LINUX_TARGET`
else
mkdir -p "$QT_MOBILITY_LIB"
- absPath=`(cd "$QT_MOBILITY_LIB"; /bin/pwd)`
+ QT_MOBILITY_LIB=`absPath $QT_MOBILITY_LIB $LINUX_TARGET`
rm -rf "$QT_MOBILITY_LIB"
- QT_MOBILITY_LIB="$absPath"
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=`(cd "$QT_MOBILITY_BIN"; /bin/pwd)`
+ QT_MOBILITY_BIN=`absPath $QT_MOBILITY_BIN $LINUX_TARGET`
else
mkdir -p "$QT_MOBILITY_BIN"
- absPath=`(cd "$QT_MOBILITY_BIN"; /bin/pwd)`
+ QT_MOBILITY_BIN=`absPath $QT_MOBILITY_BIN $LINUX_TARGET`
rm -rf "$QT_MOBILITY_BIN"
- QT_MOBILITY_BIN="$absPath"
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"
+elif [ -d "$QT_MOBILITY_PLUGINS" ]; then
+ QT_MOBILITY_PLUGINS=`absPath $QT_MOBILITY_PLUGINS $LINUX_TARGET`
+else
+ mkdir -p "$QT_MOBILITY_PLUGINS"
+ QT_MOBILITY_PLUGINS=`absPath $QT_MOBILITY_PLUGINS $LINUX_TARGET`
+ rm -rf "$QT_MOBILITY_PLUGINS"
+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"
@@ -303,6 +396,12 @@ else
echo "build_docs = yes" >> "$CONFIG_IN"
fi
+if [ -z "$BUILD_TOOLS" ]; then
+ echo "build_tools = no" >> "$CONFIG_IN"
+else
+ echo "build_tools = yes" >> "$CONFIG_IN"
+fi
+
echo "Configuring Qt Mobility"
echo
@@ -347,7 +446,7 @@ compileTest()
cd config.tests/$2
fi
- qmake "$relpath/config.tests/$2/$2.pro" >> "$CONFIG_LOG"
+ qmake $QMKSPEC "$relpath/config.tests/$2/$2.pro" 2>> "$CONFIG_LOG" >> "$CONFIG_LOG"
printf " ."
"$MAKE" clean >> "$CONFIG_LOG"
printf "."
@@ -367,6 +466,14 @@ compileTest()
compileTest QMF qmf
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
@@ -378,47 +485,59 @@ compileTest "CoreWLAN (MacOS 10.6)" corewlan
# It's a lot easier to make qmake do the dependency checking...
echo "mobility_modules = $MOBILITY_MODULES" >> "$CONFIG_IN"
echo "contains(mobility_modules,versit): mobility_modules *= contacts" >> "$CONFIG_IN"
+echo "maemo5|maemo6:contains(maemo-icd_enabled, no): mobility_modules -= bearer" >> "$CONFIG_IN"
+
+# If libicd-network-wlan-dev.h is not present, use own copy.
+# At time of writing, libicd-network-wlan-dev is not released for maemo5.
+echo "maemo5:contains(maemo-icd-network-wlan_enabled, no): INCLUDEPATH += $relpath/src/3rdparty/icd-network-wlan" >> "$CONFIG_IN"
# Ideally we'd skip generating headers for modules that are not enabled
echo "Generating Mobility Headers..."
#remove old headers
rm -rf $shadowpath/include
mkdir $shadowpath/include
-$relpath/bin/syncheaders $shadowpath/include $relpath/src/global
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/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)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/multimedia
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/multimedia/experimental
+ $relpath/bin/syncheaders $shadowpath/include/QtmMedia $relpath/src/multimedia
;;
messaging)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/messaging
+ $relpath/bin/syncheaders $shadowpath/include/QtmMessaging $relpath/src/messaging
;;
telephony)
- $relpath/bin/syncheaders $shadowpath/include $relpath/src/telephony
+ $relpath/bin/syncheaders $shadowpath/include/QtmTelephony $relpath/src/telephony
;;
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/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/QtmSensors $relpath/src/sensors
;;
*)
echo "Cannot generate headers for $module"
@@ -428,9 +547,12 @@ done
mv "$CONFIG_IN" config.pri
mkdir -p "$shadowpath/features"
+if [ "$shadowpath" != "$relpath" ]; then
+ cp -f "$relpath/features/strict_flags.prf" "$shadowpath/features"
+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