summaryrefslogtreecommitdiffstats
path: root/src/qt-1-win32.patch
blob: a78404acf4f9650b9797e4294e50858509dd8328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
This file is part of mingw-cross-env.
See doc/index.html for further information.

Commits backported (cherry-picked) from Qt 4.7 branch.
http://qt.gitorious.org/qt

commit 0bbfa914abfa98b305bc989b77ad3a01d7129d42
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Wed Jul 7 12:05:35 2010 +0200

    Fixed whitespace formatting
    
    Merge-request: 715
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit 42fe2bfb65c85fc630efe32aa1d62d66f2caab2a)

diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro
index 5223beb..25ca499 100644
--- a/src/plugins/sqldrivers/db2/db2.pro
+++ b/src/plugins/sqldrivers/db2/db2.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqldb2
+TARGET = qsqldb2
 
 HEADERS		= ../../../sql/drivers/db2/qsql_db2.h
 SOURCES		= main.cpp \
diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro
index ec2bc7b..bb73adb 100644
--- a/src/plugins/sqldrivers/ibase/ibase.pro
+++ b/src/plugins/sqldrivers/ibase/ibase.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqlibase
+TARGET = qsqlibase
 
 HEADERS		= ../../../sql/drivers/ibase/qsql_ibase.h
 SOURCES		= main.cpp \
diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro
index 9f5c619..b808c8e 100644
--- a/src/plugins/sqldrivers/mysql/mysql.pro
+++ b/src/plugins/sqldrivers/mysql/mysql.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqlmysql
+TARGET = qsqlmysql
 
 HEADERS		= ../../../sql/drivers/mysql/qsql_mysql.h
 SOURCES		= main.cpp \
diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro
index 3bf70a1..d75827e 100644
--- a/src/plugins/sqldrivers/oci/oci.pro
+++ b/src/plugins/sqldrivers/oci/oci.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqloci
+TARGET = qsqloci
 
 HEADERS		= ../../../sql/drivers/oci/qsql_oci.h
 SOURCES		= main.cpp \
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
index 2bf85f1..70070db 100644
--- a/src/plugins/sqldrivers/odbc/odbc.pro
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqlodbc
+TARGET = qsqlodbc
 
 HEADERS		= ../../../sql/drivers/odbc/qsql_odbc.h
 SOURCES		= main.cpp \
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index 80a5348..9586695 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqlpsql
+TARGET = qsqlpsql
 
 HEADERS		= ../../../sql/drivers/psql/qsql_psql.h
 SOURCES		= main.cpp \
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
index fb31233..75f04b9 100644
--- a/src/plugins/sqldrivers/sqlite/sqlite.pro
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqlite
+TARGET = qsqlite
 
 HEADERS		= ../../../sql/drivers/sqlite/qsql_sqlite.h
 SOURCES		= smain.cpp \
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
index 88db22a..0f6c19a 100644
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro
+++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqlite2
+TARGET = qsqlite2
 
 HEADERS		= ../../../sql/drivers/sqlite2/qsql_sqlite2.h
 SOURCES		= smain.cpp \
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
index 08a166b..ba40be5 100644
--- a/src/plugins/sqldrivers/tds/tds.pro
+++ b/src/plugins/sqldrivers/tds/tds.pro
@@ -1,4 +1,4 @@
-TARGET	 = qsqltds
+TARGET = qsqltds
 
 HEADERS		= ../../../sql/drivers/tds/qsql_tds.h
 

commit d324d74123129f77c46e137f2ead8fab911eced4
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Thu Aug 26 22:06:23 2010 +0200

    Revert "Fixed automatic sqlite extraction on Symbian makefile build system."
    
    This reverts commit 0aa77f3afe01de462edf0ee6a0bdf78854431cf1.
    
    Reverted to avoid collisions with d7557de99b38031906c17c54496cb76a13dec5f7
    on drivers.pri from 4.7 branch.

diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 7ec5c6c..c1b31e5 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -105,7 +105,6 @@ QMAKE_IDL		  = midl
 QMAKE_LIB		  = ar -ru
 QMAKE_RC		  = windres
 QMAKE_ZIP		  = zip -r -9
-QMAKE_UNZIP               = unzip -o
 
 QMAKE_TAR                 = tar -cf
 QMAKE_GZIP                = gzip -9f
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
deleted file mode 100644
index ab8d846..0000000
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
+++ /dev/null
@@ -1,38 +0,0 @@
-# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them.
-!symbian-abld:!symbian-sbsv2 {
-    !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
-        symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip
-
-        # The QMAKE_COPY section is to update timestamp on the file.
-        symbian_sqlite3_header.input = symbian_sqlite3_zip_file
-        symbian_sqlite3_header.output = sqlite3.h
-        !isEmpty(MOC_DIR):symbian_sqlite3_header.output = $$MOC_DIR/$$symbian_sqlite3_header.output
-        symbian_sqlite3_header.CONFIG = combine no_link
-        symbian_sqlite3_header.dependency_type = TYPE_C
-        symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \
-                                          && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
-                                          && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \
-                                          && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
-        QMAKE_EXTRA_COMPILERS += symbian_sqlite3_header
-
-        # The QMAKE_COPY section is to update timestamp on the file.
-        symbian_sqlite3_dso.input = symbian_sqlite3_zip_file
-        symbian_sqlite3_dso.output = sqlite3.dso
-        !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output
-        symbian_sqlite3_dso.CONFIG = combine no_link target_predeps
-        symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \
-                                       && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
-                                       && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \
-                                       && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
-        QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
-
-        symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
-        symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
-        !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
-        symbian_sqlite3_ver_dso.CONFIG = $$symbian_sqlite3_dso.CONFIG
-        symbian_sqlite3_ver_dso.commands = $$symbian_sqlite3_dso.commands
-        QMAKE_EXTRA_COMPILERS += symbian_sqlite3_ver_dso
-
-        QMAKE_LIBDIR *= $$OBJECTS_DIR
-    }
-}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 0d233e6..691cce1 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,7 +2,7 @@
 TEMPLATE = subdirs
 
 # We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
-symbian-abld|symbian-sbsv2 {
+symbian {
     !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
         BLD_INF_RULES.prj_exports +=  ":zip SQLite3_v9.2.zip"
     }
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index c68442d..05e7265 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -114,8 +114,6 @@ contains(sql-drivers, sqlite) {
         QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
     }
 
-    symbian:include(../../plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
-
     HEADERS +=      drivers/sqlite/qsql_sqlite.h
     SOURCES +=      drivers/sqlite/qsql_sqlite.cpp
 }

commit 6dfa85665b11a8257201522b48612a113a8c2d44
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Wed Jul 7 12:05:36 2010 +0200

    Consolidate sql driver configuration redundancy
    
    Previously sql driver recipes each appeared in both the plugin
    pro file and src/sql/drivers/drivers.pri for building into QtSql.
    
    Split driver recipes into shared pri files.
    Also split bundled 3rd party sqlite code recipe into a shared pri.
    
    Merge-request: 715
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit d7557de99b38031906c17c54496cb76a13dec5f7)

diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri
new file mode 100644
index 0000000..575412d
--- /dev/null
+++ b/src/3rdparty/sqlite.pri
@@ -0,0 +1,4 @@
+CONFIG(release, debug|release):DEFINES *= NDEBUG
+DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
+INCLUDEPATH +=  $$PWD/sqlite
+SOURCES +=      $$PWD/sqlite/sqlite3.c
diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro
index 25ca499..e053f37 100644
--- a/src/plugins/sqldrivers/db2/db2.pro
+++ b/src/plugins/sqldrivers/db2/db2.pro
@@ -1,10 +1,6 @@
 TARGET = qsqldb2
 
-HEADERS		= ../../../sql/drivers/db2/qsql_db2.h
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/db2/qsql_db2.cpp
-
-unix:!contains( LIBS, .*db2.* ):LIBS 	*= -ldb2
-win32:!contains( LIBS, .*db2.* ):LIBS   *= -ldb2cli
+SOURCES = main.cpp
+include(../../../sql/drivers/db2/qsql_db2.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro
index bb73adb..7870ec8 100644
--- a/src/plugins/sqldrivers/ibase/ibase.pro
+++ b/src/plugins/sqldrivers/ibase/ibase.pro
@@ -1,14 +1,6 @@
 TARGET = qsqlibase
 
-HEADERS		= ../../../sql/drivers/ibase/qsql_ibase.h
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/ibase/qsql_ibase.cpp
-
-unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS    *= -lgds
-
-win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
-	!win32-borland:LIBS *= -lgds32_ms
-	win32-borland:LIBS  += gds32.lib
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/ibase/qsql_ibase.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro
index b808c8e..b6d42ff 100644
--- a/src/plugins/sqldrivers/mysql/mysql.pro
+++ b/src/plugins/sqldrivers/mysql/mysql.pro
@@ -1,23 +1,6 @@
 TARGET = qsqlmysql
 
-HEADERS		= ../../../sql/drivers/mysql/qsql_mysql.h
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/mysql/qsql_mysql.cpp
-
-unix: {
-    isEmpty(QT_LFLAGS_MYSQL) {
-        !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
-            use_libmysqlclient_r:LIBS *= -lmysqlclient_r
-            else:LIBS *= -lmysqlclient
-        }
-    } else {
-        LIBS *= $$QT_LFLAGS_MYSQL
-        QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
-    }
-}
-
-win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
-    LIBS     *= -llibmysql    
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/mysql/qsql_mysql.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro
index d75827e..d7dcce9 100644
--- a/src/plugins/sqldrivers/oci/oci.pro
+++ b/src/plugins/sqldrivers/oci/oci.pro
@@ -1,13 +1,6 @@
 TARGET = qsqloci
 
