Changeset 586
- Timestamp:
- Feb 21, 2010, 6:13:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r585 r586 213 213 G.Compiler = "" 214 214 G.CompilerVersion = 0 215 G.CompilerVersionString = "" 215 216 216 217 G.CFG_CONFIGURE_EXIT_ON_ERROR = "yes" … … 1250 1251 * Things that affect the Qt API/ABI: 1251 1252 * 1252 * Config:1253 * Options: 1253 1254 * minimal-config small-config medium-config large-config full-config 1254 * debug release1255 1255 * 1256 1256 * Different edition modules: 1257 1257 * network canvas table xml opengl sql 1258 1258 * 1259 * Options:1259 * Things that do not affect the Qt API/ABI: 1260 1260 * stl 1261 *1262 * Things that do not affect the Qt API/ABI:1263 1261 * system-jpeg no-jpeg jpeg 1264 1262 * system-mng no-mng mng … … 1267 1265 * system-libtiff no-libtiff 1268 1266 * no-gif gif 1267 * debug release 1269 1268 * dll staticlib 1270 1269 * 1271 * internal1272 1270 * nocrosscompiler 1273 1271 * GNUmake … … 1282 1280 */ 1283 1281 1284 ALL_OPTIONS = " stl"1282 ALL_OPTIONS = "" 1285 1283 BUILD_CONFIG = "" 1286 BUILD_CONFIG2 = ""1287 1284 BUILD_OPTIONS = "" 1288 1285 … … 1301 1298 * but a separate build key is maintained for each, so skip it now */ 1302 1299 nop 1303 end1304 else if (opt == "stl") then do1305 /* these config options affect the Qt API/ABI. they should influence1306 * the generation of the buildkey, so we don't skip them */1307 skip = "no"1308 1300 end 1309 1301 /* skip all other options since they don't affect the Qt API/ABI. */ … … 1333 1325 end 1334 1326 1335 /* QT_NO* defines affect the Qt API (and binary compatibility). they need 1336 * to be included in the build key */ 1337 DEFS = "" 1338 do i = 1 to words(G.D_FLAGS) 1339 opt = strip(word(G.D_FLAGS, i)) 1340 if (StartsWith(opt, "QT_NO")) then do 1341 /* skip defines marked as not affecting binary compatibility */ 1342 if (wordpos(opt, G.BUILD_KEY_IRRELEVANT) \= 0) then 1343 iterate 1344 /* maintan sort order and unicity (helps ensure that changes in this 1345 * configure script don't affect the QT_BUILD_KEY generation) */ 1346 if (DEFS == "") then 1347 DEFS = opt 1348 else 1349 do j = 1 to words(DEFS) 1350 w = word(DEFS, j) 1351 c = compare(opt, w) 1352 if (c == 0) then leave 1353 if (substr(opt, c, 1) < substr(w, c, 1)) then do 1354 DEFS = insert(opt" ", DEFS, wordindex(DEFS, j) - 1) 1355 leave 1356 end 1357 if (j == words(DEFS)) then 1358 DEFS = DEFS" "opt 1359 end 1360 end 1361 /* skip all other compiler defines */ 1362 end 1363 BUILD_OPTIONS = BUILD_OPTIONS DEFS 1364 1365 BUILD_OPTIONS = BUILD_CONFIG2 BUILD_CONFIG BUILD_OPTIONS 1366 1367 parse value G.PLATFORM with ."-"COMPILER 1327 BUILD_OPTIONS = BUILD_CONFIG BUILD_OPTIONS 1328 1329 /* some compilers generate binary incompatible code between different versions, 1330 * so we need to generate a build key that is different between these compilers */ 1331 COMPILER = G.Compiler 1332 if (COMPILER == 'g++') then do 1333 if (StartsWith(G.CompilerVersionString, "3.")) then 1334 COMPILER = COMPILER'-3' 1335 else if (StartsWith(G.CompilerVersionString, "4.")) then 1336 COMPILER = COMPILER'-4' 1337 else 1338 COMPILER = COMPILER'-'G.CompilerVersionString 1339 end 1340 else do 1341 COMPILER = COMPILER'-'G.CompilerVersionString 1342 end 1343 1368 1344 QT_BUILD_KEY_PRE = G.CFG_USER_BUILD_KEY G.CFG_ARCH COMPILER 1369 1345 QT_BUILD_KEY_POST = BUILD_OPTIONS 1370 1346 if (G.QT_NAMESPACE \== "") then 1371 1347 QT_BUILD_KEY_POST = Join(QT_BUILD_KEY_POST, G.QT_NAMESPACE) 1372 1373 /* we maintain two separate build keys (mainly necessary for the1374 * debug-and-release build) differentiated by the DEBUG compier define */1375 QT_BUILD_KEY_RELEASE = Normalize(QT_BUILD_KEY_PRE "release" QT_BUILD_KEY_POST)1376 QT_BUILD_KEY_DEBUG = Normalize(QT_BUILD_KEY_PRE "debug" QT_BUILD_KEY_POST)1377 1378 drop QT_BUILD_KEY_PRE QT_BUILD_KEY_POST1379 1348 1380 1349 /*-------------------------------------------------------------------------- … … 1408 1377 '#ifndef QT_EDITION'G.EOL||, 1409 1378 '# define QT_EDITION' G.QT_EDITION||G.EOL||, 1410 '#endif'G.EOL||,1411 ''G.EOL||,1412 '#ifndef NDEBUG'G.EOL||,1413 '# define QT_BUILD_KEY "'QT_BUILD_KEY_DEBUG'"'G.EOL||,1414 '#else'G.EOL||,1415 '# define QT_BUILD_KEY "'QT_BUILD_KEY_RELEASE'"'G.EOL||,1416 1379 '#endif'G.EOL||, 1417 1380 ''G.EOL||, … … 1569 1532 end 1570 1533 end 1534 1535 /* Add QT_NO* defines to the build key */ 1536 DEFS = "" 1537 ALL_FLAGS = G.D_FLAGS G.QCONFIG_FLAGS 1538 do i = 1 to words(ALL_FLAGS) 1539 opt = strip(word(ALL_FLAGS, i)) 1540 if (StartsWith(opt, "QT_NO_")) then do 1541 /* maintan sort order and unicity (helps ensure that changes in this 1542 * configure script don't affect the QT_BUILD_KEY generation) */ 1543 if (DEFS == "") then 1544 DEFS = opt 1545 else 1546 do j = 1 to words(DEFS) 1547 w = word(DEFS, j) 1548 c = compare(opt, w) 1549 if (c == 0) then leave 1550 if (substr(opt, c, 1) < substr(w, c, 1)) then do 1551 DEFS = insert(opt" ", DEFS, wordindex(DEFS, j) - 1) 1552 leave 1553 end 1554 if (j == words(DEFS)) then 1555 DEFS = DEFS" "opt 1556 end 1557 end 1558 /* skip all other compiler defines */ 1559 end 1560 QT_BUILD_KEY_POST = QT_BUILD_KEY_POST DEFS 1561 1562 /* write out QT_BUILD_KEY */ 1563 1564 /* we maintain two separate build keys (mainly necessary for the 1565 * debug-and-release build) differentiated by the DEBUG compier define */ 1566 QT_BUILD_KEY_RELEASE = Normalize(QT_BUILD_KEY_PRE "release" QT_BUILD_KEY_POST) 1567 QT_BUILD_KEY_DEBUG = Normalize(QT_BUILD_KEY_PRE "debug" QT_BUILD_KEY_POST) 1568 1569 call charout qconfig_h_new,, 1570 '/* Qt Build Key */'G.EOL||, 1571 '#ifndef NDEBUG'G.EOL||, 1572 '# define QT_BUILD_KEY "'QT_BUILD_KEY_DEBUG'"'G.EOL||, 1573 '#else'G.EOL||, 1574 '# define QT_BUILD_KEY "'QT_BUILD_KEY_RELEASE'"'G.EOL||, 1575 '#endif'G.EOL||, 1576 ''G.EOL 1571 1577 1572 1578 /* close the file */ … … 2001 2007 select 2002 2008 when (G.Compiler == "g++") then do 2003 address "cmd" "g++ - -version | rxqueue.exe"2009 address "cmd" "g++ -dumpversion | rxqueue.exe" 2004 2010 do while queued() <> 0 2005 2011 parse pull str 2006 if ( left(str, 10) == "g++ (GCC)") then do2007 parse value substr(str, 11) with G.CompilerVersionString " " .2012 if (str \= "") then do 2013 G.CompilerVersionString = strip(str) 2008 2014 parse var G.CompilerVersionString x "." y "." z 2009 2015 if (x == "") then x = 0 … … 2011 2017 if (z == "") then z = 0 2012 2018 G.CompilerVersion = x * 10000 + y * 100 + z 2019 leave 2013 2020 end 2014 2021 end
Note:
See TracChangeset
for help on using the changeset viewer.