summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-17 18:01:05 +0000
committerrubidium <rubidium@openttd.org>2009-11-17 18:01:05 +0000
commitc6e13c6c0a42dbfaddafb6c498b346ee4e8d887c (patch)
treef32803ab4235eb246f58d8ec145fc1db7fbdc432
parent00f0dfd00d91ae5a2e5b5b7ff5d10a3c9e9424d9 (diff)
downloadopenttd-c6e13c6c0a42dbfaddafb6c498b346ee4e8d887c.tar.xz
(svn r18147) -Add: experimental option to try to statically link to libicu
-rw-r--r--config.lib14
1 files changed, 13 insertions, 1 deletions
diff --git a/config.lib b/config.lib
index ddab1fbd7..3e06ff731 100644
--- a/config.lib
+++ b/config.lib
@@ -78,6 +78,7 @@ set_default() {
with_freetype="1"
with_fontconfig="1"
with_icu="1"
+ static_icu="0"
with_psp_config="1"
with_threads="1"
with_distcc="1"
@@ -145,6 +146,7 @@ set_default() {
with_freetype
with_fontconfig
with_icu
+ static_icu
with_psp_config
with_threads
with_distcc
@@ -342,6 +344,10 @@ detect_params() {
--with-libicu) with_icu="2";;
--without-libicu) with_icu="0";;
--with-libicu=*) with_icu="$optarg";;
+ --static-icu) static_icu="1";;
+ --static-icu=*) static_icu="$optarg";;
+ --static-libicu) static_icu="1";;
+ --static-libicu=*) static_icu="$optarg";;
--with-psp-config) with_psp_config="2";;
--without-psp-config) with_psp_config="0";;
@@ -1400,7 +1406,11 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`"
# Some icu-configs have the 'feature' of not adding a space where others do add the space
- LIBS="$LIBS `$icu_config --ldflags-searchpath` `$icu_config --ldflags-libsonly | tr '\n\r' ' '`"
+ if [ "$static_icu" != "0" ]; then
+ LIBS="$LIBS `$icu_config --ldflags-searchpath` `$icu_config --ldflags-libsonly | tr '\n\r' ' ' | sed s/licu/lsicu/g`"
+ else
+ LIBS="$LIBS `$icu_config --ldflags-searchpath` `$icu_config --ldflags-libsonly | tr '\n\r' ' '`"
+ fi
fi
@@ -3063,6 +3073,8 @@ showhelp() {
echo " --with-fontconfig[=pkg-config fontconfig]"
echo " enables fontconfig support"
echo " --with-icu[=icu-config] enables icu (used for right-to-left support)"
+ echo " --static-icu try to link statically (libsicu instead of"
+ echo " libicu; can fail as the new name is guessed)"
echo " --with-iconv[=iconv-path] enables iconv support"
echo " --with-psp-config[=psp-config] enables psp-config support (PSP ONLY)"
echo " --disable-builtin-depend disable use of builtin deps finder"