-HEADERS		= ../../../sql/drivers/oci/qsql_oci.h
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/oci/qsql_oci.cpp
-
-win32:LIBS	*= -loci
-
-unix:!contains( LIBS, .*clnts.* ):LIBS	*= -lclntsh
-
-macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
+SOURCES = main.cpp
+include(../../../sql/drivers/oci/qsql_oci.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
index 70070db..677eb6e 100644
--- a/src/plugins/sqldrivers/odbc/odbc.pro
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -1,19 +1,6 @@
 TARGET = qsqlodbc
 
-HEADERS		= ../../../sql/drivers/odbc/qsql_odbc.h
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/odbc/qsql_odbc.cpp
-
-unix {
-	!contains( LIBS, .*odbc.* ) {
-	    LIBS 	*= $$QT_LFLAGS_ODBC
-	}
-        DEFINES += UNICODE
-}
-
-win32 {
-	!win32-borland:LIBS	*= -lodbc32
-    	win32-borland:LIBS	*= $(BCB)/lib/PSDK/odbc32.lib
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/odbc/qsql_odbc.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index 9586695..8276c0a 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -1,18 +1,6 @@
 TARGET = qsqlpsql
 
-HEADERS		= ../../../sql/drivers/psql/qsql_psql.h
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/psql/qsql_psql.cpp
-
-unix|win32-g++*: {
-    !isEmpty(QT_LFLAGS_PSQL) {
-        !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
-        !static:LIBS *= $$QT_LFLAGS_PSQL
-        QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
-    }
-    !contains(LIBS, .*pq.*):LIBS *= -lpq
-}
-
-win32:!win32-g++*:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
+SOURCES = main.cpp
+include(../../../sql/drivers/psql/qsql_psql.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
index 75f04b9..f4c1671 100644
--- a/src/plugins/sqldrivers/sqlite/sqlite.pro
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -1,18 +1,7 @@
 TARGET = qsqlite
 
-HEADERS		= ../../../sql/drivers/sqlite/qsql_sqlite.h
-SOURCES		= smain.cpp \
-		  ../../../sql/drivers/sqlite/qsql_sqlite.cpp
-
-!system-sqlite:!contains( LIBS, .*sqlite.* ) {
-    CONFIG(release, debug|release):DEFINES *= NDEBUG
-    DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE 
-    INCLUDEPATH += ../../../3rdparty/sqlite
-    SOURCES += ../../../3rdparty/sqlite/sqlite3.c
-} else {
-    LIBS *= $$QT_LFLAGS_SQLITE
-    QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
-}
+SOURCES = smain.cpp
+include(../../../sql/drivers/sqlite/qsql_sqlite.pri)
 
 wince*: DEFINES += HAVE_LOCALTIME_S=0
 
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
index 0f6c19a..e6197b9 100644
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro
+++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
@@ -1,9 +1,6 @@
 TARGET = qsqlite2
 
-HEADERS		= ../../../sql/drivers/sqlite2/qsql_sqlite2.h
-SOURCES		= smain.cpp \
-		  ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp
-
-!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
+SOURCES = smain.cpp
+include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
index ba40be5..b8e8ded 100644
--- a/src/plugins/sqldrivers/tds/tds.pro
+++ b/src/plugins/sqldrivers/tds/tds.pro
@@ -1,15 +1,6 @@
 TARGET = qsqltds
 
-HEADERS		= ../../../sql/drivers/tds/qsql_tds.h
-
-SOURCES		= main.cpp \
-		  ../../../sql/drivers/tds/qsql_tds.cpp
-
-unix:!contains( LIBS, .*sybdb.* ):LIBS 	*= -lsybdb
-
-win32 {
-    !win32-borland:LIBS *= -lNTWDBLIB
-    win32-borland:LIBS 	*= $(BCB)/lib/PSDK/NTWDBLIB.LIB
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/tds/qsql_tds.pri)
 
 include(../qsqldriverbase.pri)
diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri
new file mode 100644
index 0000000..e53a8a0
--- /dev/null
+++ b/src/sql/drivers/db2/qsql_db2.pri
@@ -0,0 +1,8 @@
+HEADERS += $$PWD/qsql_db2.h
+SOURCES += $$PWD/qsql_db2.cpp
+
+unix {
+    !contains(LIBS, .*db2.*):LIBS *= -ldb2
+} else:!win32-borland {
+    !contains(LIBS, .*db2.*):LIBS *= -ldb2cli
+}
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 05e7265..3af5525 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -1,119 +1,11 @@
-contains(sql-drivers, all ) {
-    sql-driver +=   psql mysql odbc oci tds db2 sqlite ibase
-}
-
-contains(sql-drivers, psql) {
-    HEADERS +=      drivers/psql/qsql_psql.h
-    SOURCES +=      drivers/psql/qsql_psql.cpp
-
-    unix|win32-g++* {
-        !static:!isEmpty(QT_LFLAGS_PSQL) {
-            !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
-            !static:LIBS *= $$QT_LFLAGS_PSQL
-            QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
-        }
-        !contains(LIBS, .*pq.*):LIBS *= -lpq
-    } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
-}
-
-contains(sql-drivers, mysql) {
-    HEADERS +=      drivers/mysql/qsql_mysql.h
-    SOURCES +=      drivers/mysql/qsql_mysql.cpp
-
-    unix {
-        isEmpty(QT_LFLAGS_MYSQL) {
-            !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
-                use_libmysqlclient_r:LIBS *= -lmysqlclient_r
-                else:LIBS *= -lmysqlclient
-            }
-        } else {
-            LIBS *= $$QT_LFLAGS_MYSQL
-            QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
-        }
-    }
-
-    win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
-        !win32-g++*:LIBS *= -llibmysql
-        else:LIBS        *= -lmysql
-    }    
-}
-
-contains(sql-drivers, odbc) {
-     HEADERS += drivers/odbc/qsql_odbc.h
-     SOURCES += drivers/odbc/qsql_odbc.cpp
-
-     mac:!contains( LIBS, .*odbc.* ):LIBS        *= -liodbc
-     unix:!contains( LIBS, .*odbc.* ):LIBS       *= -lodbc
-     unix:DEFINES += UNICODE
-
-     win32 {
-         !win32-borland:LIBS *= -lodbc32
-         else:LIBS           *= $(BCB)/lib/PSDK/odbc32.lib
-     }
-}
-
-contains(sql-drivers, oci) {
-    HEADERS += drivers/oci/qsql_oci.h
-    SOURCES += drivers/oci/qsql_oci.cpp
-
-    unix:!contains( LIBS, .*clnts.* ):LIBS += -lclntsh
-
-    win32:LIBS += -loci
-}
-
-contains(sql-drivers, tds) {
-    HEADERS += drivers/tds/qsql_tds.h
-    SOURCES += drivers/tds/qsql_tds.cpp
-
-    unix:LIBS += -L$SYBASE/lib -lsybdb
-
-    win32 {
-        !win32-borland:LIBS += -lNTWDBLIB
-        else:LIBS           += $(BCB)/lib/PSDK/NTWDBLIB.LIB
-    }
-}
-
-contains(sql-drivers, db2) {
-    HEADERS += drivers/db2/qsql_db2.h
-    SOURCES += drivers/db2/qsql_db2.cpp
-    
-    unix:LIBS += -ldb2
-    
-    win32 {
-        !win32-borland:LIBS += -ldb2cli
-#        else:LIBS          += $(BCB)/lib/PSDK/db2cli.lib
-    }
-}
-
-contains(sql-drivers, ibase) {
-    HEADERS += drivers/ibase/qsql_ibase.h
-    SOURCES += drivers/ibase/qsql_ibase.cpp
-    
-    unix:LIBS *= -lgds  
-    
-    win32 {
-        !win32-borland:LIBS *= -lgds32_ms
-        else:LIBS           += gds32.lib
-    }
-}
-
-contains(sql-drivers, sqlite2) {
-    HEADERS += drivers/sqlite2/qsql_sqlite2.h
-    SOURCES += drivers/sqlite2/qsql_sqlite2.cpp
-    !contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
-}
-
-contains(sql-drivers, sqlite) {
-    !system-sqlite:!contains( LIBS, .*sqlite3.* ) {
-        CONFIG(release, debug|release):DEFINES *= NDEBUG
-        DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE 
-        INCLUDEPATH +=  ../3rdparty/sqlite
-        SOURCES +=      ../3rdparty/sqlite/sqlite3.c
-    } else {
-        LIBS *= $$QT_LFLAGS_SQLITE
-        QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
-    }
-
-    HEADERS +=      drivers/sqlite/qsql_sqlite.h
-    SOURCES +=      drivers/sqlite/qsql_sqlite.cpp
-}
+contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase
+
+contains(sql-drivers, psql):include($$PWD/sqlite/qsql_psql.pri)
+contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri)
+contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri)
+contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri)
+contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri)
+contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri)
+contains(sql-drivers, ibase):include($$PWD/db2/qsql_ibase.pri)
+contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri)
+contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri)
diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri
new file mode 100644
index 0000000..ebcd18a
--- /dev/null
+++ b/src/sql/drivers/ibase/qsql_ibase.pri
@@ -0,0 +1,11 @@
+HEADERS += $$PWD/qsql_ibase.h
+SOURCES += $$PWD/qsql_ibase.cpp
+
+unix {
+    !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS *= -lgds
+} else {
+    !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
+        win32-borland:LIBS += gds32.lib
+        else:LIBS *= -lgds32_ms
+    }
+}
diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri
new file mode 100644
index 0000000..801b891
--- /dev/null
+++ b/src/sql/drivers/mysql/qsql_mysql.pri
@@ -0,0 +1,16 @@
+HEADERS += $$PWD/qsql_mysql.h
+SOURCES += $$PWD/qsql_mysql.cpp
+
+unix {
+    isEmpty(QT_LFLAGS_MYSQL) {
+        !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
+            use_libmysqlclient_r:LIBS *= -lmysqlclient_r
+            else:LIBS *= -lmysqlclient
+        }
+    } else {
+        LIBS *= $$QT_LFLAGS_MYSQL
+        QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
+    }
+} else {
+    !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS *= -llibmysql
+}
diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri
new file mode 100644
index 0000000..6859156
--- /dev/null
+++ b/src/sql/drivers/oci/qsql_oci.pri
@@ -0,0 +1,9 @@
+HEADERS += $$PWD/qsql_oci.h
+SOURCES += $$PWD/qsql_oci.cpp
+
+unix {
+    !contains(LIBS, .*clnts.*):LIBS *= -lclntsh
+} else {
+    LIBS *= -loci
+}
+macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri
new file mode 100644
index 0000000..c4c92be
--- /dev/null
+++ b/src/sql/drivers/odbc/qsql_odbc.pri
@@ -0,0 +1,13 @@
+HEADERS += $$PWD/qsql_odbc.h
+SOURCES += $$PWD/qsql_odbc.cpp
+
+mac {
+    !contains(LIBS, .*odbc.*):LIBS *= -liodbc
+} else:unix {
+    DEFINES += UNICODE
+    !contains(LIBS, .*odbc.*):LIBS *= $$QT_LFLAGS_ODBC
+} else:win32-borland {
+    LIBS *= $(BCB)/lib/PSDK/odbc32.lib
+} else {
+    LIBS *= -lodbc32
+}
diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri
new file mode 100644
index 0000000..c282d57
--- /dev/null
+++ b/src/sql/drivers/psql/qsql_psql.pri
@@ -0,0 +1,13 @@
+HEADERS += $$PWD/qsql_psql.h
+SOURCES += $$PWD/qsql_psql.cpp
+
+unix|win32-g++* {
+    !static:!isEmpty(QT_LFLAGS_PSQL) {
+        !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
+        LIBS *= $$QT_LFLAGS_PSQL
+        QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
+    }
+    !contains(LIBS, .*pq.*):LIBS *= -lpq
+} else {
+    !contains(LIBS, .*pq.*):LIBS *= -llibpq -lws2_32 -ladvapi32
+}
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri
new file mode 100644
index 0000000..7ad5936
--- /dev/null
+++ b/src/sql/drivers/sqlite/qsql_sqlite.pri
@@ -0,0 +1,9 @@
+HEADERS += $$PWD/qsql_sqlite.h
+SOURCES += $$PWD/qsql_sqlite.cpp
+
+!system-sqlite:!contains(LIBS, .*sqlite3.*) {
+    include($$PWD/../../../3rdparty/sqlite.pri)
+} else {
+    LIBS *= $$QT_LFLAGS_SQLITE
+    QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
+}
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
new file mode 100644
index 0000000..9f0e807
--- /dev/null
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
@@ -0,0 +1,4 @@
+HEADERS += $PWD/qsql_sqlite2.h
+SOURCES += $PWD/qsql_sqlite2.cpp
+
+!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
new file mode 100644
index 0000000..e2662ca
--- /dev/null
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -0,0 +1,10 @@
+HEADERS += $$PWD/qsql_tds.h
+SOURCES += $$PWD/qsql_tds.cpp
+
+unix {
+    !contains(LIBS, .*sybdb.*):LIBS *= -lsybdb
+} else:win32-borland {
+    LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
+} else {
+    LIBS *= -lNTWDBLIB
+}

