LIBGCRYPT-1-2-BRANCH libgcrypt (ChangeLog autogen.sh)

cvs user wk cvs at cvs.gnupg.org
Sat Dec 18 12:01:15 CET 2004


    Date: Saturday, December 18, 2004 @ 12:05:54
  Author: wk
    Path: /cvs/libgcrypt/libgcrypt
     Tag: LIBGCRYPT-1-2-BRANCH

Modified: ChangeLog autogen.sh

Added option --build-w32 to run W32 cross compiling
configure.


------------+
 ChangeLog  |    5 +++++
 autogen.sh |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 61 insertions(+), 3 deletions(-)


Index: libgcrypt/ChangeLog
diff -u libgcrypt/ChangeLog:1.158.2.1 libgcrypt/ChangeLog:1.158.2.2
--- libgcrypt/ChangeLog:1.158.2.1	Mon Aug  9 12:36:26 2004
+++ libgcrypt/ChangeLog	Sat Dec 18 12:05:54 2004
@@ -1,3 +1,8 @@
+2004-12-18  Werner Koch  <wk at g10code.com>
+
+	* autogen.sh: Added option --build-w32 to run W32 cross compiling
+	configure.
+
 2004-08-09  Moritz Schulte  <moritz at g10code.com>
 
 	* THANKS: Updated.
Index: libgcrypt/autogen.sh
diff -u libgcrypt/autogen.sh:1.3.2.1 libgcrypt/autogen.sh:1.3.2.2
--- libgcrypt/autogen.sh:1.3.2.1	Mon Aug  9 12:40:40 2004
+++ libgcrypt/autogen.sh	Sat Dec 18 12:05:54 2004
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Run this to generate all the initial makefiles, etc. 
 #
-# Copyright (C) 2003 g10 Code GmbH
+# Copyright (C) 2003, 2004 g10 Code GmbH
 #
 # This file is free software; as a special exception the author gives
 # unlimited permission to copy and/or distribute it, with or without
@@ -28,6 +28,61 @@
     return 1
 }
 
+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    
+
+    exit $?
+fi
+
+
+
 
 # Grep the required versions from configure.ac
 autoconf_vers=`sed -n '/^AC_PREREQ(/ { 
@@ -65,8 +120,6 @@
 #GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
 #MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
 
-DIE=no
-
 
 if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then
     check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf




More information about the Gnupg-commits mailing list