X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config%2Famanda%2Fconfig.m4;fp=config%2Famanda%2Fconfig.m4;h=fedf4bb3465b71369301b8156f7f3092f0fc8961;hb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;hp=0000000000000000000000000000000000000000;hpb=d3b2175e084f88c8736ad7073eacbf4670147aec;p=debian%2Famanda diff --git a/config/amanda/config.m4 b/config/amanda/config.m4 new file mode 100644 index 0000000..fedf4bb --- /dev/null +++ b/config/amanda/config.m4 @@ -0,0 +1,58 @@ +# SYNOPSIS +# +# AMANDA_CONFIG_LCOAL +# +# OVERVIEW +# +# Invoke ./config.local, if it exists +# +AC_DEFUN([AMANDA_CONFIG_LOCAL], +[ + if test -f config.local; then + echo "running local script ./config.local" + . ./config.local + fi +]) + +# SYNOPSIS +# +# AMANDA_GET_SVN_INFO +# +# OVERVIEW +# +# If the build is in a Subversion working copy, and if an svn client +# is available, then update common-src/svn-info.h to reflect the current +# revision and branch. +# +# If these things are not available, then the file is not updated, and +# any previous contents are used. If the file does not exist, it is +# created. +# +AC_DEFUN([AMANDA_GET_SVN_INFO], +[ + AC_REQUIRE([AMANDA_INIT_PROGS]) + AC_REQUIRE([AMANDA_PROG_GREP]) + + AC_PATH_PROG(SVN, svn,, $LOCSYSPATH) + AC_MSG_CHECKING([Subversion revision information]) + if test -d $srcdir/.svn && test -n "$SVN" && (cd $srcdir > /dev/null ; $SVN info . ) > conftemp.svn; then + rev=`$GREP Revision: conftemp.svn|cut -d: -f 2|cut -c2-` + url=`$GREP URL: conftemp.svn|cut -d: -f 2-|cut -c2-` + ( echo '#define BUILT_REV "'$rev'"' + echo '#define BUILT_BRANCH "'`basename "$url"`'"' + ) > common-src/svn-info.h + + AC_MSG_RESULT([updated]) + else + # Makefiles will be upset if the file doesn't exist, so double-check + if test -f common-src/svn-info.h; then + : # all good + AC_MSG_RESULT([not changed]) + else + echo '/* no information available */' > common-src/svn-info.h + AC_MSG_RESULT([not available]) + fi + fi + + rm -f conftemp.svn +])