3 # fetch APR version numbers from input file and writes them to STDOUT
5 while ((getline < ARGV[1]) > 0) {
6 if (match ($0, /^#define APR_MAJOR_VERSION/)) {
9 else if (match ($0, /^#define APR_MINOR_VERSION/)) {
12 else if (match ($0, /^#define APR_PATCH_VERSION/)) {
15 else if (match ($0, /^#define APR_IS_DEV_VERSION/)) {
19 ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : "");
21 ver_num = ver_major * 1000000 + ver_minor * 1000 + ver_patch;
22 if (ver_num < WANTED) {
23 print "ERROR: APR version " ver_str " does NOT match!";
25 } else if (ver_num >= 1000000) {
26 print "ERROR: APR version " ver_str " higher than expected!";
29 print "OK: APR version " ver_str "";
33 ver_nlm = ver_major "," ver_minor "," ver_patch;
34 print "VERSION = " ver_nlm "";
35 print "VERSION_STR = " ver_str "";