~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-updates

« back to all changes in this revision

Viewing changes to scripts/autogen.sh

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Run this to generate all the initial makefiles, etc.
3
 
#
4
 
# Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
5
 
#
6
 
# This file is free software; as a special exception the author gives
7
 
# unlimited permission to copy and/or distribute it, with or without
8
 
# modifications, as long as this notice is preserved.
9
 
#
10
 
# This program is distributed in the hope that it will be useful, but
11
 
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
12
 
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 
 
14
 
PGM=GnuPG
15
 
lib_config_files=""
16
 
autoconf_vers=2.52
17
 
automake_vers=1.6
18
 
aclocal_vers=1.6
19
 
 
20
 
ACLOCAL=${ACLOCAL:-aclocal}
21
 
AUTOCONF=${AUTOCONF:-autoconf}
22
 
AUTOMAKE=${AUTOMAKE:-automake}
23
 
AUTOHEADER=${AUTOHEADER:-autoheader}
24
 
DIE=no
25
 
if test "$1" = "--build-w32"; then
26
 
    tmp=`dirname $0`
27
 
    tsdir=`cd "$tmp"; cd ..; pwd`
28
 
    shift
29
 
    host=i386--mingw32
30
 
    if [ ! -f $tsdir/scripts/config.guess ]; then
31
 
        echo "$tsdir/scripts/config.guess not found" >&2
32
 
        exit 1
33
 
    fi
34
 
    build=`$tsdir/scripts/config.guess`
35
 
        
36
 
    if ! mingw32 --version >/dev/null; then
37
 
        echo "We need at least version 0.3 of MingW32/CPD" >&2
38
 
        exit 1
39
 
    fi
40
 
 
41
 
    if [ -f "$tsdir/config.log" ]; then
42
 
        if ! head $tsdir/config.log | grep i386--mingw32 >/dev/null; then
43
 
            echo "Pease run a 'make distclean' first" >&2
44
 
            exit 1
45
 
        fi
46
 
    fi
47
 
 
48
 
    crossbindir=`mingw32 --install-dir`/bin
49
 
    CC=`mingw32 --get-path gcc`
50
 
    CPP=`mingw32 --get-path cpp`
51
 
    AR=`mingw32 --get-path ar`
52
 
    RANLIB=`mingw32 --get-path ranlib`
53
 
    export CC CPP AR RANLIB 
54
 
 
55
 
    disable_foo_tests=""
56
 
    if [ -n "$lib_config_files" ]; then
57
 
        for i in $lib_config_files; do
58
 
            j=`echo $i | tr '[a-z-]' '[A-Z_]'`
59
 
            eval "$j=${crossbindir}/$i"
60
 
            export $j
61
 
            disable_foo_tests="$disable_foo_tests --disable-`echo $i| \
62
 
                           sed 's,-config$,,'`-test"
63
 
            if [ ! -f "${crossbindir}/$i" ]; then                   
64
 
                echo "$i not installed for MingW32" >&2
65
 
                DIE=yes
66
 
            fi
67
 
        done
68
 
    fi
69
 
    [ $DIE = yes ] && exit 1
70
 
 
71
 
    $tsdir/configure --build=${build} --host=${host} \
72
 
                ${disable_foo_tests} $*
73
 
    exit $?
74
 
fi
75
 
 
76
 
 
77
 
 
78
 
if ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 ; then
79
 
    if ($AUTOCONF --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \
80
 
                               exit 1; exit 0; }');
81
 
    then
82
 
       echo "**Error**: "\`autoconf\'" is too old."
83
 
       echo '           (version ' $autoconf_vers ' or newer is required)'
84
 
       DIE="yes"
85
 
    fi
86
 
else
87
 
    echo
88
 
    echo "**Error**: You must have "\`autoconf\'" installed to compile $PGM."
89
 
    echo '           (version ' $autoconf_vers ' or newer is required)'
90
 
    DIE="yes"
91
 
fi
92
 
 
93
 
if ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 ; then
94
 
  if ($AUTOMAKE --version | awk 'NR==1 { if( $4 >= '$automake_vers') \
95
 
                             exit 1; exit 0; }');
96
 
     then
97
 
     echo "**Error**: "\`automake\'" is too old."
98
 
     echo '           (version ' $automake_vers ' or newer is required)'
99
 
     DIE="yes"
100
 
  fi
101
 
  if ($ACLOCAL --version) < /dev/null > /dev/null 2>&1; then
102
 
    if ($ACLOCAL --version | awk 'NR==1 { if( $4 >= '$aclocal_vers' ) \
103
 
                                                exit 1; exit 0; }' );
104
 
    then
105
 
      echo "**Error**: "\`aclocal\'" is too old."
106
 
      echo '           (version ' $aclocal_vers ' or newer is required)'
107
 
      DIE="yes"
108
 
    fi
109
 
  else
110
 
    echo
111
 
    echo "**Error**: Missing "\`aclocal\'".  The version of "\`automake\'
112
 
    echo "           installed doesn't appear recent enough."
113
 
    DIE="yes"
114
 
  fi
115
 
else
116
 
    echo
117
 
    echo "**Error**: You must have "\`automake\'" installed to compile $PGM."
118
 
    echo '           (version ' $automake_vers ' or newer is required)'
119
 
    DIE="yes"
120
 
fi
121
 
 
122
 
 
123
 
if (gettext --version </dev/null 2>/dev/null | awk 'NR==1 { split($4,A,"."); \
124
 
    X=10000*A[1]+100*A[2]+A[3]; echo X; if( X >= 1038 ) exit 1; exit 0}')
125
 
    then
126
 
    echo "**Error**: You must have "\`gettext\'" installed to compile $PGM."
127
 
    echo '           (version 0.10.38 or newer is required; get'
128
 
    echo '            ftp://alpha.gnu.org/gnu/gettext/gettext-0.10.38.tar.gz'
129
 
    echo '            or install the latest Debian package)'
130
 
    DIE="yes"
131
 
fi
132
 
 
133
 
 
134
 
if test "$DIE" = "yes"; then
135
 
    exit 1
136
 
fi
137
 
 
138
 
echo "Running aclocal..."
139
 
$ACLOCAL
140
 
echo "Running autoheader..."
141
 
$AUTOHEADER
142
 
echo "Running automake --gnu ..."
143
 
$AUTOMAKE --gnu;
144
 
echo "Running autoconf..."
145
 
$AUTOCONF
146
 
 
147
 
echo "You can now run \"./configure --enable-maintainer-mode\" and then \"make\"."
148