diff options
-rw-r--r-- | shave/shave.m4 | 22 | ||||
-rw-r--r-- | test-cxx/configure.ac | 2 | ||||
-rw-r--r-- | test/configure.ac | 2 |
3 files changed, 18 insertions, 8 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? diff --git a/test-cxx/configure.ac b/test-cxx/configure.ac index 6eac7d7..0f69064 100644 --- a/test-cxx/configure.ac +++ b/test-cxx/configure.ac @@ -5,7 +5,7 @@ AC_CONFIG_HEADERS([config.h]) AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_CXX -SHAVE_INIT([../shave]) +SHAVE_INIT([../shave], [verbose]) AC_CONFIG_FILES([ ../shave/shave ../shave/shave-libtool diff --git a/test/configure.ac b/test/configure.ac index c58762b..c9b8143 100644 --- a/test/configure.ac +++ b/test/configure.ac @@ -4,7 +4,7 @@ AC_CONFIG_MACRO_DIR([../shave]) AC_CONFIG_HEADERS([config.h]) AC_PROG_LIBTOOL AC_PROG_CC -SHAVE_INIT([../shave]) +SHAVE_INIT([../shave], [quiet]) AC_CONFIG_FILES([ ../shave/shave ../shave/shave-libtool |