added missing bits from internationalization
[rrdtool.git] / MakeMakefile
1 #!/bin/sh
2 #
3 # Run this script after the first cvs checkout to build
4 # makefiles and friends
5
6 PATH="/usr/sepp/bin:$PATH"
7 export PATH
8
9 vcheck (){
10   perl <<PERL
11 @t = split /\./, "$1";
12 @v = map { int \$_ } split /\./, (split /\s+/, \`$2\`)[3];
13 print "$2 = ", (join ".",@v), "  (expected $1)\n";
14 \$v = \$t[0]*1000000+\$t[1]*1000+\$t[2] <= \$v[0]*1000000+\$v[1]*1000+\$v[2];
15 exit \$v
16 PERL
17 }
18
19 ERROR=0
20
21 if vcheck 1.5.14 "libtool --version"
22 then
23   echo "get a copy of GNU libtool >= 1.5.14"
24   ERROR=1
25 fi
26
27 if vcheck 1.9.5  "automake  --version"
28 then
29   if vcheck 1.9.5  "automake-1.9 --version"
30   then
31     echo "get a copy of GNU automake >= 1.9.5"
32     ERROR=1
33   else
34     automake=automake-1.9
35     aclocal="aclocal-1.9"
36     for d in /usr/pack/automake-1.9.5-to/share/aclocal-1.9 /usr/share/aclocal-1.9; do
37       [ -d $d ] && aclocal="$aclocal -I $d"
38     done
39   fi
40 else
41     automake="automake"
42     aclocal="aclocal"
43 #    aclocal="aclocal -I /usr/pack/libtool-1.5.14-to/share/aclocal"
44 fi
45
46 if vcheck 2.59 "autoconf --version"
47 then
48   echo "get a copy of GNU autoconf >= 2.59"
49   ERROR=1
50 fi
51
52 if [ $ERROR -ne 0 ]
53 then
54   exit 1
55 fi
56
57 # cleanup
58 set -x
59 find . -name Makefile | grep -v win32 | grep -v netware | xargs rm -f _UNKNONW_
60 find . -name "*.la" | xargs rm -f _UNKNOWN_
61 find . -name Makefile.in | xargs rm -f _UNKNONW_
62 find . -name .libs | xargs rm -r 
63 find . -name .debs | xargs rm -r
64
65 intltoolize --automake -c -f
66 $aclocal
67 libtoolize --copy --force
68 autoheader --force  
69 $aclocal
70 $automake --foreign --add-missing --force-missing --copy 
71 autoconf --force