summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2006-11-21 18:42:07 +0000
committerWerner Koch <wk@gnupg.org>2006-11-21 18:42:07 +0000
commita4dbf919a96a453d5d8a0b66873a571e8bc5b6ae (patch)
treed818a228f59569c99633ffc5ad4f508cc9cf3aa9 /autogen.sh
parent2cf3dcd3dcfe00321e8ca65ac2ffb4ebb8e7bb29 (diff)
downloadlibassuan-a4dbf919a96a453d5d8a0b66873a571e8bc5b6ae.tar.gz
Fix for newer Pth versions.
Fix memory leak. Add convenience option for cross build to amd64
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index fca588e..2d1ee0f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -84,6 +84,50 @@ fi
# ***** end W32 build script *******
+# ***** AMD64 cross build script *******
+# Used to cross-compile for AMD64 (for testing)
+if test "$1" = "--build-amd64"; then
+ tmp=`dirname $0`
+ tsdir=`cd "$tmp"; pwd`
+ shift
+ if [ ! -f $tsdir/config.guess ]; then
+ echo "$tsdir/config.guess not found" >&2
+ exit 1
+ fi
+ build=`$tsdir/config.guess`
+
+ [ -z "$amd64root" ] && amd64root="$HOME/amd64root"
+ echo "Using $amd64root as standard install directory" >&2
+
+ # Locate the cross compiler
+ crossbindir=
+ for host in x86_64-linux-gnu amd64-linux-gnu; do
+ if ${host}-gcc --version >/dev/null 2>&1 ; then
+ crossbindir=/usr/${host}/bin
+ conf_CC="CC=${host}-gcc"
+ break;
+ fi
+ done
+ if [ -z "$crossbindir" ]; then
+ echo "Cross compiler kit not installed" >&2
+ echo "Stop." >&2
+ exit 1
+ fi
+
+ if [ -f "$tsdir/config.log" ]; then
+ if ! head $tsdir/config.log | grep "$host" >/dev/null; then
+ echo "Please run a 'make distclean' first" >&2
+ exit 1
+ fi
+ fi
+
+ $tsdir/configure --enable-maintainer-mode --prefix=${amd64root} \
+ --host=${host} --build=${build}
+ rc=$?
+ exit $rc
+fi
+# ***** end AMD64 cross build script *******
+
# Grep the required versions from configure.ac