(svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel
This commit is contained in:
26
config.lib
26
config.lib
@@ -51,6 +51,7 @@ set_default() {
|
||||
enable_lto="0"
|
||||
enable_dedicated="0"
|
||||
enable_network="1"
|
||||
enable_ai="1"
|
||||
enable_static="1"
|
||||
enable_translator="0"
|
||||
enable_unicode="1"
|
||||
@@ -122,6 +123,7 @@ set_default() {
|
||||
enable_lto
|
||||
enable_dedicated
|
||||
enable_network
|
||||
enable_ai
|
||||
enable_static
|
||||
enable_translator
|
||||
enable_unicode
|
||||
@@ -277,6 +279,9 @@ detect_params() {
|
||||
--enable-network) enable_network="2";;
|
||||
--enable-network=*) enable_network="$optarg";;
|
||||
--disable-network) enable_network="0";;
|
||||
--enable-ai) enable_ai="2";;
|
||||
--enable-ai=*) enable_ai="$optarg";;
|
||||
--disable-ai) enable_ai="0";;
|
||||
--disable-static) enable_static="0";;
|
||||
--enable-static) enable_static="2";;
|
||||
--enable-static=*) enable_static="$optarg";;
|
||||
@@ -713,6 +718,14 @@ check_params() {
|
||||
log 1 "checking network... disabled"
|
||||
fi
|
||||
|
||||
if [ "$enable_ai" != "0" ]; then
|
||||
log 1 "checking ai... found"
|
||||
SCRIPT_SRC_DIR="$ROOT_DIR/src/3rdparty/squirrel/include"
|
||||
else
|
||||
log 1 "checking ai... disabled"
|
||||
SCRIPT_SRC_DIR=""
|
||||
fi
|
||||
|
||||
if [ "$enable_translator" != "0" ]; then
|
||||
log 1 "checking translator... debug"
|
||||
# -t shows TODO items, normally they are muted
|
||||
@@ -728,15 +741,6 @@ check_params() {
|
||||
log 1 "checking assert... disabled"
|
||||
fi
|
||||
|
||||
SCRIPT_SRC_DIR="$ROOT_DIR/src/3rdparty/squirrel/include"
|
||||
if [ ! -d "$SCRIPT_SRC_DIR" ]; then
|
||||
log 1 "checking 3rdparty... NOT FOUND"
|
||||
log 1 "ERROR: please make sure you have src/3rdparty/squirrel"
|
||||
log 1 "ERROR: you can find the source at svn://svn.openttd.org/3rdparty/squirrel"
|
||||
exit 1
|
||||
fi
|
||||
log 1 "checking 3rdparty... found"
|
||||
|
||||
pre_detect_with_zlib=$with_zlib
|
||||
detect_zlib
|
||||
|
||||
@@ -1429,7 +1433,9 @@ make_cflags_and_ldflags() {
|
||||
if [ "$cpu_type" = "64" ] && [ "$enable_universal" = "0" ]; then
|
||||
CFLAGS="$CFLAGS -D_SQ64"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -I$SCRIPT_SRC_DIR"
|
||||
if [ "$enable_ai" != "0" ]; then
|
||||
CFLAGS="$CFLAGS -I$SCRIPT_SRC_DIR -DENABLE_AI"
|
||||
fi
|
||||
|
||||
if [ -n "$png_config" ]; then
|
||||
CFLAGS="$CFLAGS -DWITH_PNG"
|
||||
|
||||
Reference in New Issue
Block a user