added autotools version check to MakeMakefiles
[rrdtool.git] / MakeMakefile
index 3d6fae9..4436f78 100755 (executable)
@@ -4,16 +4,39 @@
 # makefiles and friends
 set -x
 #
-find . -name Makefile | xargs rm
-find . -name Makefile.in | xargs rm
+find . -name Makefile | xargs rm -f
+find . -name Makefile.in | xargs rm -f
 
-# libtool 1.4.2
-libtoolize --automake
-# automake 2.12
+if [ 1.4.2 -gt `libtool --version | awk '{print $4}'` ]
+then
+  echo get a copy of GNU libtool >= 1.4.2
+  exit 1
+fi
+
+if [ 1.5 -gt `automake --version | head -1 | awk '{print $4}'` ]
+then
+  echo get a copy of GNU automake >= 1.5
+  exit 1
+fi
+
+if [ 2.52 -gt `autoconf --version | head -1 | awk '{print $4}'` ]
+then
+  echo get a copy of GNU autoconf >= 2.52
+  exit 1
+fi
+
+
+
+# wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.2.tar.gz
+libtoolize --copy
+cp ltmain.sh config
+
+# wget ftp://sources.redhat.com/pub/automake/automake-1.5.tar.gz
 aclocal
 autoheader --warnings=all
 automake --foreign --add-missing --force-missing --copy 
-# autoconf 2.52
+
+# wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz
 autoconf