summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-03-09 13:51:03 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-03-09 13:51:03 +0100
commitfcdabedd99e617f36658c6ce636d3234d3d30a1a (patch)
tree7231ba243fbd9c6d61d7570ac32ad520bdb3f7f4 /acinclude.m4
parentf63c388bfa0ce4d5fded07f6389227643d25658c (diff)
downloadconnman-fcdabedd99e617f36658c6ce636d3234d3d30a1a.tar.gz
connman-fcdabedd99e617f36658c6ce636d3234d3d30a1a.tar.bz2
connman-fcdabedd99e617f36658c6ce636d3234d3d30a1a.zip
Add support for shave autoconf/automake beautifier
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m455
1 files changed, 55 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 84086fde..7b836022 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -25,6 +25,61 @@ AC_DEFUN([COMPILER_FLAGS], [
fi
])
+AC_DEFUN([SHAVE_ARG_ENABLE],
+[
+ AC_ARG_ENABLE([shave],
+ AS_HELP_STRING(
+ [--enable-shave],
+ [use shave to make the build pretty [[default=no]]]),,
+ [enable_shave=no]
+ )
+ AC_CONFIG_FILES(shave shave-libtool)
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+ if test x"$enable_shave" = xyes; then
+ dnl where can we find the shave scripts?
+ m4_if([$1],,
+ [shavedir="$ac_pwd"],
+ [shavedir="$ac_pwd/$1"])
+ AC_SUBST(shavedir)
+
+ dnl make is now quiet
+ AC_SUBST([MAKEFLAGS], [-s])
+ AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+ dnl we need sed
+ AC_CHECK_PROG(SED,sed,sed,false)
+
+ dnl substitute libtool
+ SHAVE_SAVED_LIBTOOL=$LIBTOOL
+ LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+ AC_SUBST(LIBTOOL)
+
+ dnl substitute cc/cxx
+ SHAVE_SAVED_CC=$CC
+ SHAVE_SAVED_CXX=$CXX
+ SHAVE_SAVED_FC=$FC
+ SHAVE_SAVED_F77=$F77
+ CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+ CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+ FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+ F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+ AC_SUBST(CC)
+ AC_SUBST(CXX)
+ AC_SUBST(FC)
+ AC_SUBST(F77)
+
+ V=@
+ else
+ V=1
+ fi
+ Q='$(V:1=)'
+ AC_SUBST(V)
+ AC_SUBST(Q)
+])
+
AC_DEFUN([GTK_DOC_CHECK],
[
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first