Diff

Differences From Artifact [99f31c134b]:

To Artifact [a0fc7f495f]:


   197    197   			(
   198    198   				. "${patchscript}"
   199    199   			)
   200    200   		fi
   201    201   	done
   202    202   
   203    203   	tryfirstdir=''
   204         -	if [ "$(uname -s)" = "Darwin" ]; then
   205         -		tryfirstdir='macosx'
   206         -	fi
   207         -
          204  +	case "${KC_CROSSCOMPILE_HOST_OS}" in
          205  +		*-*-darwin*)
          206  +			# Cross-compiling for Mac OS X -- try to build macosx directory first
          207  +			tryfirstdir='macosx'
          208  +			;;
          209  +		*-*-*)
          210  +			# Cross-compiling, do not assume based on build platform
          211  +			;;
          212  +		'')
          213  +			# Not cross-compiling, assume based on build platform
          214  +			if [ "$(uname -s)" = "Darwin" ]; then
          215  +				# Compiling for Mac OS X, build in that directory first
          216  +				tryfirstdir='macosx'
          217  +			fi
          218  +			;;
          219  +	esac
          220  +		
   208    221   	for dir in "${tryfirstdir}" unix win macosx __fail__; do
   209    222   		if [ -z "${dir}" ]; then
   210    223   			continue
   211    224   		fi
   212    225   
   213    226   		if [ "${dir}" = "__fail__" ]; then
   214    227   			# If we haven't figured out how to build it, reject.
................................................................................
   215    228   
   216    229   			exit 1
   217    230   		fi
   218    231   
   219    232   		# Remove previous directory's "tclConfig.sh" if found
   220    233   		rm -f 'tclConfig.sh'
   221    234   
          235  +		echo "Working in: $dir"
   222    236   		cd "${BUILDDIR}/${dir}" || exit 1
   223    237   
   224    238   		# Remove broken pre-generated Makfiles
   225    239   		rm -f GNUmakefile Makefile makefile
   226    240   
   227    241   		echo "Running: ./configure --disable-shared --with-encoding=utf-8 --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" ${CONFIGUREEXTRA}"
   228    242   		./configure --disable-shared --with-encoding=utf-8 --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" ${CONFIGUREEXTRA}