Matthias Andree matthias.andree@gmx.de
Matthias Clasen clasen@mathematik.uni-freiburg.de
Matthias Klose doko@ubuntu.com
+Matthieu Baerts matttbe@glx-dock.org
Max Horn max@quendi.de
Maxim Sinev good@goods.ru
Maynard Johnson maynardj@us.ibm.com
Sander Niemeijer niemeijer@science-and-technology.nl
Santiago Vila sanvila@unex.es
Scott James Remnant scott@netsplit.com
+Sébastien Wilmet swilmet@gnome.org
Sergey Poznyakoff gray@gnu.org.ua
Sergey Vlasov vsu@mivlgu.murom.ru
Seth Alves alves@hungry.com
then @var{action-if-found} is run (this defaults to do nothing).
Otherwise, @var{action-if-not-found} is run. If @var{action-if-not-found}
is not specified, the default value is to print a warning in case no
-compiler is found, and to abort the configure script (with status 77)
-if a too-old version of the compiler is found.
+compiler is found, or if a too-old version of the compiler is found.
@end defmac
There are a few variables that are used when compiling Vala sources:
cat > Makefile.am << 'END'
has-valac:
- case '$(VALAC)' in *valac) exit 0;; *) exit 1;; esac
+ case '$(VALAC)' in */valac) exit 0;; *) exit 1;; esac
no-valac:
test x'$(VALAC)' = x':'
END
$AUTOMAKE -a
$AUTOCONF
-# The "|| exit 1" are required here even if 'set -e' is active,
-# because ./configure might exit with status 77, and in that case
-# we want to FAIL, not to SKIP.
-./configure || exit 1
+st=0; ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
$MAKE has-valac
-vala_version=99.9 ./configure || exit 1
+
+st=0; vala_version=99.9 ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
$MAKE has-valac
st=0; vala_version=0.1.2 ./configure 2>stderr || st=$?
cat stderr >&2
-test $st -eq 77 || exit 1
-#$MAKE no-valac
+test $st -eq 0
+grep '^configure: WARNING: no proper vala compiler found' stderr
+$MAKE no-valac
st=0; ./configure VALAC="$(pwd)/bin/valac.old" 2>stderr || st=$?
cat stderr >&2
-test $st -eq 77 || exit 1
-#$MAKE no-valac
+test $st -eq 0 || exit 1
+grep '^configure: WARNING: no proper vala compiler found' stderr
+$MAKE no-valac
sed 's/^\(AM_PROG_VALAC\).*/\1([1], [: > ok], [: > ko])/' <configure.ac >t
mv -f t configure.ac
$ACLOCAL
$AUTOCONF
-./configure
+st=0; ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
test -f ok
test ! -e ko
$MAKE has-valac
rm -f ok ko
-vala_version=0.1.2 ./configure
+st=0; vala_version=0.1.2 ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
test ! -e ok
test -f ko
$MAKE no-valac
rm -f ok ko
-./configure VALAC="$(pwd)/bin/valac.old"
+st=0; ./configure VALAC="$(pwd)/bin/valac.old" 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
test ! -e ok
test -f ko
$MAKE no-valac