summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-02-10 16:24:05 +0000
committerrubidium <rubidium@openttd.org>2010-02-10 16:24:05 +0000
commit21bd2722cd89995370523385c213da32c8d47100 (patch)
treee7f3bb43657b1f8a59f89899dfc582d480bedad0 /config.lib
parent78ce2858fc2704a5aafbc0b76cdb636338122f63 (diff)
downloadopenttd-21bd2722cd89995370523385c213da32c8d47100.tar.xz
(svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib26
1 files changed, 16 insertions, 10 deletions
diff --git a/config.lib b/config.lib
index 348d4bae9..86ac07d97 100644
--- a/config.lib
+++ b/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"