1
dnl Make automake/libtool output more friendly to humans
3
dnl SHAVE_INIT([shavedir],[default_mode])
5
dnl shavedir: the directory where the shave scripts are, it defaults to
7
dnl default_mode: (enable|disable) default shave mode. This parameter
8
dnl controls shave's behaviour when no option has been
9
dnl given to configure. It defaults to disable.
11
dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
12
dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
13
dnl LIBTOOL, you don't want the configure tests to have these variables
15
dnl * This macro requires GNU make's -s option.
17
AC_DEFUN([_SHAVE_ARG_ENABLE],
19
AC_ARG_ENABLE([shave],
22
[use shave to make the build pretty [[default=$1]]]),,
27
AC_DEFUN([SHAVE_INIT],
29
dnl you can tweak the default value of enable_shave
30
m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
32
if test x"$enable_shave" = xyes; then
33
dnl where can we find the shave scripts?
36
[shavedir="$ac_pwd/$1"])
40
AC_SUBST([MAKEFLAGS], [-s])
41
AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
44
AC_CHECK_PROG(SED,sed,sed,false)
46
dnl substitute libtool
47
SHAVE_SAVED_LIBTOOL=$LIBTOOL
48
LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
56
CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
57
CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
58
FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
59
F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"