summaryrefslogtreecommitdiff
path: root/configure-iphone
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2013-09-06 02:10:48 +0000
committerLiong Sauw Ming <ming@teluu.com>2013-09-06 02:10:48 +0000
commita190a7c679e04645e8c76e8c15729302ed22efa8 (patch)
treeb0231dad58a905d5b447191233ff6e7c3659a4c9 /configure-iphone
parentd39a04e2522e53d1a54fb7b9d06acb998739369e (diff)
Re #1576: Add support for iPhone simulator target
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4591 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'configure-iphone')
-rwxr-xr-xconfigure-iphone10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure-iphone b/configure-iphone
index 0b15287c..dfe548e9 100755
--- a/configure-iphone
+++ b/configure-iphone
@@ -70,12 +70,18 @@ if test "$LDFLAGS" = ""; then
LDFLAGS="-O2"
fi
+# Test the toolchain directory
+TCPATH="${DEVPATH}/../../../Toolchains/XcodeDefault.xctoolchain"
+if test ! -d ${TCPATH}/usr/bin; then
+ TCPATH="${DEVPATH}"
+fi
+
# Determine which gcc for this SDK. Binaries should have the
# full path as it's not normally in user's PATH
if test "${CC}" = ""; then
# Try to use clang if available
- ccpath="${DEVPATH}/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
+ ccpath="${TCPATH}/usr/bin/clang"
# Next, try to use llvm-gcc
gccpath="${DEVPATH}/usr/bin/llvm-gcc"
if test -e ${ccpath}; then
@@ -118,7 +124,7 @@ fi
#ARCH="-arch armv6"
export CFLAGS="${CFLAGS} -DPJ_SDK_NAME=\"\\\"`basename $SDKPATH`\\\"\" ${ARCH} -isysroot ${SDKPATH}"
export LDFLAGS="${LDFLAGS} ${ARCH} -isysroot ${SDKPATH} -framework AudioToolbox -framework Foundation"
-export AR="${DEVPATH}/usr/bin/libtool -static -o"
+export AR="${TCPATH}/usr/bin/libtool -static -o"
export RANLIB="echo ranlib"
# Use gcc -E as preprocessor instead of cpp, since cpp will find the
# header files in standard /usr/include instead of in isysroot