STABLE-BRANCH-1-2 gnupg/scripts (autogen.sh)

cvs user wk cvs at cvs.gnupg.org
Mon Dec 27 18:41:47 CET 2004


    Date: Monday, December 27, 2004 @ 18:47:22
  Author: wk
    Path: /cvs/gnupg/gnupg/scripts
     Tag: STABLE-BRANCH-1-2

Modified: autogen.sh

Updated the build script for Windows


------------+
 autogen.sh |   43 +++++++++++++++++++++++++++----------------
 1 files changed, 27 insertions(+), 16 deletions(-)


Index: gnupg/scripts/autogen.sh
diff -u gnupg/scripts/autogen.sh:1.14.2.5 gnupg/scripts/autogen.sh:1.14.2.6
--- gnupg/scripts/autogen.sh:1.14.2.5	Mon Aug  9 21:45:36 2004
+++ gnupg/scripts/autogen.sh	Mon Dec 27 18:47:22 2004
@@ -23,32 +23,42 @@
     tmp=`dirname $0`
     tsdir=`cd "$tmp"; cd ..; pwd`
     shift
-    host=i386--mingw32
     if [ ! -f $tsdir/scripts/config.guess ]; then
         echo "$tsdir/scripts/config.guess not found" >&2
         exit 1
     fi
     build=`$tsdir/scripts/config.guess`
-        
-    if ! mingw32 --version >/dev/null; then
-        echo "We need at least version 0.3 of MingW32/CPD" >&2
-        exit 1
-    fi
 
+    # 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
+       conf_CC="CC=${host}-gcc"
+    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 
+       conf_CC=""
+    fi
+   
     if [ -f "$tsdir/config.log" ]; then
-        if ! head $tsdir/config.log | grep i386--mingw32 >/dev/null; then
+        if ! head $tsdir/config.log | grep "$host" >/dev/null; then
             echo "Pease run a 'make distclean' first" >&2
             exit 1
         fi
     fi
 
-    crossbindir=`mingw32 --install-dir`/bin
-    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 
-
     disable_foo_tests=""
     if [ -n "$lib_config_files" ]; then
         for i in $lib_config_files; do
@@ -65,8 +75,8 @@
     fi
     [ $DIE = yes ] && exit 1
 
-    $tsdir/configure --build=${build} --host=${host} \
-                ${disable_foo_tests} $*
+    $tsdir/configure ${conf_CC} --build=${build} --host=${host} \
+                ${disable_foo_tests}  $*
 
     # Ugly hack to overcome a gettext problem.  Someone should look into
     # gettext to figure out why the po directory is not ignored as it used
@@ -75,6 +85,7 @@
     exit $?
 fi
 
+
 # This is the special case to build on a ColdFire platform under 
 # the uClinux kernel.  Tested on a MCF4249C3 board.
 if test "$1" = "--build-coldfire"; then




More information about the Gnupg-commits mailing list