Install.sh: Use ld, gcc, dlltool and ranlib for cross-compiling.

Add $_MINGW_UDIR/mingw32/bin to PATH and use gcc (and friends) instead
of mingw32-gcc.  Also make sure PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR
are exported to avoid using the build machine's installed packages.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16180 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2007-06-18 20:42:19 +00:00
parent 84806a7206
commit c68e465991
2 changed files with 9 additions and 9 deletions

View File

@@ -68,21 +68,20 @@ fi
####
set_default LD ld
set_default CC gcc
set_default DLLTOOL dlltool
set_default RANLIB ranlib
# For cross-compiling, change this to "yes"
set_default CROSS_COMPILE "no"
if [ "$CROSS_COMPILE" != yes ]; then
set_default LIBTOOLIZE libtoolize
set_default LD ld
set_default CC gcc
set_default DLLTOOL dlltool
else
# Insert your cross-compiler mingw32 bin-directories here
set_default LIBTOOLIZE $GLOBAL_DIR/autotools/bin/libtoolize
set_default HOST_XCOMPILE "--host=mingw32"
set_default LD mingw32-ld
set_default CC mingw32-gcc
set_default DLLTOOL mingw32-dlltool
fi
####

View File

@@ -73,9 +73,9 @@ function prepare() {
fi
if [ "$CROSS_COMPILE" ]; then
# to avoid using the host's installed packages
PKG_CONFIG_PATH=""
PKG_CONFIG_LIBDIR=""
# to avoid using the build machine's installed packages
export PKG_CONFIG_PATH=""
export PKG_CONFIG_LIBDIR=""
fi
}
@@ -129,6 +129,7 @@ function inst_mingw() {
setup MinGW
_MINGW_UDIR=`unix_path $MINGW_DIR`
_MINGW_WFSDIR=`win_fs_path $MINGW_DIR`
[ "$CROSS_COMPILE" = "yes" ] && add_to_env $_MINGW_UDIR/mingw32/bin PATH
[ "$CROSS_COMPILE" = "yes" ] && add_to_env $_MINGW_UDIR/bin PATH
if quiet test_for_mingw