Changeset - r10264:4c22b2d5d773
[Not reviewed]
master
0 1 0
truebrain - 16 years ago 2008-10-19 20:53:13
truebrain@openttd.org
(svn r14495) -Change: don't use freetype, fontconfig and icu in case of building a dedicated server, unless explicit requested
1 file changed with 21 insertions and 3 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -554,25 +554,25 @@ check_params() {
 
		log 1 "using desync debug level... level $enable_desync_debug"
 
		log 1 "WARNING: desync debug functions slow down the game considerably."
 
		log 1 "WARNING: use only when you are instructed to do so"
 
		log 1 "         or when you know what you are doing."
 

	
 
		sleep 5
 
	fi
 

	
 
	detect_sdl
 
	detect_cocoa
 

	
 
	if [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking GDI video driver... skipping"
 
		log 1 "checking GDI video driver... dedicated server, skipping"
 
		log 1 "checking dedicated... found"
 

	
 
		if [ "$enable_network" = "0" ]; then
 
			log 1 "WARNING: compiling a dedicated server without network is pointless"
 
			sleep 5
 
		fi
 
	else
 
		if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
 
			log 1 "checking GDI video driver... found"
 
		else
 
			log 1 "checking GDI video driver... not Windows, skipping"
 
		fi
 
@@ -1741,25 +1741,25 @@ detect_sdl() {
 
		log 1 "configure: error: it is impossible to compile both SDL and COCOA"
 
		log 1 "configure: error: please deselect one of them and try again"
 
		exit 1
 
	fi
 

	
 
	if [ "$with_sdl" = "2" ] && [ "$enable_dedicated" != "0" ]; then
 
		log 1 "configure: error: it is impossible to compile a dedicated with SDL"
 
		log 1 "configure: error: please deselect one of them and try again"
 
		exit 1
 
	fi
 

	
 
	if [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking SDL... skipping"
 
		log 1 "checking SDL... dedicated server, skipping"
 

	
 
		sdl_config=""
 
		return 0
 
	fi
 

	
 
	# By default on OSX we don't use SDL. The rest is auto-detect
 
	if [ "$with_sdl" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then
 
		log 1 "checking SDL... OSX, skipping"
 

	
 
		sdl_config=""
 
		return 0
 
	fi
 
@@ -1799,25 +1799,25 @@ detect_cocoa() {
 
		log 1 "checking COCOA... disabled"
 

	
 
		return 0
 
	fi
 

	
 
	if [ "$with_cocoa" = "2" ] && [ "$enable_dedicated" != "0" ]; then
 
		log 1 "configure: error: it is impossible to compile a dedicated with COCOA"
 
		log 1 "configure: error: please deselect one of them and try again"
 
		exit 1
 
	fi
 

	
 
	if [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking COCOA... skipping"
 
		log 1 "checking COCOA... dedicated server, skipping"
 

	
 
		with_cocoa="0"
 
		return 0
 
	fi
 

	
 
	# By default on OSX we use COCOA. The rest doesn't support it
 
	if [ "$with_cocoa" = "1" ] && [ "$os" != "OSX" ]; then
 
		log 1 "checking COCOA... not OSX, skipping"
 

	
 
		with_cocoa="0"
 
		return 0
 
	fi
 
@@ -1984,24 +1984,30 @@ detect_png() {
 

	
 
	log 1 "checking libpng... found"
 
}
 

	
 
detect_freetype() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_freetype" = "0" ]; then
 
		log 1 "checking libfreetype... disabled"
 

	
 
		freetype_config=""
 
		return 0
 
	fi
 
	if [ "$with_freetype" = "1" ] && [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking libfreetype... dedicated server, skipping"
 

	
 
		freetype_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$with_zlib" = "0" ] || [ "$zlib" = "" ]; then
 
		log 1 "configure: error: libfreetype depends on zlib, which couldn't be found / was disabled"
 
		log 1 "configure: error: please supply --with-zlib, with a valid zlib location"
 
		exit 1
 
	fi
 

	
 
	if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
 
		freetype_config="freetype-config"
 
	else
 
		freetype_config="$with_freetype"
 
	fi
 
@@ -2028,24 +2034,30 @@ detect_freetype() {
 

	
 
	log 1 "checking libfreetype... found"
 
}
 

	
 
detect_fontconfig() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_fontconfig" = "0" ]; then
 
		log 1 "checking libfontconfig... disabled"
 

	
 
		fontconfig_config=""
 
		return 0
 
	fi
 
	if [ "$with_fontconfig" = "1" ] && [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking libfontconfig... dedicated server, skipping"
 

	
 
		fontconfig_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
 
		log 1 "checking libfontconfig... WIN32, skipping"
 
		fontconfig_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$with_fontconfig" = "1" ] || [ "$with_fontconfig" = "" ] || [ "$with_fontconfig" = "2" ]; then
 
		fontconfig_config="pkg-config fontconfig"
 
	else
 
		fontconfig_config="$with_fontconfig"
 
	fi
 
@@ -2077,24 +2089,30 @@ detect_fontconfig() {
 

	
 
	log 1 "checking libfontconfig... found"
 
}
 

	
 
detect_icu() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_icu" = "0" ]; then
 
		log 1 "checking libicu... disabled"
 

	
 
		icu_config=""
 
		return 0
 
	fi
 
	if [ "$with_icu" = "1" ] && [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking libicu... dedicated server, skipping"
 

	
 
		icu_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$with_icu" = "1" ] || [ "$with_icu" = "" ] || [ "$with_icu" = "2" ]; then
 
		icu_config="icu-config"
 
	else
 
		icu_config="$with_icu"
 
	fi
 

	
 
	version=`$icu_config --version 2>/dev/null`
 
	ret=$?
 
	shortversion=`echo $version | cut -c 1,3`
 
	log 2 "executing $icu_config --version"
 
	log 2 "  returned $version"
0 comments (0 inline, 0 general)