Re #1068 (misc): fixed error in cross compiling Mingw on a Linux box (thanks Atik Khan for the report)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3246 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
0828055887
commit
fe3bf0e7cd
14
aconfigure
14
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`
|
||||
|
|
|
@ -41,6 +41,13 @@ AC_PROG_CC
|
|||
AC_PROG_CXX
|
||||
AC_LANG_C
|
||||
|
||||
dnl #
|
||||
dnl # Setup CROSS_COMPILE variable
|
||||
dnl #
|
||||
if test -z "$CROSS_COMPILE"; then
|
||||
CROSS_COMPILE=`echo ${CC} | sed 's/gcc//'`
|
||||
fi
|
||||
|
||||
if test "$AR" = ""; then AR="${CROSS_COMPILE}ar rv"; fi
|
||||
AC_SUBST(AR)
|
||||
if test "$LD" = ""; then LD="$CC"; fi
|
||||
|
@ -70,9 +77,15 @@ AC_SUBST(CC_CFLAGS)
|
|||
|
||||
AC_SUBST(ac_pjdir)
|
||||
AC_SUBST(ac_build_mak_vars)
|
||||
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`
|
||||
|
|
Loading…
Reference in New Issue