misc fixes to get rrdtool working without included libraries.
[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.5 "libtool --version"
18 then
19   echo "get a copy of GNU libtool >= 1.5"
20   exit 1
21 fi
22
23 if vcheck 1.7.9  "automake --version"
24 then
25   echo "get a copy of GNU automake >= 1.7.9"
26   exit 1
27 fi
28
29 if vcheck 2.58 "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 find . -name .libs | xargs rm -r
40 find . -name .debs | xargs rm -r
41
42
43 rm -rf config
44 mkdir config
45 # wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.tar.gz
46 libtoolize --copy --force
47 #cp ltmain.sh config
48
49 # wget ftp://sources.redhat.com/pub/automake/automake-1.7.9.tar.gz
50 # If autoconf generates undefined MACRO errors, it may be unable
51 # to find libtool.m4. Add the -I flag to aclocal to specify the
52 # directory location of this file.
53 aclocal -I /usr/pack/libtool-1.5-to/share/aclocal
54 automake --foreign --add-missing --force-missing --copy --warnings=all
55 # wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.58.tar.gz
56 autoconf --warnings=all --force
57 rm config.h.in
58 autoheader --warnings=all --force  
59
60