commit a211bcb2a94906da3a8aace97e19fb980be427fc
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Wed Jul 7 12:05:37 2010 +0200

    Simplify *= to += after contains() test
    
    Merge-request: 715
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit 484c05ef374ef1c1043836b074693838d6b30adb)

diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri
index e53a8a0..16557f0 100644
--- a/src/sql/drivers/db2/qsql_db2.pri
+++ b/src/sql/drivers/db2/qsql_db2.pri
@@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_db2.h
 SOURCES += $$PWD/qsql_db2.cpp
 
 unix {
-    !contains(LIBS, .*db2.*):LIBS *= -ldb2
+    !contains(LIBS, .*db2.*):LIBS += -ldb2
 } else:!win32-borland {
-    !contains(LIBS, .*db2.*):LIBS *= -ldb2cli
+    !contains(LIBS, .*db2.*):LIBS += -ldb2cli
 }
diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri
index ebcd18a..33fbb0d 100644
--- a/src/sql/drivers/ibase/qsql_ibase.pri
+++ b/src/sql/drivers/ibase/qsql_ibase.pri
@@ -2,10 +2,10 @@ HEADERS += $$PWD/qsql_ibase.h
 SOURCES += $$PWD/qsql_ibase.cpp
 
 unix {
-    !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS *= -lgds
+    !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
 } else {
     !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
         win32-borland:LIBS += gds32.lib
-        else:LIBS *= -lgds32_ms
+        else:LIBS += -lgds32_ms
     }
 }
diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri
index 801b891..1b9c3dd 100644
--- a/src/sql/drivers/mysql/qsql_mysql.pri
+++ b/src/sql/drivers/mysql/qsql_mysql.pri
@@ -4,13 +4,13 @@ SOURCES += $$PWD/qsql_mysql.cpp
 unix {
     isEmpty(QT_LFLAGS_MYSQL) {
         !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
-            use_libmysqlclient_r:LIBS *= -lmysqlclient_r
-            else:LIBS *= -lmysqlclient
+            use_libmysqlclient_r:LIBS += -lmysqlclient_r
+            else:LIBS += -lmysqlclient
         }
     } else {
         LIBS *= $$QT_LFLAGS_MYSQL
         QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
     }
 } else {
-    !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS *= -llibmysql
+    !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql
 }
diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri
index 6859156..60ccc4c 100644
--- a/src/sql/drivers/oci/qsql_oci.pri
+++ b/src/sql/drivers/oci/qsql_oci.pri
@@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_oci.h
 SOURCES += $$PWD/qsql_oci.cpp
 
 unix {
-    !contains(LIBS, .*clnts.*):LIBS *= -lclntsh
+    !contains(LIBS, .*clnts.*):LIBS += -lclntsh
 } else {
     LIBS *= -loci
 }
diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri
index c4c92be..8394012 100644
--- a/src/sql/drivers/odbc/qsql_odbc.pri
+++ b/src/sql/drivers/odbc/qsql_odbc.pri
@@ -2,10 +2,10 @@ HEADERS += $$PWD/qsql_odbc.h
 SOURCES += $$PWD/qsql_odbc.cpp
 
 mac {
-    !contains(LIBS, .*odbc.*):LIBS *= -liodbc
+    !contains(LIBS, .*odbc.*):LIBS += -liodbc
 } else:unix {
     DEFINES += UNICODE
-    !contains(LIBS, .*odbc.*):LIBS *= $$QT_LFLAGS_ODBC
+    !contains(LIBS, .*odbc.*):LIBS += $$QT_LFLAGS_ODBC
 } else:win32-borland {
     LIBS *= $(BCB)/lib/PSDK/odbc32.lib
 } else {
diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri
index c282d57..97db4be 100644
--- a/src/sql/drivers/psql/qsql_psql.pri
+++ b/src/sql/drivers/psql/qsql_psql.pri
@@ -7,7 +7,7 @@ unix|win32-g++* {
         LIBS *= $$QT_LFLAGS_PSQL
         QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
     }
-    !contains(LIBS, .*pq.*):LIBS *= -lpq
+    !contains(LIBS, .*pq.*):LIBS += -lpq
 } else {
-    !contains(LIBS, .*pq.*):LIBS *= -llibpq -lws2_32 -ladvapi32
+    !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32
 }
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
index 9f0e807..76fe255 100644
--- a/src/sql/drivers/sqlite2/qsql_sqlite2.pri
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
@@ -1,4 +1,4 @@
 HEADERS += $PWD/qsql_sqlite2.h
 SOURCES += $PWD/qsql_sqlite2.cpp
 
