updated
[rrdtool.git] / MakeMakefile
1 #!/bin/sh
2 #
3 # Run this script after the first cvs checkout to build
4 # makefiles and friends
5
6 vcheck (){
7   perl <<PERL
8 @t = split /\./, "$1";
9 @v = split /\./, (split /\s+/, \`$2\`)[3];
10 print "$2 = ", (join ".",@v), "  (expected $1)\n";
11 exit \$t[0]*1000000+\$t[1]*1000+\$t[2] > \$v[0]*1000000+\$v[1]*1000+\$v[2];
12 PERL
13 }
14
15
16 if vcheck 1.4.2 "libtool --version"
17 then
18   echo "get a copy of GNU libtool >= 1.4.2"
19   exit 1
20 fi
21
22 if vcheck 1.5  "automake --version"
23 then
24   echo "get a copy of GNU automake >= 1.5"
25   exit 1
26 fi
27
28 if vcheck 2.52 "autoconf --version"
29 then
30   echo "get a copy of GNU autoconf >= 2.52"
31   exit 1
32 fi
33
34 set -x
35 find . -name Makefile | xargs rm -f
36 find . -name "*.la" | xargs rm -f
37 find . -name Makefile.in | xargs rm -f
38
39
40
41 # wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.2.tar.gz
42 libtoolize --copy --force
43 cp ltmain.sh config
44
45 # wget ftp://sources.redhat.com/pub/automake/automake-1.5.tar.gz
46 aclocal
47 autoheader --warnings=all
48 automake --foreign --add-missing --force-missing --copy 
49
50 # wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz
51 autoconf 
52
53