summaryrefslogtreecommitdiff
path: root/shave/shave.m4
diff options
context:
space:
mode:
Diffstat (limited to 'shave/shave.m4')
-rw-r--r--shave/shave.m422
1 files changed, 16 insertions, 6 deletions
diff --git a/shave/shave.m4 b/shave/shave.m4
index a49806b..668c098 100644
--- a/shave/shave.m4
+++ b/shave/shave.m4
@@ -1,9 +1,12 @@
dnl Make automake/libtool output more friendly to humans
dnl
-dnl SHAVE_INIT([shavedir])
+dnl SHAVE_INIT([shavedir],[default_mode])
dnl
dnl shavedir: the directory where the shave scripts are, it defaults to
dnl $(top_builddir)
+dnl default_mode: (quiet|verbose) default shave mode. This parameter controls
+dnl the behaviour of shave when no option has been given to
+dnl configure. It defaults to verbose (ie shave disabled)
dnl
dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
@@ -11,13 +14,20 @@ dnl LIBTOOL, you don't want the configure tests to have these variables
dnl re-defined.
dnl * This macro requires GNU make's -s option.
-AC_DEFUN([SHAVE_INIT],
+AC_DEFUN([_SHAVE_ARG_ENABLE],
[
- dnl enable/disable shave
AC_ARG_ENABLE([shave],
- AS_HELP_STRING([--enable-shave],
- [use shave to make the build pretty [[default=no]]]),,
- [enable_shave=no])
+ AS_HELP_STRING(
+ [--enable-shave],
+ [use shave to make the build pretty [[default=$1]]]),,
+ [enable_shave=$1]
+ )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+ dnl you can tweak the default value of enable_shave
+ m4_if([$2], [quiet], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
if test x"$enable_shave" = xyes; then
dnl where can we find the shave scripts?