Changeset - r22191:e023a0efbfde
[Not reviewed]
master
0 1 0
rubidium - 9 years ago 2015-08-09 12:41:12
rubidium@openttd.org
(svn r27371) -Codechange: make freetype detection and configuration use pkg-config
1 file changed with 2 insertions and 42 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -2793,53 +2793,13 @@ detect_xdg_basedir() {
 

	
 
detect_png() {
 
	detect_pkg_config "$with_png" "libpng" "png_config" "1.2"
 
}
 

	
 
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_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
 
		freetype_config="freetype-config"
 
	else
 
		freetype_config="$with_freetype"
 
	fi
 

	
 
	version=`$freetype_config --version 2>/dev/null`
 
	ret=$?
 
	log 2 "executing freetype_config --version"
 
	log 2 "  returned $version"
 
	log 2 "  exit code $ret"
 

	
 
	if [ -z "$version" ] || [ "$ret" != "0" ]; then
 
		log 1 "checking libfreetype... not found"
 

	
 
		# It was forced, so it should be found.
 
		if [ "$with_freetype" != "1" ]; then
 
			log 1 "configure: error: freetype-config couldn't be found"
 
			log 1 "configure: error: you supplied '$with_freetype', but it seems invalid"
 
			exit 1
 
		fi
 

	
 
		freetype_config=""
 
		return 0
 
	fi
 

	
 
	log 1 "checking libfreetype... found"
 
	detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1"
 
}
 

	
 
detect_fontconfig() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_fontconfig" = "0" ]; then
 
		log 1 "checking libfontconfig... disabled"
 
@@ -3631,13 +3591,13 @@ showhelp() {
 
	echo "  --with-sdl[=sdl-config]        enables SDL video driver support"
 
	echo "  --with-zlib[=zlib.a]           enables zlib support"
 
	echo "  --with-liblzma[=\"pkg-config liblzma\"]"
 
	echo "                                 enables liblzma support"
 
	echo "  --with-liblzo2[=liblzo2.a]     enables liblzo2 support"
 
	echo "  --with-png[=libpng-config]     enables libpng support"
 
	echo "  --with-freetype[=freetype-config]"
 
	echo "  --with-freetype[=\"pkg-config freetype2\"]"
 
	echo "                                 enables libfreetype support"
 
	echo "  --with-fontconfig[=\"pkg-config fontconfig\"]"
 
	echo "                                 enables fontconfig support"
 
	echo "  --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]"
 
	echo "                                 enables XDG base directory support"
 
	echo "  --with-icu[=icu-config]        enables icu (used for right-to-left support)"
0 comments (0 inline, 0 general)