Lines 1126-1135
make_compiler_cflags() {
Link Here
|
1126 |
cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g` |
1126 |
cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g` |
1127 |
|
1127 |
|
1128 |
flags="$flags -rdynamic" |
1128 |
flags="$flags -rdynamic" |
|
|
1129 |
cxxflags="$cxxflags -rdynamic" |
1129 |
ldflags="$ldflags -rdynamic" |
1130 |
ldflags="$ldflags -rdynamic" |
1130 |
|
1131 |
|
1131 |
if [ $cc_version -ge 101 ]; then |
1132 |
if [ $cc_version -ge 101 ]; then |
1132 |
flags="$flags -Wno-multichar" |
1133 |
flags="$flags -Wno-multichar" |
|
|
1134 |
cxxflags="$cxxflags -Wno-multichar" |
1133 |
fi |
1135 |
fi |
1134 |
|
1136 |
|
1135 |
if [ $cc_version -ge 110 ]; then |
1137 |
if [ $cc_version -ge 110 ]; then |
Lines 1144-1149
make_compiler_cflags() {
Link Here
|
1144 |
if [ "$enable_lto" != "0" ] && [ -n "$has_ipo" ]; then |
1146 |
if [ "$enable_lto" != "0" ] && [ -n "$has_ipo" ]; then |
1145 |
# Use IPO (only if we see IPO exists and is requested) |
1147 |
# Use IPO (only if we see IPO exists and is requested) |
1146 |
flags="$flags -ipo" |
1148 |
flags="$flags -ipo" |
|
|
1149 |
cxxflags="$cxxflags -ipo" |
1147 |
ldflags="$ldflags -ipo $CFLAGS" |
1150 |
ldflags="$ldflags -ipo $CFLAGS" |
1148 |
fi |
1151 |
fi |
1149 |
else |
1152 |
else |
Lines 1160-1168
make_compiler_cflags() {
Link Here
|
1160 |
flags="$flags -W -Wno-unused-parameter -Wformat=2" |
1163 |
flags="$flags -W -Wno-unused-parameter -Wformat=2" |
1161 |
flags="$flags -Wredundant-decls" |
1164 |
flags="$flags -Wredundant-decls" |
1162 |
|
1165 |
|
|
|
1166 |
cxxflags="$cxxflags -Wall -Wno-multichar -Wsign-compare -Wundef" |
1167 |
cxxflags="$cxxflags -Wwrite-strings -Wpointer-arith" |
1168 |
cxxflags="$cxxflags -W -Wno-unused-parameter -Wformat=2" |
1169 |
cxxflags="$cxxflags -Wredundant-decls" |
1170 |
|
1163 |
if [ $enable_assert -eq 0 ]; then |
1171 |
if [ $enable_assert -eq 0 ]; then |
1164 |
# Do not warn about unused variables when building without asserts |
1172 |
# Do not warn about unused variables when building without asserts |
1165 |
flags="$flags -Wno-unused-variable" |
1173 |
flags="$flags -Wno-unused-variable" |
|
|
1174 |
cxxflags="$cxxflags -Wno-unused-variable" |
1166 |
fi |
1175 |
fi |
1167 |
|
1176 |
|
1168 |
if [ $cc_version -ge 40 ]; then |
1177 |
if [ $cc_version -ge 40 ]; then |
Lines 1171-1180
make_compiler_cflags() {
Link Here
|
1171 |
# break anything. So disable strict-aliasing to make the |
1180 |
# break anything. So disable strict-aliasing to make the |
1172 |
# compiler all happy. |
1181 |
# compiler all happy. |
1173 |
flags="$flags -fno-strict-aliasing" |
1182 |
flags="$flags -fno-strict-aliasing" |
|
|
1183 |
cxxflags="$cxxflags -fno-strict-aliasing" |
1174 |
ldflags="$ldflags -fno-strict-aliasing" |
1184 |
ldflags="$ldflags -fno-strict-aliasing" |
1175 |
# Warn about casting-out 'const' with regular C-style cast. |
1185 |
# Warn about casting-out 'const' with regular C-style cast. |
1176 |
# The preferred way is const_cast<>() which doesn't warn. |
1186 |
# The preferred way is const_cast<>() which doesn't warn. |
1177 |
flags="$flags -Wcast-qual" |
1187 |
flags="$flags -Wcast-qual" |
|
|
1188 |
cxxflags="$cxxflags -Wcast-qual" |
1178 |
fi |
1189 |
fi |
1179 |
|
1190 |
|
1180 |
if [ $cc_version -ge 42 ]; then |
1191 |
if [ $cc_version -ge 42 ]; then |
Lines 1183-1188
make_compiler_cflags() {
Link Here
|
1183 |
# sure that they will not happen. It furthermore complains |
1194 |
# sure that they will not happen. It furthermore complains |
1184 |
# about it's own optimized code in some places. |
1195 |
# about it's own optimized code in some places. |
1185 |
flags="$flags -fno-strict-overflow" |
1196 |
flags="$flags -fno-strict-overflow" |
|
|
1197 |
cxxflags="$cxxflags -fno-strict-overflow" |
1186 |
ldflags="$ldflags -fno-strict-overflow" |
1198 |
ldflags="$ldflags -fno-strict-overflow" |
1187 |
fi |
1199 |
fi |
1188 |
|
1200 |
|
Lines 1198-1203
make_compiler_cflags() {
Link Here
|
1198 |
if [ "$enable_lto" != "0" ] && [ -n "$has_lto" ]; then |
1210 |
if [ "$enable_lto" != "0" ] && [ -n "$has_lto" ]; then |
1199 |
# Use LTO only if we see LTO exists and is requested |
1211 |
# Use LTO only if we see LTO exists and is requested |
1200 |
flags="$flags -flto" |
1212 |
flags="$flags -flto" |
|
|
1213 |
cxxflags="$cxxflags -flto" |
1201 |
ldflags="$ldflags -flto $2" |
1214 |
ldflags="$ldflags -flto $2" |
1202 |
fi |
1215 |
fi |
1203 |
fi |
1216 |
fi |
Lines 1206-1211
make_compiler_cflags() {
Link Here
|
1206 |
if [ -n "$has_rdynamic" ]; then |
1219 |
if [ -n "$has_rdynamic" ]; then |
1207 |
# rdynamic is used to get useful stack traces from crash reports. |
1220 |
# rdynamic is used to get useful stack traces from crash reports. |
1208 |
flags="$flags -rdynamic" |
1221 |
flags="$flags -rdynamic" |
|
|
1222 |
cxxflags="$cxxflags -rdynamic" |
1209 |
ldflags="$ldflags -rdynamic" |
1223 |
ldflags="$ldflags -rdynamic" |
1210 |
fi |
1224 |
fi |
1211 |
fi |
1225 |
fi |
Lines 1235-1240
make_cflags_and_ldflags() {
Link Here
|
1235 |
make_compiler_cflags "$cc_host" "$CFLAGS" "CFLAGS" "$CXXFLAGS" "CXXFLAGS" "$LDFLAGS" "LDFLAGS" |
1249 |
make_compiler_cflags "$cc_host" "$CFLAGS" "CFLAGS" "$CXXFLAGS" "CXXFLAGS" "$LDFLAGS" "LDFLAGS" |
1236 |
|
1250 |
|
1237 |
CFLAGS="$CFLAGS -D$os" |
1251 |
CFLAGS="$CFLAGS -D$os" |
|
|
1252 |
CXXFLAGS="$CXXFLAGS -D$os" |
1238 |
|
1253 |
|
1239 |
if [ $enable_debug = 0 ]; then |
1254 |
if [ $enable_debug = 0 ]; then |
1240 |
# No debug, add default stuff |
1255 |
# No debug, add default stuff |
Lines 1249-1254
make_cflags_and_ldflags() {
Link Here
|
1249 |
fi |
1264 |
fi |
1250 |
|
1265 |
|
1251 |
CFLAGS="-O2 -fomit-frame-pointer $CFLAGS" |
1266 |
CFLAGS="-O2 -fomit-frame-pointer $CFLAGS" |
|
|
1267 |
CXXFLAGS="-O2 -fomit-frame-pointer $CXXFLAGS" |
1252 |
LDFLAGS="-O2 -fomit-frame-pointer $LDFLAGS" |
1268 |
LDFLAGS="-O2 -fomit-frame-pointer $LDFLAGS" |
1253 |
fi |
1269 |
fi |
1254 |
else |
1270 |
else |
Lines 1257-1284
make_cflags_and_ldflags() {
Link Here
|
1257 |
# Each debug level reduces the optimization by a bit |
1273 |
# Each debug level reduces the optimization by a bit |
1258 |
if [ $enable_debug -ge 1 ]; then |
1274 |
if [ $enable_debug -ge 1 ]; then |
1259 |
CFLAGS="$CFLAGS -g -D_DEBUG -D_FORTIFY_SOURCE=2" |
1275 |
CFLAGS="$CFLAGS -g -D_DEBUG -D_FORTIFY_SOURCE=2" |
|
|
1276 |
CXXFLAGS="$CXXFLAGS -g -D_DEBUG -D_FORTIFY_SOURCE=2" |
1260 |
if [ "$os" = "PSP" ]; then |
1277 |
if [ "$os" = "PSP" ]; then |
1261 |
CFLAGS="$CFLAGS -G0" |
1278 |
CFLAGS="$CFLAGS -G0" |
1262 |
fi |
1279 |
fi |
1263 |
fi |
1280 |
fi |
1264 |
if [ $enable_debug -ge 2 ]; then |
1281 |
if [ $enable_debug -ge 2 ]; then |
1265 |
CFLAGS="$CFLAGS -fno-inline" |
1282 |
CFLAGS="$CFLAGS -fno-inline" |
|
|
1283 |
CXXFLAGS="$CXXFLAGS -fno-inline" |
1266 |
LDFLAGS="$LDFLAGS -fno-inline" |
1284 |
LDFLAGS="$LDFLAGS -fno-inline" |
1267 |
fi |
1285 |
fi |
1268 |
if [ $enable_debug -ge 3 ]; then |
1286 |
if [ $enable_debug -ge 3 ]; then |
1269 |
CFLAGS="$CFLAGS -O0" |
1287 |
CFLAGS="$CFLAGS -O0" |
1270 |
else |
1288 |
CXXFLAGS="$CXXFLAGS -O0" |
1271 |
CFLAGS="$CFLAGS -O2" |
|
|
1272 |
fi |
1289 |
fi |
1273 |
fi |
1290 |
fi |
1274 |
|
1291 |
|
1275 |
if [ "$enable_profiling" != "0" ]; then |
1292 |
if [ "$enable_profiling" != "0" ]; then |
1276 |
CFLAGS="$CFLAGS -p" |
1293 |
CFLAGS="$CFLAGS -p" |
|
|
1294 |
CXXFLAGS="$CXXFLAGS -p" |
1277 |
LDFLAGS="$LDFLAGS -pg" |
1295 |
LDFLAGS="$LDFLAGS -pg" |
1278 |
fi |
1296 |
fi |
1279 |
|
1297 |
|
1280 |
if [ "$with_threads" = "0" ]; then |
1298 |
if [ "$with_threads" = "0" ]; then |
1281 |
CFLAGS="$CFLAGS -DNO_THREADS" |
1299 |
CFLAGS="$CFLAGS -DNO_THREADS" |
|
|
1300 |
CXXFLAGS="$CXXFLAGS -DNO_THREADS" |
1282 |
fi |
1301 |
fi |
1283 |
|
1302 |
|
1284 |
if [ "`echo $1 | cut -c 1-3`" != "icc" ]; then |
1303 |
if [ "`echo $1 | cut -c 1-3`" != "icc" ]; then |
Lines 1334-1344
make_cflags_and_ldflags() {
Link Here
|
1334 |
LIBS="$LIBS -framework QuickTime" |
1353 |
LIBS="$LIBS -framework QuickTime" |
1335 |
else |
1354 |
else |
1336 |
CFLAGS="$CFLAGS -DNO_QUICKTIME" |
1355 |
CFLAGS="$CFLAGS -DNO_QUICKTIME" |
|
|
1356 |
CXXFLAGS="$CXXFLAGS -DNO_QUICKTIME" |
1337 |
fi |
1357 |
fi |
1338 |
|
1358 |
|
1339 |
if [ "$enable_universal" = "0" ]; then |
1359 |
if [ "$enable_universal" = "0" ]; then |
1340 |
# Universal builds set this elsewhere |
1360 |
# Universal builds set this elsewhere |
1341 |
CFLAGS="$OSX_SYSROOT $CFLAGS" |
1361 |
CFLAGS="$OSX_SYSROOT $CFLAGS" |
|
|
1362 |
CXXFLAGS="$OSX_SYSROOT $CXXFLAGS" |
1342 |
LDFLAGS="$OSX_LD_SYSROOT $LDFLAGS" |
1363 |
LDFLAGS="$OSX_LD_SYSROOT $LDFLAGS" |
1343 |
fi |
1364 |
fi |
1344 |
|
1365 |
|
Lines 1347-1360
make_cflags_and_ldflags() {
Link Here
|
1347 |
# Universal builds set the version elsewhere. |
1368 |
# Universal builds set the version elsewhere. |
1348 |
if [ "$cpu_type" = "64" ]; then |
1369 |
if [ "$cpu_type" = "64" ]; then |
1349 |
CFLAGS="$CFLAGS -mmacosx-version-min=10.5" |
1370 |
CFLAGS="$CFLAGS -mmacosx-version-min=10.5" |
|
|
1371 |
CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.5" |
1350 |
else |
1372 |
else |
1351 |
gcc_cpu=`$cc_host -dumpmachine` |
1373 |
gcc_cpu=`$cc_host -dumpmachine` |
1352 |
if [ "`echo $gcc_cpu | cut -c 1-3`" = "ppc" -o "`echo $gcc_cpu | cut -c 1-7`" = "powerpc" ]; then |
1374 |
if [ "`echo $gcc_cpu | cut -c 1-3`" = "ppc" -o "`echo $gcc_cpu | cut -c 1-7`" = "powerpc" ]; then |
1353 |
# PowerPC build can run on 10.3 |
1375 |
# PowerPC build can run on 10.3 |
1354 |
CFLAGS="$CFLAGS -mmacosx-version-min=10.3" |
1376 |
CFLAGS="$CFLAGS -mmacosx-version-min=10.3" |
|
|
1377 |
CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.3" |
1355 |
else |
1378 |
else |
1356 |
# Intel is only available starting from 10.4 |
1379 |
# Intel is only available starting from 10.4 |
1357 |
CFLAGS="$CFLAGS -mmacosx-version-min=10.4" |
1380 |
CFLAGS="$CFLAGS -mmacosx-version-min=10.4" |
|
|
1381 |
CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.4" |
1358 |
fi |
1382 |
fi |
1359 |
fi |
1383 |
fi |
1360 |
fi |
1384 |
fi |
Lines 1367-1372
make_cflags_and_ldflags() {
Link Here
|
1367 |
# Most targets act like UNIX, just with some additions |
1391 |
# Most targets act like UNIX, just with some additions |
1368 |
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then |
1392 |
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then |
1369 |
CFLAGS="$CFLAGS -DUNIX" |
1393 |
CFLAGS="$CFLAGS -DUNIX" |
|
|
1394 |
CXXFLAGS="$CXXFLAGS -DUNIX" |
1370 |
fi |
1395 |
fi |
1371 |
# And others like Windows |
1396 |
# And others like Windows |
1372 |
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then |
1397 |
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then |
Lines 1387-1394
make_cflags_and_ldflags() {
Link Here
|
1387 |
|
1412 |
|
1388 |
if [ -n "$sdl_config" ]; then |
1413 |
if [ -n "$sdl_config" ]; then |
1389 |
CFLAGS="$CFLAGS -DWITH_SDL" |
1414 |
CFLAGS="$CFLAGS -DWITH_SDL" |
|
|
1415 |
CXXFLAGS="$CXXFLAGS -DWITH_SDL" |
1390 |
# SDL must not add _GNU_SOURCE as it breaks many platforms |
1416 |
# SDL must not add _GNU_SOURCE as it breaks many platforms |
1391 |
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" |
1417 |
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" |
|
|
1418 |
CXXFLAGS="$CXXFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" |
1392 |
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then |
1419 |
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then |
1393 |
if [ "$enable_static" != "0" ]; then |
1420 |
if [ "$enable_static" != "0" ]; then |
1394 |
LIBS="$LIBS `$sdl_config --static-libs`" |
1421 |
LIBS="$LIBS `$sdl_config --static-libs`" |
Lines 1418-1423
make_cflags_and_ldflags() {
Link Here
|
1418 |
LIBS="$LIBS -lz" |
1445 |
LIBS="$LIBS -lz" |
1419 |
fi |
1446 |
fi |
1420 |
CFLAGS="$CFLAGS -DWITH_ZLIB" |
1447 |
CFLAGS="$CFLAGS -DWITH_ZLIB" |
|
|
1448 |
CXXFLAGS="$CXXFLAGS -DWITH_ZLIB" |
1421 |
fi |
1449 |
fi |
1422 |
|
1450 |
|
1423 |
if [ "$with_lzo2" != "0" ]; then |
1451 |
if [ "$with_lzo2" != "0" ]; then |
Lines 1427-1445
make_cflags_and_ldflags() {
Link Here
|
1427 |
LIBS="$LIBS -llzo2" |
1455 |
LIBS="$LIBS -llzo2" |
1428 |
fi |
1456 |
fi |
1429 |
CFLAGS="$CFLAGS -DWITH_LZO" |
1457 |
CFLAGS="$CFLAGS -DWITH_LZO" |
|
|
1458 |
CXXFLAGS="$CXXFLAGS -DWITH_LZO" |
1430 |
fi |
1459 |
fi |
1431 |
|
1460 |
|
1432 |
# 64bit machines need -D_SQ64 |
1461 |
# 64bit machines need -D_SQ64 |
1433 |
if [ "$cpu_type" = "64" ] && [ "$enable_universal" = "0" ]; then |
1462 |
if [ "$cpu_type" = "64" ] && [ "$enable_universal" = "0" ]; then |
1434 |
CFLAGS="$CFLAGS -D_SQ64" |
1463 |
CFLAGS="$CFLAGS -D_SQ64" |
|
|
1464 |
CFLAGS="$CFLAGS -D_SQ64" |
1435 |
fi |
1465 |
fi |
1436 |
if [ "$enable_ai" != "0" ]; then |
1466 |
if [ "$enable_ai" != "0" ]; then |
1437 |
CFLAGS="$CFLAGS -I$SCRIPT_SRC_DIR -DENABLE_AI" |
1467 |
CFLAGS="$CFLAGS -I$SCRIPT_SRC_DIR -DENABLE_AI" |
|
|
1468 |
CXXFLAGS="$CXXFLAGS -I$SCRIPT_SRC_DIR -DENABLE_AI" |
1438 |
fi |
1469 |
fi |
1439 |
|
1470 |
|
1440 |
if [ -n "$png_config" ]; then |
1471 |
if [ -n "$png_config" ]; then |
1441 |
CFLAGS="$CFLAGS -DWITH_PNG" |
1472 |
CFLAGS="$CFLAGS -DWITH_PNG" |
|
|
1473 |
CXXFLAGS="$CXXFLAGS -DWITH_PNG" |
1442 |
CFLAGS="$CFLAGS `$png_config --cppflags --I_opts | tr '\n\r' ' '`" |
1474 |
CFLAGS="$CFLAGS `$png_config --cppflags --I_opts | tr '\n\r' ' '`" |
|
|
1475 |
CXXFLAGS="$CXXFLAGS `$png_config --cppflags --I_opts | tr '\n\r' ' '`" |
1443 |
|
1476 |
|
1444 |
# The extra flags are unneeded for latest libpng-config, but some versions are so broken... |
1477 |
# The extra flags are unneeded for latest libpng-config, but some versions are so broken... |
1445 |
if [ "$enable_static" != "0" ]; then |
1478 |
if [ "$enable_static" != "0" ]; then |
Lines 1455-1461
make_cflags_and_ldflags() {
Link Here
|
1455 |
|
1488 |
|
1456 |
if [ -n "$fontconfig_config" ]; then |
1489 |
if [ -n "$fontconfig_config" ]; then |
1457 |
CFLAGS="$CFLAGS -DWITH_FONTCONFIG" |
1490 |
CFLAGS="$CFLAGS -DWITH_FONTCONFIG" |
|
|
1491 |
CXXFLAGS="$CXXFLAGS -DWITH_FONTCONFIG" |
1458 |
CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" |
1492 |
CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" |
|
|
1493 |
CXXFLAGS="$CXXFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" |
1459 |
|
1494 |
|
1460 |
if [ "$enable_static" != "0" ]; then |
1495 |
if [ "$enable_static" != "0" ]; then |
1461 |
if [ "$os" = "OSX" ]; then |
1496 |
if [ "$os" = "OSX" ]; then |
Lines 1472-1478
make_cflags_and_ldflags() {
Link Here
|
1472 |
|
1507 |
|
1473 |
if [ -n "$freetype_config" ]; then |
1508 |
if [ -n "$freetype_config" ]; then |
1474 |
CFLAGS="$CFLAGS -DWITH_FREETYPE" |
1509 |
CFLAGS="$CFLAGS -DWITH_FREETYPE" |
|
|
1510 |
CXXFLAGS="$CXXFLAGS -DWITH_FREETYPE" |
1475 |
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" |
1511 |
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" |
|
|
1512 |
CXXFLAGS="$CXXFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" |
1476 |
|
1513 |
|
1477 |
if [ "$enable_static" != "0" ]; then |
1514 |
if [ "$enable_static" != "0" ]; then |
1478 |
if [ "$os" = "OSX" ]; then |
1515 |
if [ "$os" = "OSX" ]; then |
Lines 1488-1494
make_cflags_and_ldflags() {
Link Here
|
1488 |
|
1525 |
|
1489 |
if [ -n "$icu_config" ]; then |
1526 |
if [ -n "$icu_config" ]; then |
1490 |
CFLAGS="$CFLAGS -DWITH_ICU" |
1527 |
CFLAGS="$CFLAGS -DWITH_ICU" |
|
|
1528 |
CXXFLAGS="$CXXFLAGS -DWITH_ICU" |
1491 |
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`" |
1529 |
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`" |
|
|
1530 |
CXXFLAGS="$CXXFLAGS `$icu_config --cppflags | tr '\n\r' ' '`" |
1492 |
|
1531 |
|
1493 |
# Some icu-configs have the 'feature' of not adding a space where others do add the space |
1532 |
# Some icu-configs have the 'feature' of not adding a space where others do add the space |
1494 |
if [ "$static_icu" != "0" ]; then |
1533 |
if [ "$static_icu" != "0" ]; then |
Lines 1516-1555
make_cflags_and_ldflags() {
Link Here
|
1516 |
LIBS="$LIBS -ltimidity" |
1555 |
LIBS="$LIBS -ltimidity" |
1517 |
fi |
1556 |
fi |
1518 |
CFLAGS="$CFLAGS -DLIBTIMIDITY" |
1557 |
CFLAGS="$CFLAGS -DLIBTIMIDITY" |
|
|
1558 |
CXXFLAGS="$CXXFLAGS -DLIBTIMIDITY" |
1519 |
fi |
1559 |
fi |
1520 |
|
1560 |
|
1521 |
if [ "$with_iconv" != "0" ]; then |
1561 |
if [ "$with_iconv" != "0" ]; then |
1522 |
CFLAGS="$CFLAGS -DWITH_ICONV" |
1562 |
CFLAGS="$CFLAGS -DWITH_ICONV" |
|
|
1563 |
CXXFLAGS="$CXXFLAGS -DWITH_ICONV" |
1523 |
if [ "$link_to_iconv" = "yes" ]; then |
1564 |
if [ "$link_to_iconv" = "yes" ]; then |
1524 |
LIBS="$LIBS -liconv" |
1565 |
LIBS="$LIBS -liconv" |
1525 |
if [ "$with_iconv" != "2" ]; then |
1566 |
if [ "$with_iconv" != "2" ]; then |
1526 |
CFLAGS="$CFLAGS -I$with_iconv/include" |
1567 |
CFLAGS="$CFLAGS -I$with_iconv/include" |
|
|
1568 |
CXXFLAGS="$CXXFLAGS -I$with_iconv/include" |
1527 |
LIBS="$LIBS -L$with_iconv/lib" |
1569 |
LIBS="$LIBS -L$with_iconv/lib" |
1528 |
fi |
1570 |
fi |
1529 |
fi |
1571 |
fi |
1530 |
|
1572 |
|
1531 |
if [ "$have_broken_iconv" != "no" ]; then |
1573 |
if [ "$have_broken_iconv" != "no" ]; then |
1532 |
CFLAGS="$CFLAGS -DHAVE_BROKEN_ICONV" |
1574 |
CFLAGS="$CFLAGS -DHAVE_BROKEN_ICONV" |
|
|
1575 |
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_ICONV" |
1533 |
fi |
1576 |
fi |
1534 |
fi |
1577 |
fi |
1535 |
|
1578 |
|
1536 |
if [ -n "$with_midi" ]; then |
1579 |
if [ -n "$with_midi" ]; then |
1537 |
CFLAGS="$CFLAGS -DEXTERNAL_PLAYER=\\\\\"$with_midi\\\\\"" |
1580 |
CFLAGS="$CFLAGS -DEXTERNAL_PLAYER=\\\\\"$with_midi\\\\\"" |
|
|
1581 |
CXXFLAGS="$CXXFLAGS -DEXTERNAL_PLAYER=\\\\\"$with_midi\\\\\"" |
1538 |
fi |
1582 |
fi |
1539 |
if [ -n "$with_midi_arg" ]; then |
1583 |
if [ -n "$with_midi_arg" ]; then |
1540 |
CFLAGS="$CFLAGS -DMIDI_ARG=\\\\\"$with_midi_arg\\\\\"" |
1584 |
CFLAGS="$CFLAGS -DMIDI_ARG=\\\\\"$with_midi_arg\\\\\"" |
|
|
1585 |
CXXFLAGS="$CXXFLAGS -DMIDI_ARG=\\\\\"$with_midi_arg\\\\\"" |
1541 |
fi |
1586 |
fi |
1542 |
|
1587 |
|
1543 |
if [ "$enable_dedicated" != "0" ]; then |
1588 |
if [ "$enable_dedicated" != "0" ]; then |
1544 |
CFLAGS="$CFLAGS -DDEDICATED" |
1589 |
CFLAGS="$CFLAGS -DDEDICATED" |
|
|
1590 |
CXXFLAGS="$CXXFLAGS -DDEDICATED" |
1545 |
fi |
1591 |
fi |
1546 |
|
1592 |
|
1547 |
if [ "$enable_unicode" != "0" ]; then |
1593 |
if [ "$enable_unicode" != "0" ]; then |
1548 |
CFLAGS="$CFLAGS -DUNICODE -D_UNICODE" |
1594 |
CFLAGS="$CFLAGS -DUNICODE -D_UNICODE" |
|
|
1595 |
CXXFLAGS="$CXXFLAGS -DUNICODE -D_UNICODE" |
1549 |
fi |
1596 |
fi |
1550 |
|
1597 |
|
1551 |
if [ "$enable_network" != "0" ]; then |
1598 |
if [ "$enable_network" != "0" ]; then |
1552 |
CFLAGS="$CFLAGS -DENABLE_NETWORK" |
1599 |
CFLAGS="$CFLAGS -DENABLE_NETWORK" |
|
|
1600 |
CXXFLAGS="$CXXFLAGS -DENABLE_NETWORK" |
1553 |
|
1601 |
|
1554 |
if [ "$os" = "BEOS" ]; then |
1602 |
if [ "$os" = "BEOS" ]; then |
1555 |
LDFLAGS="$LDFLAGS -lbind -lsocket" |
1603 |
LDFLAGS="$LDFLAGS -lbind -lsocket" |
Lines 1573-1597
make_cflags_and_ldflags() {
Link Here
|
1573 |
|
1621 |
|
1574 |
if [ "$enable_assert" = "0" ]; then |
1622 |
if [ "$enable_assert" = "0" ]; then |
1575 |
CFLAGS="$CFLAGS -DNDEBUG" |
1623 |
CFLAGS="$CFLAGS -DNDEBUG" |
|
|
1624 |
CXXFLAGS="$CXXFLAGS -DNDEBUG" |
1576 |
fi |
1625 |
fi |
1577 |
|
1626 |
|
1578 |
if [ "$enable_desync_debug" != "0" ]; then |
1627 |
if [ "$enable_desync_debug" != "0" ]; then |
1579 |
CFLAGS="$CFLAGS -DRANDOM_DEBUG" |
1628 |
CFLAGS="$CFLAGS -DRANDOM_DEBUG" |
|
|
1629 |
CXXFLAGS="$CXXFLAGS -DRANDOM_DEBUG" |
1580 |
fi |
1630 |
fi |
1581 |
|
1631 |
|
1582 |
if [ "$enable_osx_g5" != "0" ]; then |
1632 |
if [ "$enable_osx_g5" != "0" ]; then |
1583 |
CFLAGS="$CFLAGS -mcpu=G5 -mpowerpc64 -mtune=970 -mcpu=970 -mpowerpc-gpopt" |
1633 |
CFLAGS="$CFLAGS -mcpu=G5 -mpowerpc64 -mtune=970 -mcpu=970 -mpowerpc-gpopt" |
|
|
1634 |
CXXFLAGS="$CXXFLAGS -mcpu=G5 -mpowerpc64 -mtune=970 -mcpu=970 -mpowerpc-gpopt" |
1584 |
fi |
1635 |
fi |
1585 |
|
1636 |
|
1586 |
if [ -n "$personal_dir" ]; then |
1637 |
if [ -n "$personal_dir" ]; then |
1587 |
CFLAGS="$CFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\"" |
1638 |
CFLAGS="$CFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\"" |
|
|
1639 |
CXXFLAGS="$CXXFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\"" |
1588 |
fi |
1640 |
fi |
1589 |
|
1641 |
|
1590 |
if [ -n "$shared_dir" ]; then |
1642 |
if [ -n "$shared_dir" ]; then |
1591 |
CFLAGS="$CFLAGS -DWITH_SHARED_DIR -DSHARED_DIR=\\\\\"$shared_dir\\\\\"" |
1643 |
CFLAGS="$CFLAGS -DWITH_SHARED_DIR -DSHARED_DIR=\\\\\"$shared_dir\\\\\"" |
|
|
1644 |
CXXFLAGS="$CXXFLAGS -DWITH_SHARED_DIR -DSHARED_DIR=\\\\\"$shared_dir\\\\\"" |
1592 |
fi |
1645 |
fi |
1593 |
|
1646 |
|
1594 |
CFLAGS="$CFLAGS -DGLOBAL_DATA_DIR=\\\\\"$prefix_dir/$data_dir\\\\\"" |
1647 |
CFLAGS="$CFLAGS -DGLOBAL_DATA_DIR=\\\\\"$prefix_dir/$data_dir\\\\\"" |
|
|
1648 |
CXXFLAGS="$CXXFLAGS -DGLOBAL_DATA_DIR=\\\\\"$prefix_dir/$data_dir\\\\\"" |
1595 |
|
1649 |
|
1596 |
log 1 "using CFLAGS... $CFLAGS" |
1650 |
log 1 "using CFLAGS... $CFLAGS" |
1597 |
log 1 "using CXXFLAGS... $CXXFLAGS" |
1651 |
log 1 "using CXXFLAGS... $CXXFLAGS" |