1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

Updated the build script for Windows

This commit is contained in:
Werner Koch 2004-12-27 17:47:22 +00:00
parent f79f61e50d
commit a6cee484ee

View File

@ -23,31 +23,41 @@ if test "$1" = "--build-w32"; then
tmp=`dirname $0` tmp=`dirname $0`
tsdir=`cd "$tmp"; cd ..; pwd` tsdir=`cd "$tmp"; cd ..; pwd`
shift shift
host=i386--mingw32
if [ ! -f $tsdir/scripts/config.guess ]; then if [ ! -f $tsdir/scripts/config.guess ]; then
echo "$tsdir/scripts/config.guess not found" >&2 echo "$tsdir/scripts/config.guess not found" >&2
exit 1 exit 1
fi fi
build=`$tsdir/scripts/config.guess` build=`$tsdir/scripts/config.guess`
# See whether we have the Debian cross compiler package or the
# old mingw32/cpd system
if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
host=i586-mingw32msvc
crossbindir=/usr/$host/bin
conf_CC="CC=${host}-gcc"
else
host=i386--mingw32
if ! mingw32 --version >/dev/null; then if ! mingw32 --version >/dev/null; then
echo "We need at least version 0.3 of MingW32/CPD" >&2 echo "We need at least version 0.3 of MingW32/CPD" >&2
exit 1 exit 1
fi fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep i386--mingw32 >/dev/null; then
echo "Pease run a 'make distclean' first" >&2
exit 1
fi
fi
crossbindir=`mingw32 --install-dir`/bin crossbindir=`mingw32 --install-dir`/bin
# Old autoconf version required us to setup the environment
# with the proper tool names.
CC=`mingw32 --get-path gcc` CC=`mingw32 --get-path gcc`
CPP=`mingw32 --get-path cpp` CPP=`mingw32 --get-path cpp`
AR=`mingw32 --get-path ar` AR=`mingw32 --get-path ar`
RANLIB=`mingw32 --get-path ranlib` RANLIB=`mingw32 --get-path ranlib`
export CC CPP AR RANLIB export CC CPP AR RANLIB
conf_CC=""
fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
echo "Pease run a 'make distclean' first" >&2
exit 1
fi
fi
disable_foo_tests="" disable_foo_tests=""
if [ -n "$lib_config_files" ]; then if [ -n "$lib_config_files" ]; then
@ -65,7 +75,7 @@ if test "$1" = "--build-w32"; then
fi fi
[ $DIE = yes ] && exit 1 [ $DIE = yes ] && exit 1
$tsdir/configure --build=${build} --host=${host} \ $tsdir/configure ${conf_CC} --build=${build} --host=${host} \
${disable_foo_tests} $* ${disable_foo_tests} $*
# Ugly hack to overcome a gettext problem. Someone should look into # Ugly hack to overcome a gettext problem. Someone should look into
@ -75,6 +85,7 @@ if test "$1" = "--build-w32"; then
exit $? exit $?
fi fi
# This is the special case to build on a ColdFire platform under # This is the special case to build on a ColdFire platform under
# the uClinux kernel. Tested on a MCF4249C3 board. # the uClinux kernel. Tested on a MCF4249C3 board.
if test "$1" = "--build-coldfire"; then if test "$1" = "--build-coldfire"; then