Check for correct versions of libtool/autoconf/automake.
[platform/upstream/rpm.git] / autogen.sh
1 #!/bin/sh
2
3 LTV="libtoolize (GNU libtool) 1.2d"
4 ACV="Autoconf version 2.13"
5 AMV="automake (GNU automake) 1.4"
6 USAGE="
7 You need to install:
8         libtool-1.2d
9         autoconf-2.13
10         automake-2.4
11 "
12
13 [ "`libtoolize --version`" != "$LTV" ] && echo "$USAGE" && exit 1
14 [ "`autoconf --version`" != "$ACV" ] && echo "$USAGE" && exit 1
15 [ "`automake --version`" != "$AMV" ] && echo "$USAGE" && exit 1
16
17 Copyright (C) 1999 Free Software Foundation, Inc.
18 This is free software; see the source for copying conditions.  There is NO
19 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21 Written by Tom Tromey <tromey@cygnus.com>
22
23 (cd popt; ./autogen.sh --noconfigure "$@")
24 libtoolize --copy --force
25 aclocal
26 autoheader
27 automake
28 autoconf
29
30 if [ "$1" = "--noconfigure" ]; then 
31     exit 0;
32 fi
33
34 if [ X"$@" = X  -a "X`uname -s`" = "XLinux" ]; then
35     ./configure --disable-shared --prefix=/usr
36 else
37     ./configure --disable-shared "$@"
38 fi