1 dnl Make automake/libtool output more friendly to humans
3 dnl SHAVE_INIT([shavedir])
5 dnl shavedir: the directory where the shave script is, it defaults to
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
12 dnl * This macro requires GNU make's -s option.
14 AC_DEFUN([SHAVE_INIT], [
15 dnl where can we find the shave scripts?
17 [shavedir='$(top_builddir)'],
18 [shavedir='$(top_builddir)'/$1])
21 AC_SUBST([MAKEFLAGS], [-s])
22 AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
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)'"
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)'"