23
|
1 |
#!/bin/sh
|
|
2 |
#############################################################################
|
|
3 |
##
|
|
4 |
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
5 |
## All rights reserved.
|
|
6 |
## Contact: Nokia Corporation (qt-info@nokia.com)
|
|
7 |
##
|
|
8 |
## This file is part of the Qt Mobility Components.
|
|
9 |
##
|
|
10 |
## $QT_BEGIN_LICENSE:LGPL$
|
|
11 |
## No Commercial Usage
|
|
12 |
## This file contains pre-release code and may not be distributed.
|
|
13 |
## You may use this file in accordance with the terms and conditions
|
|
14 |
## contained in the Technology Preview License Agreement accompanying
|
|
15 |
## this package.
|
|
16 |
##
|
|
17 |
## GNU Lesser General Public License Usage
|
|
18 |
## Alternatively, this file may be used under the terms of the GNU Lesser
|
|
19 |
## General Public License version 2.1 as published by the Free Software
|
|
20 |
## Foundation and appearing in the file LICENSE.LGPL included in the
|
|
21 |
## packaging of this file. Please review the following information to
|
|
22 |
## ensure the GNU Lesser General Public License version 2.1 requirements
|
|
23 |
## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
24 |
##
|
|
25 |
## In addition, as a special exception, Nokia gives you certain additional
|
|
26 |
## rights. These rights are described in the Nokia Qt LGPL Exception
|
|
27 |
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
28 |
##
|
|
29 |
## If you have questions regarding the use of this file, please contact
|
|
30 |
## Nokia at qt-info@nokia.com.
|
|
31 |
##
|
|
32 |
##
|
|
33 |
##
|
|
34 |
##
|
|
35 |
##
|
|
36 |
##
|
|
37 |
##
|
|
38 |
##
|
|
39 |
## $QT_END_LICENSE$
|
|
40 |
##
|
|
41 |
#############################################################################
|
|
42 |
|
|
43 |
# return status of 1 if absolute path as first argument
|
|
44 |
# also prints the return status
|
|
45 |
isAbsPath() {
|
|
46 |
slash=$(echo $1 | cut -c 1)
|
|
47 |
if [ "$slash" != "/" ]; then
|
|
48 |
echo 0
|
|
49 |
return 0
|
|
50 |
fi
|
|
51 |
echo 1
|
|
52 |
return 1
|
|
53 |
}
|
|
54 |
|
|
55 |
# Returns the absolute path for $1 for target $2
|
|
56 |
# as an example $2 might have value "maemo5".
|
|
57 |
# This is required because when building in scratchbox for
|
|
58 |
# maemo we do not want to follow symbolic links that are
|
|
59 |
# introduced by scratchbox
|
|
60 |
absPath() {
|
|
61 |
if [ "$2" = "maemo5" -o "$2" = "maemo6" ]; then
|
|
62 |
if [ `isAbsPath $1` = '1' ]; then
|
|
63 |
echo $1;
|
|
64 |
else
|
|
65 |
echo >&2 "Relative prefix/bin/lib/header/plugin paths are not supported for Maemo"
|
|
66 |
exit 1;
|
|
67 |
fi
|
|
68 |
else
|
|
69 |
PATH=`$relpath/bin/pathhelper $1`
|
|
70 |
echo $PATH
|
|
71 |
fi
|
|
72 |
}
|
|
73 |
|
|
74 |
|
|
75 |
# the current directory (shadow build dir)
|
|
76 |
shadowpath=`/bin/pwd`
|
|
77 |
# the name of this script
|
|
78 |
relconf=`basename $0`
|
|
79 |
# the directory of this script is the "source tree"
|
|
80 |
relpath=`dirname $0`
|
|
81 |
relpath=`(cd "$relpath"; /bin/pwd)`
|
|
82 |
|
|
83 |
CONFIG_IN="$shadowpath/config.in"
|
|
84 |
QT_MOBILITY_PREFIX=$shadowpath/install
|
|
85 |
QT_MOBILITY_INCLUDE=
|
|
86 |
QT_MOBILITY_LIB=
|
|
87 |
QT_MOBILITY_BIN=
|
|
88 |
QT_MOBILITY_PLUGINS=
|
|
89 |
BUILD_UNITTESTS=
|
|
90 |
BUILD_EXAMPLES=
|
|
91 |
BUILD_DOCS=yes
|
|
92 |
BUILD_TOOLS=yes
|
|
93 |
RELEASEMODE=
|
|
94 |
BUILD_SILENT=
|
|
95 |
LINUX_TARGET=
|
|
96 |
QMAKE_CACHE="$shadowpath/.qmake.cache"
|
|
97 |
LIB_PATH="lib"
|
|
98 |
BIN_PATH="bin"
|
|
99 |
PLUGIN_PATH="plugins"
|
|
100 |
MAC_SDK=
|
|
101 |
MOBILITY_MODULES="bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors"
|
|
102 |
MOBILITY_MODULES_UNPARSED=
|
|
103 |
QMKSPEC=
|
|
104 |
OS="other"
|
|
105 |
|
|
106 |
usage()
|
|
107 |
{
|
|
108 |
echo "Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]"
|
|
109 |
echo " [-bindir <dir>] [-tests] [-examples] [-no-docs]"
|
|
110 |
echo " [-no-tools] [-debug] [-release] [-silent]"
|
|
111 |
echo " [-modules <list>]"
|
|
112 |
echo
|
|
113 |
echo "Options:"
|
|
114 |
echo
|
|
115 |
echo "-prefix <dir> ..... This will install everything relative to <dir>"
|
|
116 |
echo " (default prefix: $shadowpath/install)"
|
|
117 |
echo "-headerdir <dir> .. Header files will be installed to <dir>"
|
|
118 |
echo " (default prefix: PREFIX/include)"
|
|
119 |
echo "-libdir <dir> ..... Libraries will be installed to <dir>"
|
|
120 |
echo " (default PREFIX/lib)"
|
|
121 |
echo "-bindir <dir> ..... Executables will be installed to <dir>"
|
|
122 |
echo " (default PREFIX/bin)"
|
|
123 |
echo "-plugindir <dir> .. Plug-ins will be installed to <dir>"
|
|
124 |
echo " (default PREFIX/plugins)"
|
|
125 |
echo "-debug ............ Build with debugging symbols"
|
|
126 |
echo "-release .......... Build without debugging symbols"
|
|
127 |
echo "-silent ........... Reduces build output"
|
|
128 |
echo "-tests ............ Build unit tests (not build by default)"
|
|
129 |
echo " Note, this adds test symbols to all libraries"
|
|
130 |
echo " and should not be used for release builds."
|
|
131 |
echo "-examples ......... Build example applications"
|
|
132 |
echo "-no-docs .......... Do not build documentation (build by default)"
|
|
133 |
echo "-no-tools ......... Do not build tools (build by default)"
|
|
134 |
echo "-modules <list> ... Restrict list of modules to build (default all supported)"
|
|
135 |
echo " Choose from: bearer contacts location publishsubscribe"
|
|
136 |
echo " messaging multimedia systeminfo serviceframework versit"
|
|
137 |
echo " sensors"
|
|
138 |
echo " Modules should be separated by a space and surrounded"
|
|
139 |
echo " by double quotation. If a"
|
|
140 |
echo " selected module depends on other modules dependencies"
|
|
141 |
echo " will automatically be enabled."
|
|
142 |
echo "-maemo6 ........... Build Qt Mobility for Maemo6 (Harmattan)."
|
|
143 |
echo "-maemo5 ........... Build Qt Mobility for Maemo5 (Freemantle)."
|
|
144 |
echo "-sdk <sdk>..........Build using Apple provided SDK <path/to/sdk>."
|
|
145 |
echo " example: -sdk /Developer/SDKs/MacOSX10.6.sdk"
|
|
146 |
echo
|
|
147 |
|
|
148 |
rm -f "$CONFIG_IN"
|
|
149 |
exit 1
|
|
150 |
}
|
|
151 |
|
|
152 |
rm -rf "$QMAKE_CACHE"
|
|
153 |
CONFIG_LOG="$shadowpath/config.log"
|
|
154 |
rm -rf "$CONFIG_LOG"
|
|
155 |
|
|
156 |
while [ "$#" -gt 0 ]; do
|
|
157 |
case "$1" in
|
|
158 |
-h|-help|--help)
|
|
159 |
usage
|
|
160 |
;;
|
|
161 |
-headerdir)
|
|
162 |
QT_MOBILITY_INCLUDE="$2"
|
|
163 |
shift
|
|
164 |
;;
|
|
165 |
-libdir)
|
|
166 |
QT_MOBILITY_LIB="$2"
|
|
167 |
shift
|
|
168 |
;;
|
|
169 |
--prefix|-prefix)
|
|
170 |
QT_MOBILITY_PREFIX="$2"
|
|
171 |
shift
|
|
172 |
;;
|
|
173 |
-bindir)
|
|
174 |
QT_MOBILITY_BIN="$2"
|
|
175 |
shift
|
|
176 |
;;
|
|
177 |
-plugindir)
|
|
178 |
QT_MOBILITY_PLUGINS="$2"
|
|
179 |
shift
|
|
180 |
;;
|
|
181 |
-tests)
|
|
182 |
BUILD_UNITTESTS="yes"
|
|
183 |
;;
|
|
184 |
-examples)
|
|
185 |
BUILD_EXAMPLES="yes"
|
|
186 |
;;
|
|
187 |
-no-docs)
|
|
188 |
BUILD_DOCS=
|
|
189 |
;;
|
|
190 |
-no-tools)
|
|
191 |
BUILD_TOOLS=
|
|
192 |
;;
|
|
193 |
-debug)
|
|
194 |
RELEASEMODE=debug
|
|
195 |
;;
|
|
196 |
-release)
|
|
197 |
RELEASEMODE=release
|
|
198 |
;;
|
|
199 |
-silent)
|
|
200 |
BUILD_SILENT=yes
|
|
201 |
;;
|
|
202 |
-maemo5)
|
|
203 |
LINUX_TARGET=maemo5
|
|
204 |
;;
|
|
205 |
-maemo6)
|
|
206 |
LINUX_TARGET=maemo6
|
|
207 |
;;
|
|
208 |
-sdk)
|
|
209 |
MAC_SDK="$2"
|
|
210 |
shift
|
|
211 |
;;
|
|
212 |
-modules)
|
|
213 |
MOBILITY_MODULES_UNPARSED=$2
|
|
214 |
#reset default selection
|
|
215 |
MOBILITY_MODULES=
|
|
216 |
for m in $MOBILITY_MODULES_UNPARSED; do
|
|
217 |
case "$m" in
|
|
218 |
bearer|contacts|location|messaging|multimedia|publishsubscribe|serviceframework|systeminfo|versit|sensors)
|
|
219 |
MOBILITY_MODULES="$MOBILITY_MODULES $m";
|
|
220 |
;;
|
|
221 |
*)
|
|
222 |
echo "Unknown module: $m"
|
|
223 |
echo
|
|
224 |
usage
|
|
225 |
;;
|
|
226 |
|
|
227 |
esac
|
|
228 |
done
|
|
229 |
if [ -z "$MOBILITY_MODULES" ]; then
|
|
230 |
echo "List of selected modules is empty."
|
|
231 |
echo
|
|
232 |
usage
|
|
233 |
fi
|
|
234 |
shift
|
|
235 |
;;
|
|
236 |
*)
|
|
237 |
echo "Unknown option: $1"
|
|
238 |
usage
|
|
239 |
;;
|
|
240 |
esac
|
|
241 |
shift
|
|
242 |
done
|
|
243 |
|
|
244 |
checkostype()
|
|
245 |
{
|
|
246 |
match="darwin"
|
|
247 |
if [ "$OSTYPE" = "${match}"* ]; then
|
|
248 |
OS="darwin"
|
|
249 |
QMKSPEC="-spec macx-g++"
|
|
250 |
echo "QMAKESPEC = "$QMKSPEC >> "$CONFIG_IN"
|
|
251 |
fi
|
|
252 |
}
|
|
253 |
|
|
254 |
findframeworks()
|
|
255 |
{
|
|
256 |
# figure out if Qt was built with frameworks
|
|
257 |
# if so, install in the correct place.
|
|
258 |
# and fix rpath
|
|
259 |
echo "contains(QT_CONFIG,qt_framework):message(1)" > 1.pro
|
|
260 |
SOMETHING=`qmake -spec macx-g++ 1.pro 2>&1`
|
|
261 |
if [ "$SOMETHING" = "Project MESSAGE: 1" ]; then
|
|
262 |
LIB_PATH="Library/Frameworks"
|
|
263 |
BIN_PATH="Applications"
|
|
264 |
fi
|
|
265 |
rm 1.pro
|
|
266 |
}
|
|
267 |
|
|
268 |
|
|
269 |
findUniversal()
|
|
270 |
{
|
|
271 |
if [ -e "mac.inc" ]; then
|
|
272 |
rm mac.inc
|
|
273 |
fi
|
|
274 |
echo "contains(QT_CONFIG,x86): system(echo CONFIG+=x86 >> mac.inc)" > 2.pro
|
|
275 |
echo "contains(QT_CONFIG,ppc): system(echo CONFIG+=ppc >> mac.inc)" >> 2.pro
|
|
276 |
echo "contains(QT_CONFIG,ppc64): system(echo CONFIG+=ppc64 >> mac.inc)" >> 2.pro
|
|
277 |
echo "contains(QT_CONFIG,x86_64): system(echo CONFIG+=x86_64 >> mac.inc)" >> 2.pro
|
|
278 |
SOMETIME=`qmake -spec macx-g++ 2.pro 2>&1`
|
|
279 |
rm 2.pro
|
|
280 |
if [ -e "mac.inc" ]; then
|
|
281 |
echo "exists(mac.inc): include(mac.inc)" >> "$CONFIG_IN"
|
|
282 |
fi
|
|
283 |
}
|
|
284 |
|
|
285 |
checkostype
|
|
286 |
|
|
287 |
if [ "$OS" = "darwin" ] ; then
|
|
288 |
findframeworks
|
|
289 |
fi
|
|
290 |
|
|
291 |
if [ -n "$BUILD_SILENT" ]; then
|
|
292 |
echo "CONFIG += silent" > "$CONFIG_IN"
|
|
293 |
fi
|
|
294 |
|
|
295 |
if [ "$OS" = "darwin" ] ; then
|
|
296 |
findUniversal
|
|
297 |
fi
|
|
298 |
|
|
299 |
if [ -z "$RELEASEMODE" ]; then
|
|
300 |
RELEASEMODE="debug"
|
|
301 |
fi
|
|
302 |
echo "CONFIG += $RELEASEMODE" >> "$CONFIG_IN"
|
|
303 |
|
|
304 |
#do we build for Maemo?
|
|
305 |
if [ -n "$LINUX_TARGET" ]; then
|
|
306 |
if [ "$LINUX_TARGET" = "maemo5" ]; then
|
|
307 |
echo "CONFIG+=maemo5" >> "$CONFIG_IN"
|
|
308 |
elif [ "$LINUX_TARGET" = "maemo6" ]; then
|
|
309 |
echo "CONFIG+=maemo6" >> "$CONFIG_IN"
|
|
310 |
fi
|
|
311 |
fi
|
|
312 |
|
|
313 |
#process PREFIX
|
|
314 |
QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET`
|
|
315 |
if [ "$?" -eq "1" ]; then
|
|
316 |
exit 1
|
|
317 |
fi
|
|
318 |
echo "QT_MOBILITY_PREFIX = $QT_MOBILITY_PREFIX" >> "$CONFIG_IN"
|
|
319 |
|
|
320 |
#process include path
|
|
321 |
if [ -z "$QT_MOBILITY_INCLUDE" ]; then
|
|
322 |
QT_MOBILITY_INCLUDE="$QT_MOBILITY_PREFIX/include"
|
|
323 |
else
|
|
324 |
QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET`
|
|
325 |
if [ "$?" -eq "1" ]; then
|
|
326 |
exit 1
|
|
327 |
fi
|
|
328 |
fi
|
|
329 |
echo "QT_MOBILITY_INCLUDE = $QT_MOBILITY_INCLUDE" >> "$CONFIG_IN"
|
|
330 |
|
|
331 |
|
|
332 |
#process library path
|
|
333 |
if [ -z "$QT_MOBILITY_LIB" ]; then
|
|
334 |
QT_MOBILITY_LIB="$QT_MOBILITY_PREFIX/$LIB_PATH"
|
|
335 |
else
|
|
336 |
QT_MOBILITY_LIB=`absPath $QT_MOBILITY_LIB $LINUX_TARGET`
|
|
337 |
if [ "$?" -eq "1" ]; then
|
|
338 |
exit 1
|
|
339 |
fi
|
|
340 |
fi
|
|
341 |
echo "QT_MOBILITY_LIB = $QT_MOBILITY_LIB" >> "$CONFIG_IN"
|
|
342 |
|
|
343 |
#process bin path
|
|
344 |
if [ -z "$QT_MOBILITY_BIN" ]; then
|
|
345 |
QT_MOBILITY_BIN="$QT_MOBILITY_PREFIX/$BIN_PATH"
|
|
346 |
else
|
|
347 |
QT_MOBILITY_BIN=`absPath $QT_MOBILITY_BIN $LINUX_TARGET`
|
|
348 |
if [ "$?" -eq "1" ]; then
|
|
349 |
exit 1
|
|
350 |
fi
|
|
351 |
fi
|
|
352 |
echo "QT_MOBILITY_BIN = $QT_MOBILITY_BIN" >> "$CONFIG_IN"
|
|
353 |
|
|
354 |
#process plugin path
|
|
355 |
if [ -z "$QT_MOBILITY_PLUGINS" ]; then
|
|
356 |
QT_MOBILITY_PLUGINS="$QT_MOBILITY_PREFIX/$PLUGIN_PATH"
|
|
357 |
else
|
|
358 |
QT_MOBILITY_PLUGINS=`absPath $QT_MOBILITY_PLUGINS $LINUX_TARGET`
|
|
359 |
if [ "$?" -eq "1" ]; then
|
|
360 |
exit 1
|
|
361 |
fi
|
|
362 |
fi
|
|
363 |
echo "QT_MOBILITY_PLUGINS = $QT_MOBILITY_PLUGINS" >> "$CONFIG_IN"
|
|
364 |
|
|
365 |
|
|
366 |
echo "QT_MOBILITY_SOURCE_TREE = $relpath" >> "$QMAKE_CACHE"
|
|
367 |
echo "QT_MOBILITY_BUILD_TREE = $shadowpath" >> "$QMAKE_CACHE"
|
|
368 |
|
|
369 |
if [ -n "$MAC_SDK" ]; then
|
|
370 |
QMAKE_MAC_SDK="$MAC_SDK"
|
|
371 |
echo "QMAKE_MAC_SDK = $QMAKE_MAC_SDK" >> "$CONFIG_IN"
|
|
372 |
fi
|
|
373 |
|
|
374 |
if [ -z "$BUILD_UNITTESTS" ]; then
|
|
375 |
echo "build_unit_tests = no" >> "$CONFIG_IN"
|
|
376 |
else
|
|
377 |
echo "build_unit_tests = yes" >> "$CONFIG_IN"
|
|
378 |
fi
|
|
379 |
|
|
380 |
if [ -z "$BUILD_EXAMPLES" ]; then
|
|
381 |
echo "build_examples = no" >> "$CONFIG_IN"
|
|
382 |
else
|
|
383 |
echo "build_examples = yes" >> "$CONFIG_IN"
|
|
384 |
fi
|
|
385 |
|
|
386 |
if [ -z "$BUILD_DOCS" ]; then
|
|
387 |
echo "build_docs = no" >> "$CONFIG_IN"
|
|
388 |
else
|
|
389 |
echo "build_docs = yes" >> "$CONFIG_IN"
|
|
390 |
fi
|
|
391 |
|
|
392 |
if [ -z "$BUILD_TOOLS" ]; then
|
|
393 |
echo "build_tools = no" >> "$CONFIG_IN"
|
|
394 |
else
|
|
395 |
echo "build_tools = yes" >> "$CONFIG_IN"
|
|
396 |
fi
|
|
397 |
|
|
398 |
echo "Configuring Qt Mobility"
|
|
399 |
echo
|
|
400 |
|
|
401 |
WHICH="$relpath/config.tests/tools/which.test"
|
|
402 |
|
|
403 |
printf "Checking available Qt"
|
|
404 |
if ! "$WHICH" qmake 2>/dev/null 1>&2; then
|
|
405 |
printf " ... Not found\n\n" >&2
|
|
406 |
echo >&2 "Cannot find 'qmake' in your PATH.";
|
|
407 |
echo >&2 "Aborting."
|
|
408 |
else
|
|
409 |
printf " ... "
|
|
410 |
qmake -query QT_VERSION
|
|
411 |
fi
|
|
412 |
|
|
413 |
# find out which make we want to use
|
|
414 |
MAKE=
|
|
415 |
for m in make gmake; do
|
|
416 |
if "$WHICH" $m >/dev/null 2>&1; then
|
|
417 |
MAKE=`$WHICH $m`
|
|
418 |
break
|
|
419 |
fi
|
|
420 |
done
|
|
421 |
if [ -z "$MAKE" ]; then
|
|
422 |
echo >&2 "Cannot find 'make' or 'gmake' in your PATH";
|
|
423 |
echo >&2 "Aborting."
|
|
424 |
fi
|
|
425 |
|
|
426 |
compileTest()
|
|
427 |
{
|
|
428 |
printf "Checking $1"
|
|
429 |
CURRENT_PWD=`pwd`
|
|
430 |
|
|
431 |
if [ "$shadowpath" = "$relpath" ]; then
|
|
432 |
#doing source tree build
|
|
433 |
cd "$relpath/config.tests/$2"
|
|
434 |
rm -rf ./$2
|
|
435 |
else
|
|
436 |
#using shadow build
|
|
437 |
rm -rf config.tests/$2
|
|
438 |
mkdir -p config.tests/$2
|
|
439 |
cd config.tests/$2
|
|
440 |
fi
|
|
441 |
|
|
442 |
qmake $QMKSPEC "$relpath/config.tests/$2/$2.pro" 2>> "$CONFIG_LOG" >> "$CONFIG_LOG"
|
|
443 |
printf " ."
|
|
444 |
"$MAKE" clean >> "$CONFIG_LOG"
|
|
445 |
printf "."
|
|
446 |
"$MAKE" >> "$CONFIG_LOG" 2>&1
|
|
447 |
printf ". "
|
|
448 |
if [ -e ./$2 ]; then
|
|
449 |
echo "OK"
|
|
450 |
echo "$2_enabled = yes" >> "$CONFIG_IN"
|
|
451 |
else
|
|
452 |
echo "Not Found"
|
|
453 |
echo "$2_enabled = no" >> "$CONFIG_IN"
|
|
454 |
fi
|
|
455 |
cd "$CURRENT_PWD"
|
|
456 |
}
|
|
457 |
|
|
458 |
#compile tests
|
|
459 |
compileTest QMF qmf
|
|
460 |
compileTest NetworkManager networkmanager
|
|
461 |
compileTest "CoreWLAN (MacOS 10.6)" corewlan
|
|
462 |
compileTest "Maemo ICD" maemo-icd
|
|
463 |
compileTest "Maemo ICD WLAN" maemo-icd-network-wlan
|
|
464 |
compileTest "Maemo5 contacts dependencies" maemo5-contacts
|
|
465 |
compileTest "Bluez" bluez
|
|
466 |
if [ "$LINUX_TARGET" = maemo6 ]; then
|
|
467 |
compileTest sensord sensord
|
|
468 |
else
|
|
469 |
echo "sensord_enabled = no" >> "$CONFIG_IN"
|
|
470 |
fi
|
|
471 |
|
|
472 |
# It's a lot easier to make qmake do the dependency checking...
|
|
473 |
echo "mobility_modules = $MOBILITY_MODULES" >> "$CONFIG_IN"
|
|
474 |
echo "contains(mobility_modules,versit): mobility_modules *= contacts" >> "$CONFIG_IN"
|
|
475 |
echo "maemo5|maemo6:contains(maemo-icd_enabled, no): mobility_modules -= bearer" >> "$CONFIG_IN"
|
|
476 |
|
|
477 |
# If libicd-network-wlan-dev.h is not present, use own copy.
|
|
478 |
# At time of writing, libicd-network-wlan-dev is not released for maemo5.
|
|
479 |
echo "maemo5:contains(maemo-icd-network-wlan_enabled, no): INCLUDEPATH += $relpath/src/3rdparty/icd-network-wlan" >> "$CONFIG_IN"
|
|
480 |
|
|
481 |
# Ideally we'd skip generating headers for modules that are not enabled
|
|
482 |
echo "Generating Mobility Headers..."
|
|
483 |
#remove old headers
|
|
484 |
rm -rf $shadowpath/include
|
|
485 |
mkdir $shadowpath/include
|
|
486 |
for module in $MOBILITY_MODULES; do
|
|
487 |
case "$module" in
|
|
488 |
bearer)
|
|
489 |
$relpath/bin/syncheaders $shadowpath/include/QtBearer $relpath/src/bearer
|
|
490 |
;;
|
|
491 |
publishsubscribe)
|
|
492 |
$relpath/bin/syncheaders $shadowpath/include/QtPublishSubscribe $relpath/src/publishsubscribe
|
|
493 |
;;
|
|
494 |
location)
|
|
495 |
$relpath/bin/syncheaders $shadowpath/include/QtLocation $relpath/src/location
|
|
496 |
;;
|
|
497 |
serviceframework)
|
|
498 |
$relpath/bin/syncheaders $shadowpath/include/QtServiceFramework $relpath/src/serviceframework
|
|
499 |
;;
|
|
500 |
systeminfo)
|
|
501 |
$relpath/bin/syncheaders $shadowpath/include/QtSystemInfo $relpath/src/systeminfo
|
|
502 |
;;
|
|
503 |
contacts)
|
|
504 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts
|
|
505 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/details
|
|
506 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/requests
|
|
507 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/filters
|
|
508 |
;;
|
|
509 |
multimedia)
|
|
510 |
$relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia
|
|
511 |
$relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia/audio
|
|
512 |
$relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia/video
|
|
513 |
;;
|
|
514 |
messaging)
|
|
515 |
$relpath/bin/syncheaders $shadowpath/include/QtMessaging $relpath/src/messaging
|
|
516 |
;;
|
|
517 |
versit)
|
|
518 |
#versit implies contacts
|
|
519 |
$relpath/bin/syncheaders $shadowpath/include/QtVersit $relpath/src/versit
|
|
520 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts
|
|
521 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/details
|
|
522 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/requests
|
|
523 |
$relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/filters
|
|
524 |
;;
|
|
525 |
sensors)
|
|
526 |
$relpath/bin/syncheaders $shadowpath/include/QtSensors $relpath/src/sensors
|
|
527 |
;;
|
|
528 |
*)
|
|
529 |
echo "Cannot generate headers for $module"
|
|
530 |
;;
|
|
531 |
esac
|
|
532 |
done
|
|
533 |
|
|
534 |
mv "$CONFIG_IN" config.pri
|
|
535 |
mkdir -p "$shadowpath/features"
|
|
536 |
if [ "$shadowpath" != "$relpath" ]; then
|
|
537 |
cp -f "$relpath/features/strict_flags.prf" "$shadowpath/features"
|
|
538 |
fi
|
|
539 |
|
|
540 |
echo "Running qmake..."
|
|
541 |
if qmake -makefile $QMKSPEC -recursive "$relpath/qtmobility.pro"; then
|
|
542 |
echo ""
|
|
543 |
echo "configure has finished. You may run make or gmake to build the project now."
|
|
544 |
else
|
|
545 |
echo ""
|
|
546 |
echo "configure failed."
|
|
547 |
fi
|
|
548 |
|