Changeset - r22192:a15abb8f0295
[Not reviewed]
master
0 1 0
rubidium - 9 years ago 2015-08-09 12:41:35
rubidium@openttd.org
(svn r27372) -Codechange: make allegro detection and configuration use pkg-config
1 file changed with 3 insertions and 29 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -2350,47 +2350,21 @@ detect_allegro() {
 
		log 1 "checking Allegro... dedicated server, skipping"
 

	
 
		allegro_config=""
 
		return 0
 
	fi
 

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

	
 
		allegro_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$with_allegro" = "1" ] || [ "$with_allegro" = "" ] || [ "$with_allegro" = "2" ]; then
 
		allegro_config="allegro-config"
 
	else
 
		allegro_config="$with_allegro"
 
	fi
 

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

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

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

	
 
		allegro_config=""
 
		return 0
 
	fi
 

	
 
	log 1 "checking Allegro... found"
 
	detect_pkg_config "$with_allegro" "allegro" "allegro_config" "4.4"
 
}
 

	
 

	
 
detect_sdl() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_sdl" = "0" ]; then
 
@@ -3582,13 +3556,13 @@ showhelp() {
 
	echo "  --with-direct-music            enable direct music support (Win32 ONLY)"
 
	echo "  --with-sort=sort               define a non-default location for sort"
 
	echo "  --with-midi=midi               define which midi-player to use"
 
	echo "  --with-midi-arg=arg            define which args to use for the"
 
	echo "                                 midi-player"
 
	echo "  --with-libtimidity             enables libtimidity support"
 
	echo "  --with-allegro[=allegro-config]"
 
	echo "  --with-allegro[=\"pkg-config allegro\"]"
 
	echo "                                 enables Allegro video driver support"
 
	echo "  --with-cocoa                   enables COCOA video driver (OSX ONLY)"
 
	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"
0 comments (0 inline, 0 general)