summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-01-22 15:52:40 +0000
committerWerner Koch <wk@gnupg.org>2010-01-22 15:52:40 +0000
commit6403ba9b779a8d4b77a50199f0e3300c0d1a8e0e (patch)
tree967bab642e5a5089e880966e614726118f3aa64d /autogen.sh
parent4f05e4cc4e6f74d0c8273abf588636b93cccd760 (diff)
downloadlibassuan-6403ba9b779a8d4b77a50199f0e3300c0d1a8e0e.tar.gz
Prepare for a port to WindowsCE.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh43
1 files changed, 36 insertions, 7 deletions
diff --git a/autogen.sh b/autogen.sh
index 5300c6f..0f7a213 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -36,10 +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
@@ -49,11 +67,20 @@ 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
crossbindir=
- for host in i586-mingw32msvc i386-mingw32msvc mingw32; 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 +89,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
@@ -77,7 +106,7 @@ if test "$1" = "--build-w32"; then
./configure --enable-maintainer-mode --prefix=${w32root} \
--host=${host} --build=${build} \
- --disable-shared
+ --with-gpg-error-prefix=${w32root} "$@"
exit $?
fi
@@ -86,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