-!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
+!contains(LIBS, .*sqlite.*):LIBS += -lsqlite
diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
index e2662ca..c552ead 100644
--- a/src/sql/drivers/tds/qsql_tds.pri
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_tds.h
 SOURCES += $$PWD/qsql_tds.cpp
 
 unix {
-    !contains(LIBS, .*sybdb.*):LIBS *= -lsybdb
+    !contains(LIBS, .*sybdb.*):LIBS += -lsybdb
 } else:win32-borland {
     LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
 } else {

commit b5f9c3336f58830f9398c66e655b766f49d63077
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Thu Jul 8 15:28:24 2010 +0200

    Corrected paths
    
    Merge-request: 715
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit c69dc51e5e03aaa87a9385f5557a4f6b8aaeded3)

diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 3af5525..87cc0b1 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -1,11 +1,11 @@
 contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase
 
-contains(sql-drivers, psql):include($$PWD/sqlite/qsql_psql.pri)
+contains(sql-drivers, psql):include($$PWD/psql/qsql_psql.pri)
 contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri)
 contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri)
 contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri)
 contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri)
 contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri)
-contains(sql-drivers, ibase):include($$PWD/db2/qsql_ibase.pri)
+contains(sql-drivers, ibase):include($$PWD/ibase/qsql_ibase.pri)
 contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri)
 contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri)

commit 61677afc848ccd92de60c3c6a2dab84f2b69350d
Author: axis <qt-info@nokia.com>
Date:   Wed Jul 21 16:23:43 2010 +0200

    Merge branch 'raptorConfigurePatches' into 4.7-s60
    
    Conflicts:
    	configure
    	src/sql/drivers/drivers.pri
    (cherry picked from commit ccfb67704285f60ce31bb05538f08ca6f32c6f1d)

diff --git a/configure b/configure
index bab70d3..1ddbb70 100755
--- a/configure
+++ b/configure
@@ -728,7 +728,7 @@ CFG_GLIB=auto
 CFG_GSTREAMER=auto
 CFG_QGTKSTYLE=auto
 CFG_QS60STYLE=auto
-CFG_LARGEFILE=yes
+CFG_LARGEFILE=auto
 CFG_OPENSSL=auto
 CFG_PTMALLOC=no
 CFG_STL=auto
@@ -3069,12 +3069,17 @@ fi
 
 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
 TEST_COMPILER="$CXX"
+
 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
-if [ -z "$TEST_COMPILER" ]; then
-    echo "ERROR: Cannot set the compiler for the configuration tests"
-    exit 1
+if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+    #for Symbian we don't need this checking
+    if [ -z "$TEST_COMPILER" ]; then
+        echo "ERROR: Cannot set the compiler for the configuration tests"
+        exit 1
+    fi
 fi
 
+
 # auto-detect precompiled header support
 if [ "$CFG_PRECOMPILE" = "auto" ]; then
     if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
@@ -3245,122 +3250,137 @@ if [ -z "$QT_INSTALL_PREFIX" ]; then
 fi
 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
 
