summaryrefslogtreecommitdiff
path: root/aconfigure
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2010-08-05 06:27:20 +0000
committerBenny Prijono <bennylp@teluu.com>2010-08-05 06:27:20 +0000
commit1c2ccba9315fdee71bc6c542abe58bee6e6e2215 (patch)
tree9284362788e57b4d107d78fb785a3dc8ac4403af /aconfigure
parente16ec2d63a3fc9864ded2e7e703012fcf936931d (diff)
Re #1068 (misc): fixed error in cross compiling Mingw on a Linux box (thanks Atik Khan for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3246 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure')
-rwxr-xr-xaconfigure14
1 files changed, 12 insertions, 2 deletions
diff --git a/aconfigure b/aconfigure
index 2490e75f..e65af0a8 100755
--- a/aconfigure
+++ b/aconfigure
@@ -3431,6 +3431,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -z "$CROSS_COMPILE"; then
+ CROSS_COMPILE=`echo ${CC} | sed 's/gcc//'`
+fi
+
if test "$AR" = ""; then AR="${CROSS_COMPILE}ar rv"; fi
if test "$LD" = ""; then LD="$CC"; fi
@@ -3460,9 +3464,15 @@ if test "$CC_CFLAGS" = ""; then CC_CFLAGS="-Wall"; fi
-case $target in
+
+case $host in
*mingw* | *cygw* | *win32* | *w32* )
- ac_pjdir=`pwd -W`
+ if pwd -W 2&> /dev/null; then
+ ac_pjdir=`pwd -W`
+ else
+ # We're probably cross-compiling mingw on Linux
+ ac_pjdir=`pwd`
+ fi
;;
*)
ac_pjdir=`pwd`