fixed
[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 = map { int \$_ } split /\./, (split /\s+/, \`$2\`)[3];
10 print "$2 = ", (join ".",@v), "  (expected $1)\n";
11 \$v = \$t[0]*1000000+\$t[1]*1000+\$t[2] <= \$v[0]*1000000+\$v[1]*1000+\$v[2];
12 exit \$v
13 PERL
14 }
15
16
17 if vcheck 1.4.2 "libtool --version"
18 then
19   echo "get a copy of GNU libtool >= 1.4.2"
20   exit 1
21 fi
22
23 if vcheck 1.7  "automake-1.7 --version"
24 then
25   echo "get a copy of GNU automake >= 1.7"
26   exit 1
27 fi
28
29 if vcheck 2.54 "autoconf --version"
30 then
31   echo "get a copy of GNU autoconf >= 2.54"
32   exit 1
33 fi
34
35 set -x
36 find . -name Makefile | xargs rm -f
37 find . -name "*.la" | xargs rm -f
38 find . -name Makefile.in | xargs rm -f
39
40
41
42 # wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.2.tar.gz
43 libtoolize --copy --force
44 cp ltmain.sh config
45
46 # wget ftp://sources.redhat.com/pub/automake/automake-1.5.tar.gz
47 # If autoconf generates undefined MACRO errors, it may be unable
48 # to find libtool.m4. Add the -I flag to aclocal to specify the
49 # directory location of this file.
50 aclocal
51 autoheader --warnings=all
52 automake-1.7 --foreign --add-missing --force-missing --copy 
53
54 # wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz
55 autoconf 
56
57