- attempt to make peace with automake-1.6.1, autoconf-2.53.
[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.1"
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.1
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
27 libtoolize --copy --force
28 aclocal
29 autoheader
30 automake -a -c
31 autoconf
32
33 if [ "$1" = "--noconfigure" ]; then 
34     exit 0;
35 fi
36
37 if [ X"$@" = X  -a "X`uname -s`" = "XLinux" ]; then
38     if [ -d /usr/share/man ]; then
39         mandir=/usr/share/man
40         infodir=/usr/share/info
41     else
42         mandir=/usr/man
43         infodir=/usr/info
44     fi
45     ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} "$@"
46 else
47     ./configure "$@"
48 fi