diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | main.c | 3 | ||||
-rw-r--r-- | test/ChangeLog | 2 | ||||
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | test/Makefile.in | 6 |
5 files changed, 13 insertions, 6 deletions
@@ -3,6 +3,8 @@ * dfa.c: Include "dfa.h" which includes regex.h after limits.h so that RE_DUP_MAX gets the correct value. Especially needed on OpenVMS. Thanks to Anders Wallin. + * main.c (version): Print out API version numbers if DYNAMIC. + Helpful also for knowing if to run the shlib tests. 2013-01-31 Arnold D. Robbins <arnold@skeeve.com> @@ -1426,6 +1426,9 @@ static void version() { printf("%s", version_string); +#ifdef DYNAMIC + printf(", API: %d.%d", GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION); +#endif #ifdef HAVE_MPFR printf(" (GNU MPFR %s, GNU MP %s)", mpfr_get_version(), gmp_version); #endif diff --git a/test/ChangeLog b/test/ChangeLog index 9d612dcd..ba491f3e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -2,6 +2,8 @@ * Makefile.am: Move functab4 into shlib tests, since it uses @load. Thanks to Anders Wallin for the report. + (shlib-tests): Check --version output for "API" and run tests + if there. 2013-01-31 Andrew J. Schorr <aschorr@telemetry-investments.com> diff --git a/test/Makefile.am b/test/Makefile.am index 5edb499f..c45be575 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1059,9 +1059,9 @@ mpfr-tests: fi shlib-tests: - @if grep 'DYNAMIC 1' $(top_builddir)/config.h > /dev/null ; then \ - $(MAKE) shlib-real-tests ; \ - else echo shlib tests not supported on this system ; \ + @if $(AWK) --version | $(AWK) '/API/ { exit 1 }' ; then \ + echo shlib tests not supported on this system ; \ + else $(MAKE) shlib-real-tests ; \ fi shlib-real-tests: $(SHLIB_TESTS) diff --git a/test/Makefile.in b/test/Makefile.in index c182952a..e1a44a5a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1442,9 +1442,9 @@ mpfr-tests: fi shlib-tests: - @if grep 'DYNAMIC 1' $(top_builddir)/config.h > /dev/null ; then \ - $(MAKE) shlib-real-tests ; \ - else echo shlib tests not supported on this system ; \ + @if $(AWK) --version | $(AWK) '/API/ { exit 1 }' ; then \ + echo shlib tests not supported on this system ; \ + else $(MAKE) shlib-real-tests ; \ fi shlib-real-tests: $(SHLIB_TESTS) |