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

« back to all changes in this revision

Viewing changes to 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:
39
39
MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
40
40
 
41
41
DIE=no
 
42
FORCE=
 
43
if test x"$1" = x"--force"; then
 
44
  FORCE=" --force"
 
45
  shift
 
46
fi
42
47
 
43
48
# ***** W32 build script *******
44
49
# Used to cross-compile for Windows.
55
60
    [ -z "$w32root" ] && w32root="$HOME/w32root"
56
61
    echo "Using $w32root as standard install directory" >&2
57
62
    
58
 
    # See whether we have the Debian cross compiler package or the
59
 
    # old mingw32/cpd system
60
 
    if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
61
 
        host=i586-mingw32msvc
62
 
        crossbindir=/usr/$host/bin
63
 
    else
64
 
       host=i386--mingw32
65
 
       if ! mingw32 --version >/dev/null; then
66
 
          echo "We need at least version 0.3 of MingW32/CPD" >&2
67
 
          exit 1
68
 
       fi
69
 
       crossbindir=`mingw32 --install-dir`/bin
70
 
       # Old autoconf version required us to setup the environment
71
 
       # with the proper tool names.
72
 
       CC=`mingw32 --get-path gcc`
73
 
       CPP=`mingw32 --get-path cpp`
74
 
       AR=`mingw32 --get-path ar`
75
 
       RANLIB=`mingw32 --get-path ranlib`
76
 
       export CC CPP AR RANLIB 
 
63
    # Locate the cross compiler
 
64
    crossbindir=
 
65
    for host in i586-mingw32msvc i386-mingw32msvc mingw32; do
 
66
        if ${host}-gcc --version >/dev/null 2>&1 ; then
 
67
            crossbindir=/usr/${host}/bin
 
68
            conf_CC="CC=${host}-gcc"
 
69
            break;
 
70
        fi
 
71
    done
 
72
    if [ -z "$crossbindir" ]; then
 
73
        echo "Cross compiler kit not installed" >&2
 
74
        echo "Under Debian GNU/Linux, you may install it using" >&2
 
75
        echo "  apt-get install mingw32 mingw32-runtime mingw32-binutils" >&2 
 
76
        echo "Stop." >&2
 
77
        exit 1
77
78
    fi
78
79
   
79
80
    if [ -f "$tsdir/config.log" ]; then
80
81
        if ! head $tsdir/config.log | grep "$host" >/dev/null; then
81
 
            echo "Pease run a 'make distclean' first" >&2
 
82
            echo "Please run a 'make distclean' first" >&2
82
83
            exit 1
83
84
        fi
84
85
    fi
85
86
 
86
87
    ./configure --enable-maintainer-mode --prefix=${w32root}  \
87
 
             --host=i586-mingw32msvc --build=${build} \
 
88
             --host=${host} --build=${build} \
88
89
             --with-gpg-error-prefix=${w32root} \
89
90
             --with-ksba-prefix=${w32root} \
90
91
             --with-libgcrypt-prefix=${w32root} \
91
92
             --with-libassuan-prefix=${w32root} \
92
93
             --with-zlib=${w32root} \
 
94
             --with-regex=${w32root} \
93
95
             --with-pth-prefix=${w32root} \
94
 
             --disable-gpg
 
96
             --without-included-gettext "$@"
95
97
    rc=$?
96
 
    # Ugly hack to overcome a gettext problem.  Someone should look into
97
 
    # gettext to figure out why the po directory is not ignored as it used
98
 
    # to be.
99
 
    [ $rc = 0 ] && touch $tsdir/po/all
100
98
    exit $rc
101
99
fi
102
100
# ***** end W32 build script *******
103
101
 
104
 
 
 
102
# ***** AMD64 cross build script *******
 
103
# Used to cross-compile for AMD64 (for testing)
 
104
if test "$1" = "--build-amd64"; then
 
105
    tmp=`dirname $0`
 
106
    tsdir=`cd "$tmp"; pwd`
 
107
    shift
 
108
    if [ ! -f $tsdir/scripts/config.guess ]; then
 
109
        echo "$tsdir/scripts/config.guess not found" >&2
 
110
        exit 1
 
111
    fi
 
112
    build=`$tsdir/scripts/config.guess`
 
113
 
 
114
    [ -z "$amd64root" ] && amd64root="$HOME/amd64root"
 
115
    echo "Using $amd64root as standard install directory" >&2
 
116
    
 
117
    # Locate the cross compiler
 
118
    crossbindir=
 
119
    for host in x86_64-linux-gnu amd64-linux-gnu; do
 
120
        if ${host}-gcc --version >/dev/null 2>&1 ; then
 
121
            crossbindir=/usr/${host}/bin
 
122
            conf_CC="CC=${host}-gcc"
 
123
            break;
 
124
        fi
 
125
    done
 
126
    if [ -z "$crossbindir" ]; then
 
127
        echo "Cross compiler kit not installed" >&2
 
128
        echo "Stop." >&2
 
129
        exit 1
 
130
    fi
 
131
   
 
132
    if [ -f "$tsdir/config.log" ]; then
 
133
        if ! head $tsdir/config.log | grep "$host" >/dev/null; then
 
134
            echo "Please run a 'make distclean' first" >&2
 
135
            exit 1
 
136
        fi
 
137
    fi
 
138
 
 
139
    $tsdir/configure --enable-maintainer-mode --prefix=${amd64root}  \
 
140
             --host=${host} --build=${build} \
 
141
             --with-gpg-error-prefix=${amd64root} \
 
142
             --with-ksba-prefix=${amd64root} \
 
143
             --with-libgcrypt-prefix=${amd64root} \
 
144
             --with-libassuan-prefix=${amd64root} \
 
145
             --with-zlib=/usr/x86_64-linux-gnu/usr \
 
146
             --with-pth-prefix=/usr/x86_64-linux-gnu/usr
 
147
    rc=$?
 
148
    exit $rc
 
149
fi
 
150
# ***** end AMD64 cross build script *******
105
151
 
106
152
 
107
153
# Grep the required versions from configure.ac
118
164
automake_vers_num=`echo "$automake_vers" | cvtver`
119
165
 
120
166
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { 
121
 
s/^.*(\(.*\))/\1/p
 
167
s/^.*\[\(.*\)])/\1/p
122
168
q
123
169
}' ${configure_ac}`
124
170
gettext_vers_num=`echo "$gettext_vers" | cvtver`
158
204
$AUTOHEADER
159
205
echo "Running automake --gnu ..."
160
206
$AUTOMAKE --gnu;
161
 
echo "Running autoconf..."
162
 
$AUTOCONF
 
207
echo "Running autoconf${FORCE} ..."
 
208
$AUTOCONF${FORCE}
163
209
 
164
 
echo "You may now run \"./configure --enable-maintainer-mode && make\"."
 
210
echo "You may now run \"./configure --sysconfdir=/etc --enable-maintainer-mode && make\"."