- warn only once for each NOKEY/UNTRUSTED key id.
[platform/upstream/rpm.git] / autogen.sh
1 #!/bin/sh
2
3 export CFLAGS
4 export LDFLAGS
5
6 LTV="libtoolize (GNU libtool) 1.4.2"
7 ACV="autoconf (GNU Autoconf) 2.53"
8 AMV="automake (GNU automake) 1.6.2"
9 USAGE="
10 This script documents the versions of the tools I'm using to build rpm:
11         libtool-1.4.2
12         autoconf-2.53
13         automake-1.6.2
14 Simply edit this script to change the libtool/autoconf/automake versions
15 checked if you need to, as rpm should build (and has built) with all
16 recent versions of libtool/autoconf/automake.
17 "
18
19 [ "`libtoolize --version`" != "$LTV" ] && echo "$USAGE" && exit 1
20 [ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1
21 [ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1
22
23 (echo "--- popt"; cd popt; ./autogen.sh --noconfigure "$@")
24 (echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@")
25 (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@")
26 (echo "--- libelf"; cd libelf; ./autogen.sh --noconfigure "$@")
27
28 echo "--- rpm"
29 libtoolize --copy --force
30 aclocal
31 autoheader
32 automake -a -c
33 autoconf
34
35 if [ "$1" = "--noconfigure" ]; then 
36     exit 0;
37 fi
38
39 if [ X"$@" = X  -a "X`uname -s`" = "XLinux" ]; then
40     if [ -d /usr/share/man ]; then
41         mandir=/usr/share/man
42         infodir=/usr/share/info
43     else
44         mandir=/usr/man
45         infodir=/usr/info
46     fi
47     ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} --without-javaglue "$@"
48 else
49     ./configure "$@"
50 fi