Sanity (make dist).
[platform/upstream/rpm.git] / autogen.sh
1 #!/bin/sh
2
3 export CFLAGS
4 export LDFLAGS
5
6 LTV="libtoolize (GNU libtool) 1.3.4"
7 ACV="Autoconf version 2.13"
8 AMV="automake (GNU automake) 1.4"
9 USAGE="
10 You need to install:
11         libtool-1.3.4
12         autoconf-2.13
13         automake-1.4
14 "
15
16 [ "`libtoolize --version`" != "$LTV" ] && echo "$USAGE" && exit 1
17 [ "`autoconf --version`" != "$ACV" ] && echo "$USAGE" && exit 1
18 [ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1
19
20 (cd popt; ./autogen.sh --noconfigure "$@")
21 libtoolize --copy --force
22 aclocal
23 autoheader
24 automake
25 autoconf
26
27 if [ "$1" = "--noconfigure" ]; then 
28     exit 0;
29 fi
30
31 if [ X"$@" = X  -a "X`uname -s`" = "XLinux" ]; then
32     ./configure --prefix=/usr --enable-shared "$@"
33 else
34     ./configure "$@"
35 fi