summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-01-18 15:10:37 +0000
committerWerner Koch <wk@gnupg.org>2010-01-18 15:10:37 +0000
commit0fe34500c2dcdcf274c2485dfda28127e77e7c14 (patch)
tree1caa11aaf4d67df434769118c9a7dbfcfa9b0588 /autogen.sh
parentbd6b75cc17627c2e9208eb33c0dd8a9990213494 (diff)
downloadlibgpg-error-0fe34500c2dcdcf274c2485dfda28127e77e7c14.tar.gz
Add some code to build nativley under WindowsCE - not finished.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh38
1 files changed, 33 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index 23b487e..0de2d08 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -35,9 +35,26 @@ if test "$1" = "--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"
+ ;;
+ *)
+ ;;
+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
@@ -47,12 +64,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"
@@ -61,8 +87,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