Changeset - r24103:705428521756
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 5 years ago 2019-10-13 09:19:38
j.g.rennison@gmail.com
Codechange: Don't fail configure if SDL2 is not detected
1 file changed with 12 insertions and 4 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -2402,31 +2402,33 @@ detect_allegro() {
 
detect_sdl() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_sdl" = "0" ]; then
 
		log 1 "checking SDL... disabled"
 

	
 
		sdl_config=""
 
		sdl2_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$with_sdl" = "2" ] && [ "$with_cocoa" = "2" ]; then
 
	if [ "$with_sdl" != "1" ] && [ "$with_cocoa" = "2" ]; then
 
		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
 
	if [ "$with_sdl" != "1" ] && [ "$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... dedicated server, skipping"
 

	
 
		sdl_config=""
 
		sdl2_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"
 
@@ -2440,16 +2442,22 @@ detect_sdl() {
 
		log 1 "WARNING: with some hardware configurations. Use at own risk!"
 
		sleep 5
 
	fi
 

	
 
	if [ $with_sdl = "sdl1" ]; then
 
		detect_pkg_config "2" "sdl" "sdl_config" "1.2"
 
	elif [ $with_sdl = "sdl2" ] || [ -x `which sdl2-config` ]; then
 
	elif [ $with_sdl = "sdl2" ]; then
 
		detect_pkg_config "2" "sdl2" "sdl2_config" "2.0"
 
	else
 
		detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
 
		sdl2_config=""
 
		if [ -x `which sdl2-config` ]; then
 
			detect_pkg_config "$with_sdl" "sdl2" "sdl2_config" "2.0"
 
		fi
 
		if [ -z "$sdl2_config" ]; then
 
			detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
 
		fi
 
	fi
 
}
 

	
 
detect_osx_sdk() {
 
	# Try to find the best SDK available. For a normal build this
 
	# is currently the 10.5 SDK as this is needed to compile all
0 comments (0 inline, 0 general)