#!/bin/sh

export DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/"
export SDKROOT="$DEVROOT/SDKs/iPhoneOS6.0.sdk/"
export CC=$DEVROOT/usr/bin/gcc
export LD=$DEVROOT/usr/bin/ld
export CPP=$DEVROOT/usr/bin/cpp
export CXX=$DEVROOT/usr/bin/g++
export CXXFLAGS="-O -arch armv7 -isysroot $SDKROOT" 
export CFLAGS="-O -arch armv7 -isysroot $SDKROOT"
export AR=$DEVROOT/usr/bin/ar
export AS=$DEVROOT/usr/bin/as
export LDFLAGS="-lstdc++ -arch armv7 -isysroot $SDKROOT" 
export LIBTOOL=$DEVROOT/usr/bin/libtool
export STRIP=$DEVROOT/usr/bin/strip
export RANLIB=$DEVROOT/usr/bin/ranlib

./configure \
	--prefix=$ISSM_DIR \
    --build="i386-apple-darwin10.8.0" \
    --host="arm-apple-darwin10" \
    --enable-shared \
    --with-ios=yes \
    --without-fortran \
	--without-wrappers \
	--without-kriging \
	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install \
	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
