Changeset - r5961:6b5d60f04360
[Not reviewed]
master
0 1 0
truelight - 18 years ago 2007-02-08 12:54:23
truelight@openttd.org
(svn r8633) [PSP] -Fix r8629: mixed psp-config and pspconfig, making ./configure --reconfig to fail
1 file changed with 11 insertions and 11 deletions:
config.lib
11
11
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -51,15 +51,15 @@ set_default() {
 
	with_sort="1"
 
	with_iconv="1"
 
	with_midi=""
 
	with_midi_arg=""
 
	with_freetype="1"
 
	with_fontconfig="1"
 
	with_pspconfig="1"
 
	with_psp_config="1"
 

	
 
	save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip lipo os revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir custom_lang_dir second_data_dir enable_install enable_debug enable_profiling enable_dedicated enable_network enable_static enable_translator enable_assert enable_strip with_osx_sysroot enable_universal enable_osx_g5 with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_freetype with_fontconfig with_pspconfig CC CXX CFLAGS LDFLAGS"
 
	save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip lipo os revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir custom_lang_dir second_data_dir enable_install enable_debug enable_profiling enable_dedicated enable_network enable_static enable_translator enable_assert enable_strip with_osx_sysroot enable_universal enable_osx_g5 with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_freetype with_fontconfig with_psp_config CC CXX CFLAGS LDFLAGS"
 
}
 

	
 
detect_params() {
 
	# Walk over all params from the user and override any default settings if
 
	#  needed. This also handles any invalid option.
 
	for p in "$@"; do
 
@@ -195,15 +195,15 @@ detect_params() {
 
			--without-fontconfig)         with_fontconfig="0";;
 
			--with-fontconfig=*)          with_fontconfig="$optarg";;
 
			--with-libfontconfig)         with_fontconfig="2";;
 
			--without-libfontconfig)      with_fontconfig="0";;
 
			--with-libfontconfig=*)       with_fontconfig="$optarg";;
 

	
 
			--with-psp-config)            with_pspconfig="2";;
 
			--without-psp-config)         with_pspconfig="0";;
 
			--with-psp-config=*)          with_pspconfig="$optarg";;
 
			--with-psp-config)            with_psp_config="2";;
 
			--without-psp-config)         with_psp_config="0";;
 
			--with-psp-config=*)          with_psp_config="$optarg";;
 

	
 
			--with-makedepend)            with_makedepend="2";;
 
			--without-makedepend)         with_makedepend="0";;
 
			--with-makedepend=*)          with_makedepend="$optarg";;
 

	
 
			--with-direct-music)          with_direct_music="2";;
 
@@ -1463,20 +1463,20 @@ detect_fontconfig() {
 

	
 
	log 1 "checking libfontconfig... found"
 
}
 

	
 
detect_pspconfig() {
 
	# 0 means no, 1 is auto-detect, 2 is force
 
	if [ "$with_pspconfig" = "0" ]; then
 
	if [ "$with_psp_config" = "0" ]; then
 
		log 1 "checking psp-config... disabled"
 

	
 
		psp_config=""
 
		return 0
 
	fi
 

	
 
	if [ "$with_pspconfig" = "1" ] && [ "$os" != "PSP" ]; then
 
	if [ "$with_psp_config" = "1" ] && [ "$os" != "PSP" ]; then
 
		log 1 "checking psp-config... not PSP, skipping"
 

	
 
		psp_config="";
 
		return 0
 
	fi
 

	
 
@@ -1484,16 +1484,16 @@ detect_pspconfig() {
 
		log 1 "checking psp-config... not PSP"
 

	
 
		log 1 "configure: error: psp-config is only supported for PSP"
 
		exit 1
 
	fi
 

	
 
	if [ "$with_pspconfig" = "1" ] || [ "$with_pspconfig" = "" ] || [ "$with_pspconfig" = "2" ]; then
 
	if [ "$with_psp_config" = "1" ] || [ "$with_psp_config" = "" ] || [ "$with_psp_config" = "2" ]; then
 
		psp_config="psp-config"
 
	else
 
		psp_config="$with_pspconfig"
 
		psp_config="$with_psp_config"
 
	fi
 

	
 
	version=`$psp_config -p 2>/dev/null`
 
	ret=$?
 
	log 2 "executing $psp_config -p"
 
	log 2 "  returned $version"
 
@@ -1501,14 +1501,14 @@ detect_pspconfig() {
 

	
 
	if [ -z "$version" ] || [ "$ret" != "0" ]; then
 
		log 1 "checking psp-config... not found"
 
		log 1 "configure: error: psp-config couldn't be found"
 

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

	
 
	log 1 "checking psp-config... found"
 
}
0 comments (0 inline, 0 general)