summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-01-21 21:36:43 +0000
committerWerner Koch <wk@gnupg.org>2010-01-21 21:36:43 +0000
commitb299da47a6f733c2e28fd98b8f2e19261f3b2608 (patch)
treedaf8da2d3dcbe142e03010fc9dc643b02c280a5b /autogen.sh
parentc9a727088a4a763ff368e4f10d98d3a0c3a8d3b2 (diff)
downloadlibgcrypt-b299da47a6f733c2e28fd98b8f2e19261f3b2608.tar.gz
Support WindowsCE.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh42
1 files changed, 36 insertions, 6 deletions
diff --git a/autogen.sh b/autogen.sh
index 3f2db4f7..5e8767c8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -36,9 +36,28 @@ if test x"$1" = x"--force"; then
shift
fi
+# Convenience option to use certain configure options for some hosts.
+myhost=""
+myhostsub=""
+case "$1" in
+ --build-w32)
+ myhost="w32"
+ ;;
+ --build-w32ce)
+ myhost="w32"
+ myhostsub="ce"
+ ;;
+ --build-amd64)
+ myhost="amd64"
+ ;;
+ *)
+ ;;
+esac
+
+
# ***** W32 build script *******
# Used to cross-compile for Windows.
-if test "$1" = "--build-w32"; then
+if [ "$myhost" = "w32" ]; then
tmp=`dirname $0`
tsdir=`cd "$tmp"; pwd`
shift
@@ -48,12 +67,21 @@ if test "$1" = "--build-w32"; then
fi
build=`$tsdir/config.guess`
- [ -z "$w32root" ] && w32root="$HOME/w32root"
+ case $myhostsub in
+ ce)
+ [ -z "$w32root" ] && w32root="$HOME/w32ce_root"
+ toolprefixes="arm-mingw32ce"
+ ;;
+ *)
+ [ -z "$w32root" ] && w32root="$HOME/w32root"
+ toolprefixes="i586-mingw32msvc i386-mingw32msvc"
+ ;;
+ esac
echo "Using $w32root as standard install directory" >&2
# Locate the cross compiler
crossbindir=
- for host in i586-mingw32msvc i386-mingw32msvc; do
+ for host in $toolprefixes; do
if ${host}-gcc --version >/dev/null 2>&1 ; then
crossbindir=/usr/${host}/bin
conf_CC="CC=${host}-gcc"
@@ -62,8 +90,10 @@ if test "$1" = "--build-w32"; then
done
if [ -z "$crossbindir" ]; then
echo "Cross compiler kit not installed" >&2
- echo "Under Debian GNU/Linux, you may install it using" >&2
- echo " apt-get install mingw32 mingw32-runtime mingw32-binutils" >&2
+ if [ -z "$sub" ]; then
+ echo "Under Debian GNU/Linux, you may install it using" >&2
+ echo " apt-get install mingw32 mingw32-runtime mingw32-binutils" >&2
+ fi
echo "Stop." >&2
exit 1
fi
@@ -85,7 +115,7 @@ fi
# ***** AMD64 cross build script *******
# Used to cross-compile for AMD64 (for testing)
-if test "$1" = "--build-amd64"; then
+if [ "$myhost" = "amd64" ]; then
tmp=`dirname $0`
tsdir=`cd "$tmp"; pwd`
shift