- fix: db1 end-of-file not detected in legacy compatible way.
[tools/librpm-tizen.git] / autogen.sh
1 #!/bin/sh
2
3 export CFLAGS
4 export LDFLAGS
5
6 LTV="libtoolize (GNU libtool) 1.4"
7 ACV="Autoconf version 2.13"
8 AMV="automake (GNU automake) 1.4-p2"
9 USAGE="
10 You need to install:
11         libtool-1.4
12         autoconf-2.13
13         automake-1.4-p2
14 Or edit this script to change the libtool/autoconf/automake versions checked ...
15 "
16
17 [ "`libtoolize --version`" != "$LTV" ] && echo "$USAGE" && exit 1
18 [ "`autoconf --version`" != "$ACV" ] && echo "$USAGE" && exit 1
19 [ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1
20
21 (cd popt; ./autogen.sh --noconfigure "$@")
22 libtoolize --copy --force
23 aclocal
24 autoheader
25 automake
26 autoconf
27
28 if [ "$1" = "--noconfigure" ]; then 
29     exit 0;
30 fi
31
32 if [ X"$@" = X  -a "X`uname -s`" = "XLinux" ]; then
33     if [ -d /usr/share/man ]; then
34         mandir=/usr/share/man
35         infodir=/usr/share/info
36     else
37         mandir=/usr/man
38         infodir=/usr/info
39     fi
40     ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} "$@"
41 else
42     ./configure "$@"
43 fi