Merge branch 'save_ext' into jgrpp

# Conflicts:
#	config.lib
#	src/misc_gui.cpp
#	src/network/network_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/smallmap_gui.h
#	src/station_cmd.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
This commit is contained in:
Jonathan G Rennison
2019-01-14 00:01:44 +00:00
147 changed files with 1026 additions and 330 deletions

View File

@@ -1268,6 +1268,8 @@ make_compiler_cflags() {
eval eval "ldflags=\\\$$4"
eval eval "features=\\\$$5"
cppstd="-std=c++11"
if [ `echo "$version_line" | cut -d' ' -f1` = "icc" ]; then
# Enable some things only for certain ICC versions
cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g`
@@ -1361,7 +1363,7 @@ make_compiler_cflags() {
elif echo "$version_line" | grep -q "clang"; then
# Enable some things only for certain clang versions
# Need to try really hard to get the version line, because OSX clang likes to hide its true version
cc_version="`$1 -v 2>&1 | grep -i version | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`"
cc_version="`$1 -v 2>&1 | grep -i version | head -n 1 | sed s@[^0-9.]@@g | $awk -F . '{printf "%d%02d\n", $1, $2}'`"
# aliasing rules are not held in openttd code
flags="$flags -fno-strict-aliasing"
@@ -1383,14 +1385,14 @@ make_compiler_cflags() {
# it happens when using the FOR_ALL_WINDOWS_FROM_BACK_FROM macro
flags="$flags -Wno-self-assign"
if [ "$cc_version" -lt "30" ]; then
if [ "$cc_version" -lt "300" ]; then
# warning: equality comparison with extraneous parentheses
flags="$flags -Wno-parentheses"
# warning: operands of ? are integers of different signs: 'unsigned int' and 'int'
flags="$flags -Wno-sign-compare"
fi
if [ "$cc_version" -ge "30" ]; then
if [ "$cc_version" -ge "300" ]; then
# warning: equality comparison with extraneous parentheses
# this warning could be useful, but it warns about code in squirrel
flags="$flags -Wno-parentheses-equality"
@@ -1409,11 +1411,11 @@ make_compiler_cflags() {
flags="$flags -Wno-unused-variable"
fi
if [ "$cc_version" -ge "33" ]; then
if [ "$cc_version" -ge "303" ]; then
# clang completed C++11 support in version 3.3
flags="$flags -DCUSTOM_ALLOCATOR"
else
log 1 "configure: error: clang version is too old: `$1 -v 2>&1 | head -n 1`, minumum: 3.3"
log 1 "configure: error: clang version is too old: `$1 -v 2>&1 | grep -i version | head -n 1`, minumum: 3.3"
exit 1
fi
@@ -1436,6 +1438,7 @@ make_compiler_cflags() {
flags="$flags -Wwrite-strings -Wpointer-arith"
flags="$flags -W -Wno-unused-parameter -Wredundant-decls"
flags="$flags -Wformat=2 -Wformat-security"
cppstd="-std=gnu++11"
if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts
@@ -1531,7 +1534,7 @@ make_compiler_cflags() {
fi
eval "$2=\"$flags\""
eval "$3=\"$cxxflags\""
eval "$3=\"$cxxflags $cppstd\""
eval "$4=\"$ldflags\""
eval "$5=\"$features\""
}
@@ -1595,8 +1598,6 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -D$os"
CFLAGS_BUILD="$CFLAGS_BUILD -D$os"
CXXFLAGS="$CXXFLAGS -std=c++11"
CXXFLAGS_BUILD="$CXXFLAGS_BUILD -std=c++11"
if [ "$enable_static" != "0" ]; then
STATIC_FLAGS="--static"