Changeset - r22190:6ce9bfa88b8c
[Not reviewed]
master
0 1 0
rubidium - 9 years ago 2015-08-09 12:40:17
rubidium@openttd.org
(svn r27370) -Codechange: move the "dedicated server" check into the pkg-config check routine
1 file changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -2725,21 +2725,29 @@ detect_libtimidity() {
 

	
 
detect_pkg_config() {
 
	# $1 - config-param ($with_lzma value)
 
	# $2 - package name ('liblzma')
 
	# $3 - config name ('lzma_config', sets $lzma_config)
 
	# $4 - minimum module version ('2.3')
 
	# $5 - check for dedicated, 1 is "skif if dedicated"
 

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

	
 
		eval "$3=\"\""
 
		return 0
 
	fi
 

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

	
 
		eval "$3=\"\""
 
		return 0
 
	fi
 

	
 
	log 2 "detecting $2"
 

	
 
	if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
 
		pkg_config_call="$pkg_config $2"
 
	else
 
		pkg_config_call="$1"
 
@@ -2836,31 +2844,25 @@ detect_fontconfig() {
 
	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 [ "$os" = "OSX" ]; then
 
		log 1 "checking libfontconfig... OSX, skipping"
 
		fontconfig_config=""
 
		return 0
 
	fi
 

	
 
	detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3"
 
	detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" "1"
 
}
 

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