55
60
[ -z "$w32root" ] && w32root="$HOME/w32root"
56
61
echo "Using $w32root as standard install directory" >&2
58
# See whether we have the Debian cross compiler package or the
59
# old mingw32/cpd system
60
if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
62
crossbindir=/usr/$host/bin
65
if ! mingw32 --version >/dev/null; then
66
echo "We need at least version 0.3 of MingW32/CPD" >&2
69
crossbindir=`mingw32 --install-dir`/bin
70
# Old autoconf version required us to setup the environment
71
# with the proper tool names.
72
CC=`mingw32 --get-path gcc`
73
CPP=`mingw32 --get-path cpp`
74
AR=`mingw32 --get-path ar`
75
RANLIB=`mingw32 --get-path ranlib`
76
export CC CPP AR RANLIB
63
# Locate the cross compiler
65
for host in i586-mingw32msvc i386-mingw32msvc mingw32; do
66
if ${host}-gcc --version >/dev/null 2>&1 ; then
67
crossbindir=/usr/${host}/bin
68
conf_CC="CC=${host}-gcc"
72
if [ -z "$crossbindir" ]; then
73
echo "Cross compiler kit not installed" >&2
74
echo "Under Debian GNU/Linux, you may install it using" >&2
75
echo " apt-get install mingw32 mingw32-runtime mingw32-binutils" >&2
79
80
if [ -f "$tsdir/config.log" ]; then
80
81
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
81
echo "Pease run a 'make distclean' first" >&2
82
echo "Please run a 'make distclean' first" >&2
86
87
./configure --enable-maintainer-mode --prefix=${w32root} \
87
--host=i586-mingw32msvc --build=${build} \
88
--host=${host} --build=${build} \
88
89
--with-gpg-error-prefix=${w32root} \
89
90
--with-ksba-prefix=${w32root} \
90
91
--with-libgcrypt-prefix=${w32root} \
91
92
--with-libassuan-prefix=${w32root} \
92
93
--with-zlib=${w32root} \
94
--with-regex=${w32root} \
93
95
--with-pth-prefix=${w32root} \
96
--without-included-gettext "$@"
96
# Ugly hack to overcome a gettext problem. Someone should look into
97
# gettext to figure out why the po directory is not ignored as it used
99
[ $rc = 0 ] && touch $tsdir/po/all
102
100
# ***** end W32 build script *******
102
# ***** AMD64 cross build script *******
103
# Used to cross-compile for AMD64 (for testing)
104
if test "$1" = "--build-amd64"; then
106
tsdir=`cd "$tmp"; pwd`
108
if [ ! -f $tsdir/scripts/config.guess ]; then
109
echo "$tsdir/scripts/config.guess not found" >&2
112
build=`$tsdir/scripts/config.guess`
114
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
115
echo "Using $amd64root as standard install directory" >&2
117
# Locate the cross compiler
119
for host in x86_64-linux-gnu amd64-linux-gnu; do
120
if ${host}-gcc --version >/dev/null 2>&1 ; then
121
crossbindir=/usr/${host}/bin
122
conf_CC="CC=${host}-gcc"
126
if [ -z "$crossbindir" ]; then
127
echo "Cross compiler kit not installed" >&2
132
if [ -f "$tsdir/config.log" ]; then
133
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
134
echo "Please run a 'make distclean' first" >&2
139
$tsdir/configure --enable-maintainer-mode --prefix=${amd64root} \
140
--host=${host} --build=${build} \
141
--with-gpg-error-prefix=${amd64root} \
142
--with-ksba-prefix=${amd64root} \
143
--with-libgcrypt-prefix=${amd64root} \
144
--with-libassuan-prefix=${amd64root} \
145
--with-zlib=/usr/x86_64-linux-gnu/usr \
146
--with-pth-prefix=/usr/x86_64-linux-gnu/usr
150
# ***** end AMD64 cross build script *******
107
153
# Grep the required versions from configure.ac