-#docs
-if [ -z "$QT_INSTALL_DOCS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    QT_INSTALL_DOCS="/Developer/Documentation/Qt"
+if echo $XPLATFORM | grep symbian > /dev/null; then
+    [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
+    [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
+    [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
+    [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS=
+    [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS=
+    [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="\\\\resource\\\\qt$QT_LIBINFIX\\\\plugins"
+    [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="\\\\resource\\\\qt$QT_LIBINFIX\\\\imports"
+    [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA=
+    [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations"
+    [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS=
+    [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES=
+    [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS=
+else
+    #docs
+    if [ -z "$QT_INSTALL_DOCS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        QT_INSTALL_DOCS="/Developer/Documentation/Qt"
+            fi
         fi
-    fi
-    [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
+        [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
 
-fi
-QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
+    fi
+    QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
 
-#headers
-if [ -z "$QT_INSTALL_HEADERS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    if [ "$CFG_FRAMEWORK" = "yes" ]; then
-		QT_INSTALL_HEADERS=
+    #headers
+    if [ -z "$QT_INSTALL_HEADERS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        if [ "$CFG_FRAMEWORK" = "yes" ]; then
+		    QT_INSTALL_HEADERS=
+                fi
             fi
         fi
-    fi
-    [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
+        [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
 
-fi
-QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
+    fi
+    QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
 
-#libs
-if [ -z "$QT_INSTALL_LIBS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    if [ "$CFG_FRAMEWORK" = "yes" ]; then
-		QT_INSTALL_LIBS="/Libraries/Frameworks"
+    #libs
+    if [ -z "$QT_INSTALL_LIBS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        if [ "$CFG_FRAMEWORK" = "yes" ]; then
+		    QT_INSTALL_LIBS="/Libraries/Frameworks"
+                fi
             fi
         fi
+        [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
     fi
-    [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
-fi
-QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
+    QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
 
-#bins
-if [ -z "$QT_INSTALL_BINS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    QT_INSTALL_BINS="/Developer/Applications/Qt"
+    #bins
+    if [ -z "$QT_INSTALL_BINS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        QT_INSTALL_BINS="/Developer/Applications/Qt"
+            fi
         fi
-    fi
-    [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
+        [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
 
-fi
-QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
+    fi
+    QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
 
-#plugins
-if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
+    #plugins
+    if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
+            fi
         fi
+        [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
     fi
-    [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
-fi
-QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
+    QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
 
-#imports
-if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
+    #imports
+    if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
+            fi
         fi
+        [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
     fi
-    [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
-fi
-QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
+    QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
 
-#data
-if [ -z "$QT_INSTALL_DATA" ]; then #default
-    QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
-fi
-QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
+    #data
+    if [ -z "$QT_INSTALL_DATA" ]; then #default
+        QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
+    fi
+    QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
 
-#translations
-if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
-    QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
-fi
-QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
+    #translations
+    if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
+        QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
+    fi
+    QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
 
-#settings
-if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
-    if [ "$PLATFORM_MAC" = "yes" ]; then
-	QT_INSTALL_SETTINGS=/Library/Preferences/Qt
-    else
-	QT_INSTALL_SETTINGS=/etc/xdg
+    #settings
+    if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
+        if [ "$PLATFORM_MAC" = "yes" ]; then
+	    QT_INSTALL_SETTINGS=/Library/Preferences/Qt
+        else
+	    QT_INSTALL_SETTINGS=/etc/xdg
+        fi
     fi
-fi
-QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
+    QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
 
-#examples
-if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
+    #examples
+    if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
+            fi
         fi
+        [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
     fi
-    [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
-fi
-QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
+    QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
 
-#demos
-if [ -z "$QT_INSTALL_DEMOS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-	if [ "$PLATFORM_MAC" = "yes" ]; then
-	    QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
+    #demos
+    if [ -z "$QT_INSTALL_DEMOS" ]; then #default
+        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+	    if [ "$PLATFORM_MAC" = "yes" ]; then
+	        QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
+            fi
         fi
+        [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
     fi
-    [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
+    QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
 fi
-QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
 
 #-------------------------------------------------------------------------------
 # help - interactive parts of the script _after_ this section please
@@ -4489,8 +4509,13 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
     mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
 
     #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
-    rm -f mkspecs/default
-    ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+    rm -rf mkspecs/default
+    if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then
+#Link is not supported for Symbian build system
+        cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+    else
+        ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+    fi
     # fix makefiles
     for mkfile in GNUmakefile Makefile; do
         EXTRA_LFLAGS=
@@ -4720,6 +4745,10 @@ case "$XPLATFORM" in *symbian*)
     QMakeVar set styles "windows s60"   #overwrite previous default
     CFG_LIBFREETYPE=no
 
+    if [ "$CFG_LARGEFILE" = auto ]; then
+        CFG_LARGEFILE=no
+    fi
+
     if test -z "$EPOCROOT"; then
         echo "Please export EPOCROOT. It should point to the sdk install dir"
         exit 1
@@ -4744,15 +4773,24 @@ case "$XPLATFORM" in *symbian*)
     )
 
     # 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;
+    if ! echo $XPLATFORM | grep symbian-sbsv2 > /dev/null; then
+        # Raptor does not support configure tests.
+        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
     fi
     ;;
 esac
 
+if [ "$CFG_LARGEFILE" = "auto" ]; then
+    #Large files should be enabled for all Linux systems
+    CFG_LARGEFILE=yes
+fi
+
+
 if [ "$CFG_S60" = "auto" ]; then
     if echo "$XPLATFORM" | grep symbian > /dev/null; then
         CFG_S60=yes
@@ -5068,8 +5106,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
             if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
                 case "$XPLATFORM" in
                     symbian*)
-                    # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file.
-                    CFG_SQL_sqlite=no
+                    # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
+                    # Configuration parameters should be set
+                    CFG_SQL_sqlite=qt
+                    QT_LFLAGS_SQLITE=-lsqlite3
+                    QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
                     ;;
                 esac
             fi
@@ -6075,7 +6116,10 @@ fi
 
 # find if the platform supports IPv6
 if [ "$CFG_IPV6" != "no" ]; then
-    if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+    if [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+        #IPV6 should always be enabled for Symbian release
+        CFG_IPV6=yes
+    elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
         CFG_IPV6=yes
     else
         if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
@@ -6188,7 +6232,7 @@ if [ "$CFG_GETIFADDRS" != "no" ]; then
 fi
 
 # detect OpenSSL
-if [ "$CFG_OPENSSL" != "no" ]; then
+if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
         if [ "$CFG_OPENSSL" = "auto" ]; then
             CFG_OPENSSL=yes
@@ -6204,6 +6248,11 @@ if [ "$CFG_OPENSSL" != "no" ]; then
             CFG_OPENSSL=no
         fi
     fi
+else
+    if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+        #OpenSSl should be enabled for Symbian release
+        CFG_OPENSSL=yes
+    fi
 fi
 
 # detect OpenVG support
@@ -6259,12 +6308,15 @@ if [ "$CFG_PTMALLOC" != "no" ]; then
     QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
 fi
 
-if [ "$CFG_ALSA" = "auto" ]; then
+if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
         CFG_ALSA=yes
     else
         CFG_ALSA=no
     fi
+elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+    # Disabled for Symbian release
+    CFG_ALSA=no
 fi
 
 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then 
@@ -6284,7 +6336,9 @@ fi
 
 if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
     if echo "$XPLATFORM" | grep symbian > /dev/null 2>&1; then
-        "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS
+         if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
+            CFG_AUDIO_BACKEND=yes
+         fi
     else
         CFG_AUDIO_BACKEND=yes
     fi
@@ -6293,6 +6347,9 @@ fi
 if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
     echo "Warning: largefile support cannot be disabled for win32."
     CFG_LARGEFILE="yes"
+elif [ "$CFG_LARGEFILE" != "no" ] && echo "$XPLATFORM" | grep "symbian" > /dev/null; then
+    echo "Warning: largefile support cannot be enabled for symbian."
+    CFG_LARGEFILE="no"
 fi
 
 #-------------------------------------------------------------------------------
@@ -6639,6 +6696,7 @@ elif [ "$CFG_TIFF" = "yes" ]; then
 fi
 if [ "$CFG_LIBFREETYPE" = "no" ]; then
     QT_CONFIG="$QT_CONFIG no-freetype"
+    QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
 elif [ "$CFG_LIBFREETYPE" = "system" ]; then
     QT_CONFIG="$QT_CONFIG system-freetype"
 else
@@ -6670,9 +6728,9 @@ if [ "$CFG_S60" = "yes" ]; then
 fi
 
 if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
-    QMAKE_CONFIG="$QMAKE_CONFIG def_files"
+    QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files"
 else
-    QMAKE_CONFIG="$QMAKE_CONFIG def_files_disabled"
+    QTCONFIG_CONFIG="$QTCONFIG_CONFIG def_files_disabled"
 fi
 
 [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
@@ -7653,12 +7711,14 @@ else
     mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
     chmod -w "$outpath/src/corelib/global/qconfig.h"
     for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
-        if [ '!' -f "$conf" ]; then
+        if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1 ; then
+            [ -e "$conf" ] && rm -rf "$conf"
+            cp -a "$outpath/src/corelib/global/qconfig.h" "$conf"
+        elif [ '!' -f "$conf" ]; then
             ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
         fi
     done
 fi
-
 #-------------------------------------------------------------------------------
 # save configuration into qconfig.pri
 #-------------------------------------------------------------------------------
@@ -7728,6 +7788,10 @@ if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
     echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
     echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
 fi
+if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then
+    echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
+    echo "MMP_RULES += \"ARMFPU softvfp\"" >> "$QTCONFIG.tmp"
+fi
 # replace qconfig.pri if it differs from the newly created temp file
 if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
     rm -f "$QTCONFIG.tmp"
@@ -8302,7 +8366,9 @@ for file in .projects .projects.3; do
         *winmain/winmain.pro)
             [ "$XPLATFORM_MINGW" = "yes" ] || continue
             SPEC=$XQMAKESPEC ;;
-        *s60main/s60main.pro) continue ;;
+        *s60main/s60main.pro) if [ -z "`echo "$XPLATFORM" | grep "symbian" >/dev/null`"]; then
+                continue
+            fi;;
         *examples/activeqt/*) continue ;;
         */qmake/qmake.pro) continue ;;
         *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index c1b31e5..7ec5c6c 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -105,6 +105,7 @@ QMAKE_IDL		  = midl
 QMAKE_LIB		  = ar -ru
 QMAKE_RC		  = windres
 QMAKE_ZIP		  = zip -r -9
+QMAKE_UNZIP               = unzip -o
 
 QMAKE_TAR                 = tar -cf
 QMAKE_GZIP                = gzip -9f
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 34311a9..af8daa5 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -197,8 +197,6 @@ contains(QT_CONFIG, freetype) {
     # pull in the proper freetype2 include directory
     include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
     LIBS_PRIVATE += -lfreetype
-} else {
-    DEFINES *= QT_NO_FREETYPE
 }
 
 contains(QT_CONFIG, fontconfig) {
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
new file mode 100644
index 0000000..ab8d846
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
@@ -0,0 +1,38 @@
+# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them.
+!symbian-abld:!symbian-sbsv2 {
+    !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+        symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip
+
+        # The QMAKE_COPY section is to update timestamp on the file.
+        symbian_sqlite3_header.input = symbian_sqlite3_zip_file
+        symbian_sqlite3_header.output = sqlite3.h
+        !isEmpty(MOC_DIR):symbian_sqlite3_header.output = $$MOC_DIR/$$symbian_sqlite3_header.output
+        symbian_sqlite3_header.CONFIG = combine no_link
+        symbian_sqlite3_header.dependency_type = TYPE_C
+        symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \
+                                          && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
+                                          && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \
+                                          && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+        QMAKE_EXTRA_COMPILERS += symbian_sqlite3_header
+
+        # The QMAKE_COPY section is to update timestamp on the file.
+        symbian_sqlite3_dso.input = symbian_sqlite3_zip_file
+        symbian_sqlite3_dso.output = sqlite3.dso
+        !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output
+        symbian_sqlite3_dso.CONFIG = combine no_link target_predeps
+        symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \
+                                       && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
+                                       && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \
+                                       && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+        QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
+
+        symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
+        symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
+        !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
+        symbian_sqlite3_ver_dso.CONFIG = $$symbian_sqlite3_dso.CONFIG
+        symbian_sqlite3_ver_dso.commands = $$symbian_sqlite3_dso.commands
+        QMAKE_EXTRA_COMPILERS += symbian_sqlite3_ver_dso
+
+        QMAKE_LIBDIR *= $$OBJECTS_DIR
+    }
+}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 691cce1..0d233e6 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,7 +2,7 @@
 TEMPLATE = subdirs
 
 # We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
-symbian {
+symbian-abld|symbian-sbsv2 {
     !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
         BLD_INF_RULES.prj_exports +=  ":zip SQLite3_v9.2.zip"
     }
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri
index 7ad5936..3560c64 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.pri
+++ b/src/sql/drivers/sqlite/qsql_sqlite.pri
@@ -1,6 +1,8 @@
 HEADERS += $$PWD/qsql_sqlite.h
 SOURCES += $$PWD/qsql_sqlite.cpp
 
+symbian:include(../../plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+
 !system-sqlite:!contains(LIBS, .*sqlite3.*) {
     include($$PWD/../../../3rdparty/sqlite.pri)
 } else {

commit c50a719da596e2860a6dcf791c2a49d88cad8e4b
Author: axis <qt-info@nokia.com>
Date:   Thu Jul 22 16:30:52 2010 +0200

    Fixed an incorrect profile inclusion.
    
    RevBy:    Trust me
    (cherry picked from commit ee95770c89306ee5c2fb00c95dfc51f96c384049)

diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri
index 3560c64..78a4e49 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.pri
+++ b/src/sql/drivers/sqlite/qsql_sqlite.pri
@@ -1,7 +1,7 @@
 HEADERS += $$PWD/qsql_sqlite.h
 SOURCES += $$PWD/qsql_sqlite.cpp
 
-symbian:include(../../plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+symbian:include($$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
 
 !system-sqlite:!contains(LIBS, .*sqlite3.*) {
     include($$PWD/../../../3rdparty/sqlite.pri)

commit 0ce0021788fef7e7f48e7227184511bfbe954603
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Thu Jul 29 11:15:00 2010 +0200

    fixes for using freetds
    
    DBNTWIN32 only if not Q_USE_SYBASE.
    Workaround for RETCODE typedef conflict between ODBC and FreeTDS.
    Include winsock2.h supplies SOCKET for FreeTDS.
    
    Merge-request: 684
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit 3643d21756a6bd9ed06a409457d6e8c93aba3b43)

diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h
index cb318f3..b48f12b 100644
--- a/src/sql/drivers/tds/qsql_tds.h
+++ b/src/sql/drivers/tds/qsql_tds.h
@@ -48,7 +48,10 @@
 
 #ifdef Q_OS_WIN32
 #define WIN32_LEAN_AND_MEAN
+#ifndef Q_USE_SYBASE
 #define DBNTWIN32 // indicates 32bit windows dblib
+#endif
+#include <winsock2.h>
 #include <QtCore/qt_windows.h>
 #include <sqlfront.h>
 #include <sqldb.h>
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 7ad4fc5..5d2a9fa 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -60,7 +60,10 @@
 #include "../drivers/oci/qsql_oci.h"
 #endif
 #ifdef QT_SQL_TDS
+// conflicting RETCODE typedef between odbc and freetds
+#define RETCODE DBRETCODE
 #include "../drivers/tds/qsql_tds.h"
+#undef RETCODE
 #endif
 #ifdef QT_SQL_DB2
 #include "../drivers/db2/qsql_db2.h"

commit 67571e1c3122ff64927be68d1d2f4b0e30ca77a5
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Tue Aug 3 16:37:05 2010 +0200

    Improve TDS configuration through QT_LFLAGS_TDS, SYBASE, SYBASE_LIBS
    
    Consistent with QT_LFLAGS_*  for other database drivers.
    Support added to configure shell script and configure.exe.
    Respect SYBASE and SYBASE_LIBS.
    Use QT_LFLAGS_TDS in project files.
    
    Merge-request: 2416
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit 2c7621730d30ac418874c18036a7aa34e2aae1d0)

diff --git a/configure b/configure
index 1ddbb70..9b1fbbf 100755
--- a/configure
+++ b/configure
@@ -818,6 +818,7 @@ QT_LFLAGS_MYSQL_R=
 QT_CFLAGS_SQLITE=
 QT_LFLAGS_SQLITE=
 QT_LFLAGS_ODBC="-lodbc"
+QT_LFLAGS_TDS=
 
 # flags for libdbus-1
 QT_CFLAGS_DBUS=
@@ -5028,7 +5029,9 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
             ;;
         tds)
             if [ "$CFG_SQL_tds" != "no" ]; then
-                if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+                [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
+                [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
+                if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
                     if [ "$CFG_SQL_tds" = "auto" ]; then
                         CFG_SQL_tds=plugin
                     fi
@@ -7850,6 +7853,9 @@ fi
 if [ -n "$QT_LFLAGS_ODBC" ]; then
     echo "QT_LFLAGS_ODBC   = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp"
 fi
+if [ -n "$QT_LFLAGS_TDS" ]; then
+    echo "QT_LFLAGS_TDS   = $QT_LFLAGS_TDS" >> "$CACHEFILE.tmp"
+fi
 
 if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
     echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
index c552ead..037f793 100644
--- a/src/sql/drivers/tds/qsql_tds.pri
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -1,8 +1,10 @@
 HEADERS += $$PWD/qsql_tds.h
 SOURCES += $$PWD/qsql_tds.cpp
 
-unix {
+unix|win32-g++: {
+    !isEmpty(QT_LFLAGS_TDS):!static:LIBS *= $$QT_LFLAGS_TDS
     !contains(LIBS, .*sybdb.*):LIBS += -lsybdb
+    QMAKE_CXXFLAGS *= $$QT_CFLAGS_TDS
 } else:win32-borland {
     LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
 } else {
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a6cd6c1..5b3d714 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1028,6 +1028,10 @@ void Configure::parseCmdLine()
             opensslLibs = configCmdLine.at(i);
         } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) {
             psqlLibs = configCmdLine.at(i);
+        } else if (configCmdLine.at(i).startsWith("SYBASE=")) {
+            sybase = configCmdLine.at(i);
+        } else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) {
+            sybaseLibs = configCmdLine.at(i);
         }
 
         else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){
@@ -2746,6 +2750,17 @@ void Configure::generateOutputVars()
         }
     if (!psqlLibs.isEmpty())
         qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1);
+
+    {
+        QStringList lflagsTDS;
+        if (!sybase.isEmpty())
+            lflagsTDS += QString("-L") + fixSeparators(sybase.section("=", 1) + "/lib");
+        if (!sybaseLibs.isEmpty())
+            lflagsTDS += sybaseLibs.section("=", 1);
+        if (!lflagsTDS.isEmpty())
+            qmakeVars += QString("QT_LFLAGS_TDS=") + lflagsTDS.join(" ");
+    }
+
     if (!qmakeSql.isEmpty())
         qmakeVars += QString("sql-drivers    += ") + qmakeSql.join(" ");
     if (!qmakeSqlPlugins.isEmpty())
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index 570806d..be13613 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -134,6 +134,8 @@ private:
     QStringList qmakeLibs;
     QString opensslLibs;
     QString psqlLibs;
+    QString sybase;
+    QString sybaseLibs;
 
     QMap<QString,QString> licenseInfo;
     QString outputLine;

commit ec2569543a436acb6f7e637981754a6bbba38e53
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Tue Aug 24 14:28:42 2010 +0200

    scope fixes and clutter reduction for sql driver projects
    
    Add missing wildcard to scope where meant to include all
    win32-g++ targets.
    
    There is no reason to ignore QT_LFLAGS_TDS and QT_LFLAGS_PSQL
    in static builds. Via LIBS these may end up in QMAKE_PRL_LIBS
    in QtSql.prl. Also, the isEmpty() tests on these is
    redundant and only wastes time.
    
    Processing of QT_CFLAGS_PSQL should not depend on QT_LFLAGS_PSQL.
    
    It no longer seems appropriate to clean up "-lz" here in
    case of zlib bundled in QtCore. It's reasonable to expect
    QT_LFLAGS_PSQL to be ready after configure.
    (cherry picked from commit f1ceaaf96bc658e04f83fd909ad93d1a4d0a2290)

diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri
index 97db4be..6da3540 100644
--- a/src/sql/drivers/psql/qsql_psql.pri
+++ b/src/sql/drivers/psql/qsql_psql.pri
@@ -2,12 +2,9 @@ HEADERS += $$PWD/qsql_psql.h
 SOURCES += $$PWD/qsql_psql.cpp
 
 unix|win32-g++* {
-    !static:!isEmpty(QT_LFLAGS_PSQL) {
-        !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
-        LIBS *= $$QT_LFLAGS_PSQL
-        QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
-    }
+    LIBS *= $$QT_LFLAGS_PSQL
     !contains(LIBS, .*pq.*):LIBS += -lpq
+    QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
 } else {
     !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32
 }
diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
index 037f793..521c06b 100644
--- a/src/sql/drivers/tds/qsql_tds.pri
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -1,8 +1,8 @@
 HEADERS += $$PWD/qsql_tds.h
 SOURCES += $$PWD/qsql_tds.cpp
 
-unix|win32-g++: {
-    !isEmpty(QT_LFLAGS_TDS):!static:LIBS *= $$QT_LFLAGS_TDS
+unix|win32-g++*: {
+    LIBS *= $$QT_LFLAGS_TDS
     !contains(LIBS, .*sybdb.*):LIBS += -lsybdb
     QMAKE_CXXFLAGS *= $$QT_CFLAGS_TDS
 } else:win32-borland {

commit 74c090fc8ffde37e14cf6c0e6ece3ef6b09be3f9
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Mon Aug 30 10:27:12 2010 +0200

    fix MinGW cross compilation with -debug-and-release
    
    Fixed two issues in the configure script that prevented
    -debug-and-release from working correctly:
    
    We now allow dual debug and release mode for MinGW.
    
    We follow configure.exe in *not* settting PRECOMPILED_DIR. This gives
    qmake the freedom to put the debug and release precompiled headers in
    separate directories.
    
    Merge-request: 794
    Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
    (cherry picked from commit b4a7eadb28a49ace84994dcff665b1cabae69652)

diff --git a/configure b/configure
index 9b1fbbf..ea390d5 100755
--- a/configure
+++ b/configure
@@ -2275,7 +2275,7 @@ fi
 
 # detect build style
 if [ "$CFG_DEBUG" = "auto" ]; then
-    if [ "$PLATFORM_MAC" = "yes" ]; then
+    if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
         CFG_DEBUG_RELEASE=yes
         CFG_DEBUG=yes
     elif [ "$CFG_DEV" = "yes" ]; then
@@ -6593,7 +6593,11 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
     QT_CONFIG="$QT_CONFIG embedded"
     rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
 fi
-QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
+if [ "$XPLATFORM_MINGW" != "yes" ]; then
+    # Do not set this here for Windows. Let qmake do it so
+    # debug and release precompiled headers are kept separate.
+    QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
+fi
 QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
 QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
 QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"

commit 06bd1b423e412a9867e9654776396452df9ab5df
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Mon Aug 30 15:25:54 2010 +0200

    Fix static build on Windows with MinGW.
    
    Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for
    static code.
    
    Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
    (cherry picked from commit edbc656bfa5069dd40f64ae3123d6370c2d86538)

diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 8bc8e59..c383bcb 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
 static const char *qt_inherit_text = "inherit";
 #define QT_INHERIT QLatin1String(qt_inherit_text)
 
-Q_DECL_IMPORT double qstrtod(const char *s00, char const **se, bool *ok);
+Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
 
 // ======== duplicated from qcolor_p
 

commit 9d48a599f8a29067346bc6f257b4e0a767717349
Author: Mark Brand <mabrand@mabrand.nl>
Date:   Sat Jun 5 23:41:04 2010 +0200

    added missing INSTALLS to JavaScriptCore.pro for static libjscore
    
    For static build of Qt on win32-g++*, applications using webkit
    link to libjscore.a.

diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
index 3f1ac86..602cb8d 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
@@ -14,6 +14,12 @@ QT -= gui
 
 CONFIG += depend_includepath
 
+static:win32-g++* {
+    # applications must link to static libjscore
+    target.path = $$[QT_INSTALL_LIBS]
+    INSTALLS += target
+}
+
 contains(QT_CONFIG, embedded):CONFIG += embedded
 
 CONFIG(QTDIR_build) {