#!/bin/sh
export CC=gcc-4.2
export LD=ld
export NEXT_ROOT=/Developer/SDKs/MacOSX10.5.sdk
export MACOSX_DEPLOYMENT_TARGET=10.5
rm -rf tclbug-build
mkdir tclbug-build
cd tclbug-build
../tcl8.5.9/macosx/configure \
		--host=i386-apple-darwin \
		--disable-load \
		CFLAGS="-arch i386 -D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1050 -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
		LDFLAGS="-arch i386 -D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1050 -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
		&& make
