changeset 13623:40c0b558930f draft

(svn r18147) -Add: experimental option to try to statically link to libicu
author rubidium <rubidium@openttd.org>
date Tue, 17 Nov 2009 18:01:05 +0000
parents ce894b771417
children c155f501b3a0
files config.lib
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/config.lib
+++ b/config.lib
@@ -78,6 +78,7 @@
 	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 @@
 		with_freetype
 		with_fontconfig
 		with_icu
+		static_icu
 		with_psp_config
 		with_threads
 		with_distcc
@@ -342,6 +344,10 @@
 			--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 @@
 		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 @@
 	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"