Changeset - r6078:e832dc280d5a
[Not reviewed]
master
0 1 0
truelight - 18 years ago 2007-02-19 16:24:10
truelight@openttd.org
(svn r8811) [Configure] -Fix: [:lower:] for tr is GNU specific. Use [a-z] instead. (Celestar)
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -282,14 +282,14 @@ save_params() {
 
}
 

	
 
check_params() {
 
	# Some params want to be in full uppercase, else they might not work as
 
	# expected.. fix that here
 

	
 
	endian=`echo $endian | tr [:lower:] [:upper:]`
 
	os=`echo $os | tr [:lower:] [:upper:]`
 
	endian=`echo $endian | tr '[a-z]' '[A-Z]'`
 
	os=`echo $os | tr '[a-z]' '[A-Z]'`
 

	
 
	# Check if all params have valid values
 

	
 
	# Endian only allows AUTO, LE and, BE
 
	if ! echo $endian | grep -Eq "^(AUTO|LE|BE)$"; then
 
		echo "configure: error: invalid option --endian=$endian"
 
@@ -545,13 +545,13 @@ check_params() {
 
		# Test on G5
 

	
 
		if [ "$enable_osx_g5" != "0" ]; then
 
			log 1 "detecting G5... yes (forced)"
 
		else
 
			# First, are we a real OSX system, else we can't detect it
 
			native=`LC_ALL=C uname | tr [:upper:] [:lower:] | grep darwin`
 
			native=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | grep darwin`
 
			# If $host doesn't match $build , we are cross-compiling
 
			if [ -n "$native" ] && [ "$build" != "$host" ]; then
 
				$cc_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector
 
				res=`./G5_detector`
 
				rm -f G5_detector
 
				if [ -n "$res" ]; then
 
@@ -1141,13 +1141,13 @@ check_makedepend() {
 

	
 
detect_os() {
 
	if [ "$os" = "DETECT" ]; then
 
		# Detect UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, WINCE, and PSP
 

	
 
		# Try first via dumpmachine, then via uname
 
		os=`echo "$host" | tr [:upper:] [:lower:] | awk '
 
		os=`echo "$host" | tr '[A-Z]' '[a-z]' | awk '
 
					/linux/        { print "UNIX";    exit}
 
					/darwin/       { print "OSX";     exit}
 
					/freebsd/      { print "FREEBSD"; exit}
 
					/morphos/      { print "MORPHOS"; exit}
 
					/beos/         { print "BEOS";    exit}
 
					/sunos/        { print "SUNOS";   exit}
 
@@ -1156,13 +1156,13 @@ detect_os() {
 
					/os2/          { print "OS2";     exit}
 
					/wince/        { print "WINCE";   exit}
 
					/psp/          { print "PSP";     exit}
 
		'`
 

	
 
		if [ -z "$os" ]; then
 
			os=`LC_ALL=C uname | tr [:upper:] [:lower:] | awk '
 
			os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | awk '
 
					/linux/        { print "UNIX";    exit}
 
					/darwin/       { print "OSX";     exit}
 
					/freebsd/      { print "FREEBSD"; exit}
 
					/morphos/      { print "MORPHOS"; exit}
 
					/beos/         { print "BEOS";    exit}
 
					/sunos/        { print "SUNOS";   exit}
0 comments (0 inline, 0 general)