1
dnl Make automake/libtool output more friendly to humans
2
dnl Damien Lespiau <damien.lespiau@gmail.com>
4
dnl SHAVE_INIT([shavedir],[default_mode])
6
dnl shavedir: the directory where the shave scripts are, it defaults to
8
dnl default_mode: (enable|disable) default shave mode. This parameter
9
dnl controls shave's behaviour when no option has been
10
dnl given to configure. It defaults to disable.
12
dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
13
dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
14
dnl LIBTOOL, you don't want the configure tests to have these variables
16
dnl * This macro requires GNU make's -s option.
18
AC_DEFUN([_SHAVE_ARG_ENABLE],
20
AC_ARG_ENABLE([shave],
23
[use shave to make the build pretty [[default=$1]]]),,
28
AC_DEFUN([SHAVE_INIT],
30
dnl you can tweak the default value of enable_shave
31
m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
33
if test x"$enable_shave" = xyes; then
34
dnl where can we find the shave scripts?
37
[shavedir="$ac_pwd/$1"])
41
AC_SUBST([MAKEFLAGS], [-s])
42
AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
45
AC_CHECK_PROG(SED,sed,sed,false)
47
dnl substitute libtool
48
SHAVE_SAVED_LIBTOOL=$LIBTOOL
49
LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
57
SHAVE_SAVED_OBJC=$OBJC
58
CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
59
CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
60
FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
61
F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
62
OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"