1 # fetch rrdtool version number from input file and write them to STDOUT
3 while ((getline < ARGV[1]) > 0) {
4 if (match ($0, /^AC_INIT/)) {
6 my_ver_str = substr(t[2],2,length(t[2])-3);
7 split(my_ver_str, v, ".");
8 gsub("[^0-9].*$", "", v[3]);
9 my_ver = v[1] "," v[2] "," v[3];
11 if (match ($0, /^NUMVERS=/)) {
16 print "RRD_VERSION = " my_ver "";
17 print "RRD_VERSION_STR = " my_ver_str "";
18 print "RRD_NUMVERS = " my_num_ver "";