diff options
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 43 |
1 files changed, 36 insertions, 7 deletions
@@ -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 |