3 # Run this script after the first cvs checkout to build
4 # makefiles and friends
6 #PATH="/usr/sepp/bin:$PATH"
11 @t = split /\./, "$1";
12 @v = map { int \$_ } split /\./, (split /\s+/, \`$2\`)[3];
13 print "$2 = ", (join ".",@v), " (expecting $1 or later)\n";
14 \$v = \$t[0]*1000000+\$t[1]*1000+\$t[2] <= \$v[0]*1000000+\$v[1]*1000+\$v[2];
25 if vcheck $LIBTOOL_VER "libtool --version"
27 echo "get a copy of GNU libtool >= $LIBTOOL_VER"
31 if vcheck $AUTOMAKE_VER "automake --version"
33 if vcheck $AUTOMAKE_VER "automake-1.9 --version"
35 echo "get a copy of GNU automake >= $AUTOMAKE_VER"
40 for d in /usr/pack/automake-1.9.5-to/share/aclocal-1.9 /usr/share/aclocal-1.9 /usr/share/aclocal /usr/pack/rrdtool-1.3svn-to/share/aclocal /usr/pack/intltool-0.37.0-to/share/aclocal ; do
41 [ -d $d ] && aclocal="$aclocal -I $d"
47 # aclocal="aclocal -I /usr/pack/libtool-1.5.14-to/share/aclocal"
50 if vcheck $AUTOCONF_VER "autoconf --version"
52 echo "get a copy of GNU autoconf >= $autoconf_ver"
56 if vcheck $INTLTOOL_VER "intltoolize --version"
58 echo "get a copy of GNU intltoolize >= $INTLTOOL_VER"
67 # remove the bits we are going to recreate
69 echo Removing old Makefiles
71 find . -name "Makefile" -or -name "Makefile.in" -print0 | xargs -0 rm
72 echo Cleaning out other leftovers
73 for x in configure install-sh intltool-merge.in rrd_config.h.in \
74 missing intltool-update po/Makefile.in.in config.sub \
75 intltool-extract intltool-extract.in config.guess \
76 depcomp intltool-update.in autom4te.cache \
77 intltool-merge compile; do
78 [ ! -L $x -a -d $x ] && rm -r "$x"
79 [ ! -L $x -a -f $x ] && rm "$x"
82 intltoolize --automake -c -f
84 libtoolize --copy --force
87 $automake --foreign --add-missing --force-missing --copy
90 # vim: set syntax=sh :