diff options
author | Reuben Thomas <rrt@sc3d.org> | 2020-10-21 23:31:46 +0100 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-23 14:19:12 -0700 |
commit | f832992db3490fecd8059b69ce302813bc539f52 (patch) | |
tree | ccba84dffa334878aae5627b0ccbdfb307b56dd4 /t | |
parent | 9f83372ba3406587100b043f6d6f266eaaeada4f (diff) | |
download | automake-f832992db3490fecd8059b69ce302813bc539f52.tar.gz |
Improve Vala compiler detection: use API version, not compiler version
* m4/vala.m4: check `valac --api-version', not `valac --version'.
* doc/automake.texi: update documentation.
Diffstat (limited to 't')
-rw-r--r-- | t/vala-configure.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/t/vala-configure.sh b/t/vala-configure.sh index 11bccd5f3..ea46acc84 100644 --- a/t/vala-configure.sh +++ b/t/vala-configure.sh @@ -37,6 +37,9 @@ cat > bin/valac << 'END' if test "x$1" = x--version; then echo "${vala_version-1.2.3}" fi +if test "x$1" = x--api-version; then + echo "${vala_version-1.2.3}" +fi exit 0 END chmod +x bin/valac @@ -46,6 +49,9 @@ cat > bin/valac.old << 'END' if test "x$1" = x--version; then echo 0.1 fi +if test "x$1" = x--api-version; then + echo 0.1 +fi exit 0 END chmod +x bin/valac.old @@ -74,13 +80,13 @@ $MAKE has-valac st=0; vala_version=0.1.2 ./configure 2>stderr || st=$? cat stderr >&2 test $st -eq 0 -grep '^configure: WARNING: no proper vala compiler found' stderr +grep '^configure: WARNING: Vala compiler not found or too old' stderr $MAKE no-valac st=0; ./configure VALAC="$(pwd)/bin/valac.old" 2>stderr || st=$? cat stderr >&2 test $st -eq 0 || exit 1 -grep '^configure: WARNING: no proper vala compiler found' stderr +grep '^configure: WARNING: Vala compiler not found or too old' stderr $MAKE no-valac sed 's/^\(AM_PROG_VALAC\).*/\1([1], [: > ok], [: > ko])/' <configure.ac >t |