aboutsummaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-03-09 16:03:05 +0000
committerWerner Koch <[email protected]>2005-03-09 16:03:05 +0000
commite86f9181adc947c235d270d2d3fcc3265c1f29cc (patch)
treeea224ebed621641abf6e6db79462905c5ee7eb3a /autogen.sh
parent2005-03-07 Timo Schulz <[email protected]> (diff)
downloadgpgme-e86f9181adc947c235d270d2d3fcc3265c1f29cc.tar.gz
gpgme-e86f9181adc947c235d270d2d3fcc3265c1f29cc.zip
* acinclude.m4 (GNUPG_CHECK_VA_COPY): Assume no when cross-compiling.
* Makefile.am (EXTRA_DIST): Include autogen.sh * autogen.sh: Added the usual code to build for W32 (--build-w32). * configure.ac: Fixed the mingw32 host string, removed OS/2 stuff. (HAVE_DRIVE_LETTERS): Removed. (HAVE_W32_SYSTEM): Added. (AC_GNU_SOURCE): New to replace the identical AH_VERBATIM. (AH_BOTTOM): Added. * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Do not cast away type checks. * io.h [W32]: Do not include stdio.h. If it is needed do it at the right place. * data.h [W32]: Removed kludge for EOPNOTSUP. * data.c, data-compat.c [W32]: Explicitly test for it here.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index 3e4c96c0..1d69d84f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -29,6 +29,62 @@ check_version () {
}
+DIE=no
+
+# Used to cross-compile for Windows.
+if test "$1" = "--build-w32"; 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 "$w32root" ] && w32root="$HOME/w32root"
+ echo "Using $w32root as standard install directory" >&2
+
+ # See whether we have the Debian cross compiler package or the
+ # old mingw32/cpd system
+ if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
+ host=i586-mingw32msvc
+ crossbindir=/usr/$host/bin
+ else
+ host=i386--mingw32
+ if ! mingw32 --version >/dev/null; then
+ echo "We need at least version 0.3 of MingW32/CPD" >&2
+ exit 1
+ fi
+ crossbindir=`mingw32 --install-dir`/bin
+ # Old autoconf version required us to setup the environment
+ # with the proper tool names.
+ CC=`mingw32 --get-path gcc`
+ CPP=`mingw32 --get-path cpp`
+ AR=`mingw32 --get-path ar`
+ RANLIB=`mingw32 --get-path ranlib`
+ export CC CPP AR RANLIB
+ fi
+
+ if [ -f "$tsdir/config.log" ]; then
+ if ! head $tsdir/config.log | grep "$host" >/dev/null; then
+ echo "Pease run a 'make distclean' first" >&2
+ exit 1
+ fi
+ fi
+
+ ./configure --enable-maintainer-mode --prefix=${w32root} \
+ --host=i586-mingw32msvc --build=${build} \
+ --with-gpg-error-prefix=${w32root} \
+ --disable-shared --with-gpgsm=c:/gnupg/gpgsm.exe
+
+ exit $?
+fi
+
+
+
+
+
# Grep the required versions from configure.ac
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
s/^.*(\(.*\))/\1/p