Update vala version.
[gmpc.git] / acinclude.m4
blob5b1f675670e8797715dce99446b1ba2a895de3eb
1 dnl Make automake/libtool output more friendly to humans
2 dnl
3 dnl SHAVE_INIT([shavedir])
4 dnl
5 dnl shavedir: the directory where the shave script is, it defaults to
6 dnl           $(top_builddir)
7 dnl
8 dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
9 dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrite CC and
10 dnl   LIBTOOL, you don't want the configure tests to have these variables
11 dnl   re-defined.
12 dnl * This macro requires GNU make's -s option.
14 AC_DEFUN([SHAVE_INIT], [
15 dnl where can we find the shave scripts?
16 m4_if([$1],,
17   [shavedir='$(top_builddir)'],
18   [shavedir='$(top_builddir)'/$1])
19 AC_SUBST(shavedir)
20 dnl make is now quiet
21 AC_SUBST([MAKEFLAGS], [-s])
22 AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
23 dnl we need sed
24 AC_CHECK_PROG(SED,sed,sed,false)
25 dnl substitute libtool
26 SHAVE_SAVED_LIBTOOL=$LIBTOOL
27 AC_SUBST(SHAVE_SAVED_LIBTOOL)
28 LIBTOOL="\$(SHELL) \$(shavedir)/shave-libtool '\$(SHAVE_SAVED_LIBTOOL)'"
29 AC_SUBST(LIBTOOL)
30 dnl substitute cc
31 SHAVE_SAVED_CC=$CC
32 SHAVE_SAVED_CXX=$CXX
33 AC_SUBST(SHAVE_SAVED_CC)
34 AC_SUBST(SHAVE_SAVED_CXX)
35 CC="\$(SHELL) \$(shavedir)/shave cc '\$(SHAVE_SAVED_CC)'"
36 CXX="\$(SHELL) \$(shavedir)/shave cxx '\$(SHAVE_SAVED_CXX)'"
37 AC_SUBST(CC)
38 AC_SUBST(CXX)